浏览代码

配合后端修改bug

SunZehao 2 年之前
父节点
当前提交
2d1c22d1ac

+ 2 - 2
src/api/api.js

@@ -23,8 +23,8 @@ export function apiGetModel(url, params) {
 //获取菜单数据
 export function apiGetMenuData() {
     return httpRequest({
-        url: 'menu/menuList?parentId=10105', // 测试
-        // url: 'menu/menuList?parentId=6802', // 生产
+        // url: 'menu/menuList?parentId=10105', // 测试
+        url: 'menu/menuList?parentId=6802', // 生产
         method: 'post'
     })
 }

+ 31 - 23
src/components/assessment/evaluationMonthPage.vue

@@ -313,34 +313,42 @@ export default {
                 opinion: "月度单位考评",
                 iamCode: window.localStorage.getItem('code')
             }
-            apiGetdoAction(par).then(datas =>{
-                if (datas && datas.data) {
-                    if (datas.data.isOk) {
-                        let params = {
-                            evaluationIds: row.id
+            if (row.instId !== null || row.instId !== '') {
+                apiGetdoAction(par).then(datas =>{
+                    if (datas && datas.data) {
+                        if (datas.data.isOk) {
+                            that.getGenerateUnitMonth(row)
+                        } else {
+                            that.$message({
+                                message: datas.data.msg,
+                                type: 'error'
+                            });
                         }
-                        apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
-                            if (datas && datas.data) {
-                                if (!datas.success) {
-                                    that.$message({
-                                        message: datas.message,
-                                        type: 'error'
-                                    });
-                                } else {
-                                    that.$message({
-                                        message: '月度单位考评已启动',
-                                        type: 'success'
-                                    });
-                                    that.getevaluStartList()
-                                }
-                            }
-                        })
-                    } else {
+                    }
+                })
+            } else {
+                that.getGenerateUnitMonth(row)
+            }
+        },
+        getGenerateUnitMonth(row) {
+            let that = this
+            let params = {
+                evaluationIds: row.id
+            }
+            apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
+                if (datas && datas.data) {
+                    if (!datas.success) {
                         that.$message({
-                            message: datas.data.msg,
+                            message: datas.message,
                             type: 'error'
                         });
+                    } else {
+                        that.$message({
+                            message: '月度单位考评已启动',
+                            type: 'success'
+                        });
                     }
+                    that.getevaluStartList()
                 }
             })
         },

+ 31 - 23
src/components/assessment/evaluationQuarterPage.vue

@@ -314,34 +314,42 @@ export default {
                 opinion: "季度单位考评",
                 iamCode: window.localStorage.getItem('code')
             }
-            apiGetdoAction(par).then(datas =>{
-                if (datas && datas.data) {
-                    if (datas.data.isOk) {
-                        let params = {
-                            evaluationIds: row.id
+            if (row.instId !== null || row.instId !== '') {
+                apiGetdoAction(par).then(datas =>{
+                    if (datas && datas.data) {
+                        if (datas.data.isOk) {
+                            that.getGenerateUnitQuarter(row)
+                        } else {
+                            that.$message({
+                                message: datas.data.msg,
+                                type: 'error'
+                            });
                         }
-                        apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
-                            if (datas && datas.data) {
-                                if (!datas.success) {
-                                    that.$message({
-                                        message: datas.message,
-                                        type: 'error'
-                                    });
-                                } else {
-                                    that.$message({
-                                        message: '月度单位考评已启动',
-                                        type: 'success'
-                                    });
-                                    that.getevaluStartList()
-                                }
-                            }
-                        })
-                    } else {
+                    }
+                })
+            } else {
+                that.getGenerateUnitQuarter(row)
+            }
+        },
+        getGenerateUnitQuarter(row) {
+            let that = this
+            let params = {
+                evaluationIds: row.id
+            }
+            apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
+                if (datas && datas.data) {
+                    if (!datas.success) {
                         that.$message({
-                            message: datas.data.msg,
+                            message: datas.message,
                             type: 'error'
                         });
+                    } else {
+                        that.$message({
+                            message: '季度单位考评已启动',
+                            type: 'success'
+                        });
                     }
+                    that.getevaluStartList()
                 }
             })
         },

+ 34 - 25
src/components/assessment/evaluationStartPage.vue

@@ -37,10 +37,10 @@
                             <el-tooltip
                                 class="box-item"
                                 effect="customized"
-                                :content="scope.row.organizationName"
+                                :content="scope.row.createOrgName"
                                 placement="top"
                             >
-                                <span class="tooltipCC">{{scope.row.organizationName}}</span>
+                                <span class="tooltipCC">{{scope.row.createOrgName}}</span>
                             </el-tooltip>
                         </template>
                     </el-table-column>
@@ -359,34 +359,43 @@ export default {
                 opinion: "考评目标启动",
                 iamCode: window.localStorage.getItem('code')
             }
-            apiGetdoAction(par).then(datas =>{
-                if (datas && datas.data) {
-                    if (datas.data.isOk) {
-                        let params = {
-                            responsibilityIds: row.id
+            if (row.instId !== null || row.instId !== '') {
+                apiGetdoAction(par).then(datas =>{
+                    if (datas && datas.data) {
+                        if (datas.data.isOk) {
+                            that.getDeptresponsibility(row)
+                        } else {
+                            that.$message({
+                                message: datas.data.msg,
+                                type: 'error'
+                            });
                         }
-                        apiGetdeptresponsibilitygenerate(params).then(datas =>{
-                            if (datas && datas.data) {
-                                if (!datas.success) {
-                                    that.$message({
-                                        message: datas.message,
-                                        type: 'error'
-                                    });
-                                } else {
-                                    that.$message({
-                                        message: '考评目标已启动',
-                                        type: 'success'
-                                    });
-                                    that.getevaluStartList()
-                                }
-                            }
-                        })
-                    } else {
+                    }
+                })
+            } else {
+                that.getDeptresponsibility(row)
+            }
+        },
+        // 生成目标责任书
+        getDeptresponsibility(row) {
+            let that = this
+            let params = {
+                responsibilityIds: row.id
+            }
+            apiGetdeptresponsibilitygenerate(params).then(datas =>{
+                if (datas && datas.data) {
+                    if (!datas.success) {
                         that.$message({
-                            message: datas.data.msg,
+                            message: datas.message,
                             type: 'error'
                         });
+                    } else {
+                        that.$message({
+                            message: '考评目标已启动',
+                            type: 'success'
+                        });
                     }
+                    that.getevaluStartList()
                 }
             })
         },

+ 455 - 440
src/components/evaluationSystem/evaluationCompanyPage.vue

@@ -10,34 +10,21 @@
                 <el-button style="margin-left: 10px;" @click="resetSeach">重置</el-button>
             </div>
             <div class="PeriodBtn">
-                <btns
-                :showImport="false"
-                :showExport="false"
-                :showAdd="$utils.havePurview('evalCompany:oneLevel:add')"
-                :showSave="$utils.havePurview('evalCompany:oneLevel:save')"
-                :showDelete="$utils.havePurview('evalCompany:oneLevel:delete')"
-                :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
-                :disDelete="changeDateSelect.length === 0"
-                :disImport="true"
-                :disExport="true"
-                @handleAdd="handleAdd"
-                @handleEdit="handleEdit"
-                @handleDelete="handleDelete"
-                @handleImport="handleImport"
-                @handleExport="handleExport"
-                ></btns>
+                <btns :showImport="false" :showExport="false" :showAdd="$utils.havePurview('evalCompany:oneLevel:add')"
+                    :showSave="$utils.havePurview('evalCompany:oneLevel:save')"
+                    :showDelete="$utils.havePurview('evalCompany:oneLevel:delete')"
+                    :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
+                    :disDelete="changeDateSelect.length === 0" :disImport="true" :disExport="true"
+                    @handleAdd="handleAdd" @handleEdit="handleEdit" @handleDelete="handleDelete"
+                    @handleImport="handleImport" @handleExport="handleExport"></btns>
             </div>
             <div class="evaluationCompanyTableData">
                 <el-table :data="evaluationCompanyData" style="width: 100%" @select="rowClick" @select-all="rowClick">
                     <el-table-column type="selection" label="操作" align="center"></el-table-column>
                     <el-table-column label="单位名称" prop="organizationName" width="300">
                         <template #default="scope">
-                            <el-tooltip
-                                class="box-item"
-                                effect="customized"
-                                :content="scope.row.organizationName"
-                                placement="top"
-                            >
+                            <el-tooltip class="box-item" effect="customized" :content="scope.row.organizationName"
+                                placement="top">
                                 <span class="tooltipCC">{{scope.row.organizationName}}</span>
                             </el-tooltip>
                         </template>
@@ -51,12 +38,8 @@
                     <el-table-column label="业务属性" prop="binSectionName" />
                     <el-table-column label="考评规则" prop="evaluateRuleName" width="300">
                         <template #default="scope">
-                            <el-tooltip
-                                class="box-item"
-                                effect="customized"
-                                :content="scope.row.evaluateRuleName"
-                                placement="top"
-                            >
+                            <el-tooltip class="box-item" effect="customized" :content="scope.row.evaluateRuleName"
+                                placement="top">
                                 <span class="tooltipCC">{{scope.row.evaluateRuleName}}</span>
                             </el-tooltip>
                         </template>
@@ -85,66 +68,50 @@
                     <!-- <el-table-column label="年" prop="year" />
                     <el-table-column label="月" prop="month" /> -->
                 </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 @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 class="indexdialog">
                 <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 :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"
+                            class="demo-ruleForm" :validate-on-rule-change="false">
                             <el-form-item label="单位名称" prop="organizationName">
                                 <el-select v-model="ruleForm.organizationName" filterable placeholder="请选择单位名称">
-                                    <el-option
-                                    v-for="item in companyDatas"
-                                    :key="item.id"
-                                    :label="item.name"
-                                    :value="item.id">
+                                    <el-option v-for="item in companyDatas" :key="item.id" :label="item.name"
+                                        :value="item.id">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
                             <el-form-item label="业务属性" prop="binSection">
-                                <el-select v-model="ruleForm.binSection" placeholder="请选择业务属性" @change="changeBinsection">
-                                    <el-option
-                                    v-for="item in moduleData"
-                                    :key="item.id"
-                                    :label="item.sectionName"
-                                    :value="item.id">
+                                <el-select v-model="ruleForm.binSection" placeholder="请选择业务属性"
+                                    @change="changeBinsection">
+                                    <el-option v-for="item in moduleData" :key="item.id" :label="item.sectionName"
+                                        :value="item.id">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
                             <el-form-item label="考评规则" prop="evaluateRule">
-                                <el-select v-model="ruleForm.evaluateRule" multiple collapse-tags  placeholder="请选择考评规则" @change="changeRule">
-                                    <el-option
-                                    v-for="item in ruleDataAll"
-                                    :key="item.id"
-                                    :label="item.ruleName"
-                                    :value="item.id">
+                                <el-select v-model="ruleForm.evaluateRule" multiple collapse-tags collapse-tags-tooltip
+                                    placeholder="请选择考评规则" @change="changeRule">
+                                    <el-option v-for="item in ruleDataAll" :key="item.id" :label="item.ruleName"
+                                        :value="item.id">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
                             <el-form-item label="业务阶段">
                                 <el-select v-model="ruleForm.binStage" multiple placeholder="请选择业务阶段" disabled>
-                                    <el-option
-                                    v-for="item in stageData"
-                                    :key="item.id"
-                                    :label="item.stageName"
-                                    :value="item.id">
+                                    <el-option v-for="item in stageData" :key="item.id" :label="item.stageName"
+                                        :value="item.id">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
                             <el-form-item label="考评周期" prop="evaluationCycle">
                                 <el-select v-model="ruleForm.evaluationCycle" placeholder="请选择业务阶段">
-                                    <el-option
-                                    v-for="item in periodData"
-                                    :key="item.keyValue"
-                                    :label="item.keyName"
-                                    :value="item.keyValue">
+                                    <el-option v-for="item in periodData" :key="item.keyValue" :label="item.keyName"
+                                        :value="item.keyValue">
                                     </el-option>
                                 </el-select>
                             </el-form-item>
@@ -155,13 +122,16 @@
                                 </el-radio-group>
                             </el-form-item>
                             <el-form-item label="生产经营权重" prop="scjyWeight">
-                                <el-input-number v-model="ruleForm.scjyWeight" :precision="2" :step="0.1" :min="0" :max="1" placeholder="请输入生产经营权重" />
+                                <el-input-number v-model="ruleForm.scjyWeight" :precision="2" :step="0.1" :min="0"
+                                    :max="1" placeholder="请输入生产经营权重" />
                             </el-form-item>
                             <el-form-item label="前期权重" prop="qqWeight">
-                                <el-input-number v-model="ruleForm.qqWeight" :precision="2" :step="0.1" :min="0" :max="1" placeholder="请输入前期权重" />
+                                <el-input-number v-model="ruleForm.qqWeight" :precision="2" :step="0.1" :min="0"
+                                    :max="1" placeholder="请输入前期权重" />
                             </el-form-item>
                             <el-form-item label="基建权重" prop="jjWeight">
-                                <el-input-number v-model="ruleForm.jjWeight" :precision="2" :step="0.1" :min="0" :max="1" placeholder="请输入基建权重" />
+                                <el-input-number v-model="ruleForm.jjWeight" :precision="2" :step="0.1" :min="0"
+                                    :max="1" placeholder="请输入基建权重" />
                             </el-form-item>
                             <!-- <el-form-item label="年份" prop="year">
                                 <el-date-picker
@@ -194,170 +164,37 @@
 </template>
 
 <script>
-import importDailog from '../importPage/importDailog.vue'
-import btns from '../elbuttonS.vue'
-import {apiGetOrganizationList, apiGetorganizationSaveList, apiGetorganizationdeleteList,apiGetorganizationgetTree,
- apiGetdatadictionaryList, apiGetbinstageList,apiGetbinsectionList, apiGetevaluateListAll} from '../../api/api'
-export default {
-  components: { importDailog, btns },
-    data() {
-        return {
-            dialogVisible: false,
-            title: '',
-            isSave: false,
-            changeDateSelect: [],
-            indicatoroptions: [],
-            companyS: '',
-            evaluationCompanyData:[],
-            moduleData: [],
-            stageData: [],
-            ruleDataAll: [],
-            periodData: [],
-            ruleForm: {
-                organizationName: '',
-                evaluateRule: [],
-                binSection: '',
-                binStage: [],
-                evaluationCycle: '',
-                isCheck: '是',
-                scjyWeight: 0,
-                qqWeight: 0,
-                jjWeight: 0,
-                // year: '',
-                // month: 1,
-                orderNum: 1
-            },
-            rules: {
-                organizationName: [
-                    { required: true, message: '请选择单位名称', trigger: 'change' }
-                ],
-                binSection: [
-                    { required: true, message: '请选择业务属性', trigger: 'change' }
-                ],
-                evaluateRule: [
-                    { required: true, message: '请选择考评规则', trigger: 'change' }
-                ],
-                evaluationCycle: [
-                    { required: true, message: '请选择考评周期', trigger: 'change' }
-                ],
-                year: [
-                    { required: true, message: '请选择年份', trigger: 'change' }
-                ]
-            },
-            page:{
-                pagesize: 12,
-                currentPage: 1,
-                total: 0
-            },
-            evalradio: {},
-            loadingImport: false,
-            companyDatas: []
-        }
-    },
-    created() {
-        this.getEvalCompanyData()
-        this.getRuleallData()
-        this.getDataDictionary() //模块 阶段
-        this.getPeriodData()
-        this.getOrganizetionData(23031000, 2)
-    },
-    methods:{
-        // 查询单位数据
-        getEvalCompanyData() {
-            let that = this
-            let params = {
-                pageNum: this.page.currentPage,
-                pageSize: this.page.pagesize,
-                organizationType: 'DWKP',
-                organizationName: that.companyS
-            }
-            apiGetOrganizationList(params).then(datas =>{
-                if (datas && datas.data) {
-                    that.evaluationCompanyData = datas.data.records
-                    that.page.total = datas.data.total
-                }
-            })
-        },
-        //查询组织数据
-        getOrganizetionData(id, num) {
-            let that = this
-            let params = {
-                id: id,
-                num: num
-            }
-            apiGetorganizationgetTree(params).then(datas =>{
-                if (datas && datas.data && datas.data[0].children.length>0) {
-                    that.companyDatas = datas.data[0].children
-                }
-            })
-        },
-        // 查询规则模块和阶段数据
-        getDataDictionary() {
-            let that = this
-            apiGetbinsectionList().then(datas =>{
-                if (datas && datas.data) {
-                    that.moduleData = datas.data
-                }
-            })
-            apiGetbinstageList().then(datas =>{
-                if (datas && datas.data) {
-                    that.stageData = datas.data
-                }
-            })
-        },
-        getRuleallData(val) {
-            let that = this
-            let params = {
-                // pageNum: 1,
-                // pageSize: 50,
-                binSection: val
-            }
-            apiGetevaluateListAll(params).then(datas =>{
-                if (datas && datas.data) {
-                    that.ruleDataAll = datas.data
-                }
-            })
+    import importDailog from '../importPage/importDailog.vue'
+    import btns from '../elbuttonS.vue'
+    import {
+        apiGetOrganizationList,
+        apiGetorganizationSaveList,
+        apiGetorganizationdeleteList,
+        apiGetorganizationgetTree,
+        apiGetdatadictionaryList,
+        apiGetbinstageList,
+        apiGetbinsectionList,
+        apiGetevaluateListAll
+    } from '../../api/api'
+    export default {
+        components: {
+            importDailog,
+            btns
         },
-        //考评周期
-        getPeriodData() {
-            let that = this
-            let params = {
-                superKey: 'KPZQ0001'
-            }
-            apiGetdatadictionaryList(params).then(datas =>{
-                if (datas && datas.data) {
-                    that.periodData = datas.data
-                }
-            })
-        },
-        changeBinsection(val) {
-            this.getRuleallData(val)
-        },
-        changeRule(val) {
-            let binStageArr = []
-            for(let i =0; i<this.ruleDataAll.length; i++) {
-                let item = this.ruleDataAll[i]
-                for(let j =0; j<val.length; j++) {
-                    let itn = val[j]
-                    if (item.id === itn) {
-                        binStageArr.push(item.binStage)
-                    }
-                }
-            }
-            this.ruleForm.binStage = this.useFilter(binStageArr)
-        },
-        useFilter(arr) {
-            return arr.filter(function(item,index){
-                return arr.indexOf(item) === index;  // 因为indexOf 只能查找到第一个  
-            })
-        },
-        handleAdd() {
-            this.dialogVisible = true
-            this.isSave = false
-            this.title = '新增考评单位'
-            this.$nextTick(() =>{
-                // this.$refs['ruleForm'].resetFields()
-                this.ruleForm = {
+        data() {
+            return {
+                dialogVisible: false,
+                title: '',
+                isSave: false,
+                changeDateSelect: [],
+                indicatoroptions: [],
+                companyS: '',
+                evaluationCompanyData: [],
+                moduleData: [],
+                stageData: [],
+                ruleDataAll: [],
+                periodData: [],
+                ruleForm: {
                     organizationName: '',
                     evaluateRule: [],
                     binSection: '',
@@ -370,160 +207,316 @@ export default {
                     // year: '',
                     // month: 1,
                     orderNum: 1
-                }
-            })
-        },
-        handleEdit() {
-            this.dialogVisible = true
-            this.isSave = true
-            this.title = '修改考评单位'
-            this.evalradio = this.changeDateSelect[0]
-            this.ruleForm = {
-                organizationName: this.evalradio.organizationId,
-                evaluationCycle: this.evalradio.evaluationCycle,
-                evaluateRule: this.evalradio.evaluateRuleId.split(','),
-                binSection: this.evalradio.binSection,
-                binStage: this.evalradio.binStage.split(','),
-                isCheck: this.evalradio.isCheck?'是':'否',
-                scjyWeight: this.evalradio.scjyWeight,
-                qqWeight: this.evalradio.qqWeight,
-                jjWeight: this.evalradio.jjWeight,
-                // year: this.evalradio.year,
-                // month: this.evalradio.month,
-                orderNum: this.evalradio.orderNum
+                },
+                rules: {
+                    organizationName: [{
+                        required: true,
+                        message: '请选择单位名称',
+                        trigger: 'change'
+                    }],
+                    binSection: [{
+                        required: true,
+                        message: '请选择业务属性',
+                        trigger: 'change'
+                    }],
+                    evaluateRule: [{
+                        required: true,
+                        message: '请选择考评规则',
+                        trigger: 'change'
+                    }],
+                    evaluationCycle: [{
+                        required: true,
+                        message: '请选择考评周期',
+                        trigger: 'change'
+                    }],
+                    year: [{
+                        required: true,
+                        message: '请选择年份',
+                        trigger: 'change'
+                    }]
+                },
+                page: {
+                    pagesize: 12,
+                    currentPage: 1,
+                    total: 0
+                },
+                evalradio: {},
+                loadingImport: false,
+                companyDatas: []
             }
         },
-        saveevaluationCompanyMsg(formName) {
-            let that = this
-            that.$refs[formName].validate((valid) => {
-                if (valid) {
-                    that.saveAndEditIndicatorData()
-                }
-            });
+        created() {
+            this.getEvalCompanyData()
+            this.getRuleallData()
+            this.getDataDictionary() //模块 阶段
+            this.getPeriodData()
+            this.getOrganizetionData(23031000, 2)
         },
-        //新增/修改指标数据
-        saveAndEditIndicatorData() {
-            let that = this
-            let orgName = ''
-            that.companyDatas.forEach(item =>{
-                if (item.id === that.ruleForm.organizationName) {
-                    orgName = item.name
+        methods: {
+            // 查询单位数据
+            getEvalCompanyData() {
+                let that = this
+                let params = {
+                    pageNum: this.page.currentPage,
+                    pageSize: this.page.pagesize,
+                    organizationType: 'DWKP',
+                    organizationName: that.companyS
                 }
-            })
-            let params = {                
-                organizationName: orgName,
-                evaluationCycle: that.ruleForm.evaluationCycle,
-                organizationType: 'DWKP',
-                evaluateRuleId: that.ruleForm.evaluateRule.join(','),
-                binSection: that.ruleForm.binSection,
-                binStage: that.ruleForm.binStage.join(','),
-                orderNum: that.ruleForm.orderNum,
-                isCheck: that.ruleForm.isCheck === '是'?true:false,
-                scjyWeight: that.ruleForm.scjyWeight,
-                qqWeight: that.ruleForm.qqWeight,
-                jjWeight: that.ruleForm.jjWeight,
-                // year: that.ruleForm.year,
-                // month: that.ruleForm.month
-            }
-            if (that.isSave) {
-                params.id = this.evalradio.id
-                params.organizationId = that.evalradio.organizationId
-            } else {
-                params.organizationId = that.ruleForm.organizationName
-            }
-            apiGetorganizationSaveList(params).then(datas =>{
-                if (!datas.success) {
-                    that.$message({
-                        message: datas.message,
-                        type: 'error'
-                    });
-                } else {
-                    if (!that.isSave) {
-                        that.$message({
-                            message: '考评单位新增成功',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message({
-                            message: '考评单位修改成功',
-                            type: 'success'
-                        });
+                apiGetOrganizationList(params).then(datas => {
+                    if (datas && datas.data) {
+                        that.evaluationCompanyData = datas.data.records
+                        that.page.total = datas.data.total
+                    }
+                })
+            },
+            //查询组织数据
+            getOrganizetionData(id, num) {
+                let that = this
+                let params = {
+                    id: id,
+                    num: num
+                }
+                apiGetorganizationgetTree(params).then(datas => {
+                    if (datas && datas.data && datas.data[0].children.length > 0) {
+                        that.companyDatas = datas.data[0].children
+                    }
+                })
+            },
+            // 查询规则模块和阶段数据
+            getDataDictionary() {
+                let that = this
+                apiGetbinsectionList().then(datas => {
+                    if (datas && datas.data) {
+                        that.moduleData = datas.data
+                    }
+                })
+                apiGetbinstageList().then(datas => {
+                    if (datas && datas.data) {
+                        that.stageData = datas.data
                     }
-                    that.dialogVisible = false
-                    that.changeDateSelect = []
-                    that.getEvalCompanyData()
+                })
+            },
+            getRuleallData(val) {
+                let that = this
+                let params = {
+                    // pageNum: 1,
+                    // pageSize: 50,
+                    binSection: val
                 }
-            })
-        },
-        //删除指标数据
-        handleDelete() {
-            this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
+                apiGetevaluateListAll(params).then(datas => {
+                    if (datas && datas.data) {
+                        that.ruleDataAll = datas.data
+                    }
+                })
+            },
+            //考评周期
+            getPeriodData() {
                 let that = this
-                let paramsArr = []
-                that.changeDateSelect.forEach(it =>{
-                    paramsArr.push(it.id)
+                let params = {
+                    superKey: 'KPZQ0001'
+                }
+                apiGetdatadictionaryList(params).then(datas => {
+                    if (datas && datas.data) {
+                        that.periodData = datas.data
+                    }
+                })
+            },
+            changeBinsection(val) {
+                this.getRuleallData(val)
+            },
+            changeRule(val) {
+                let binStageArr = []
+                for (let i = 0; i < this.ruleDataAll.length; i++) {
+                    let item = this.ruleDataAll[i]
+                    for (let j = 0; j < val.length; j++) {
+                        let itn = val[j]
+                        if (item.id === itn) {
+                            binStageArr.push(item.binStage)
+                        }
+                    }
+                }
+                this.ruleForm.binStage = this.useFilter(binStageArr)
+            },
+            useFilter(arr) {
+                return arr.filter(function (item, index) {
+                    return arr.indexOf(item) === index; // 因为indexOf 只能查找到第一个  
+                })
+            },
+            handleAdd() {
+                this.dialogVisible = true
+                this.isSave = false
+                this.title = '新增考评单位'
+                this.$nextTick(() => {
+                    // this.$refs['ruleForm'].resetFields()
+                    this.ruleForm = {
+                        organizationName: '',
+                        evaluateRule: [],
+                        binSection: '',
+                        binStage: [],
+                        evaluationCycle: '',
+                        isCheck: '是',
+                        scjyWeight: 0,
+                        qqWeight: 0,
+                        jjWeight: 0,
+                        // year: '',
+                        // month: 1,
+                        orderNum: 1
+                    }
+                })
+            },
+            handleEdit() {
+                this.dialogVisible = true
+                this.isSave = true
+                this.title = '修改考评单位'
+                this.evalradio = this.changeDateSelect[0]
+                this.ruleForm = {
+                    organizationName: this.evalradio.organizationId,
+                    evaluationCycle: this.evalradio.evaluationCycle,
+                    evaluateRule: this.evalradio.evaluateRuleId.split(','),
+                    binSection: this.evalradio.binSection,
+                    binStage: this.evalradio.binStage.split(','),
+                    isCheck: this.evalradio.isCheck ? '是' : '否',
+                    scjyWeight: this.evalradio.scjyWeight,
+                    qqWeight: this.evalradio.qqWeight,
+                    jjWeight: this.evalradio.jjWeight,
+                    // year: this.evalradio.year,
+                    // month: this.evalradio.month,
+                    orderNum: this.evalradio.orderNum
+                }
+            },
+            saveevaluationCompanyMsg(formName) {
+                let that = this
+                that.$refs[formName].validate((valid) => {
+                    if (valid) {
+                        that.saveAndEditIndicatorData()
+                    }
+                });
+            },
+            //新增/修改指标数据
+            saveAndEditIndicatorData() {
+                let that = this
+                let orgName = ''
+                that.companyDatas.forEach(item => {
+                    if (item.id === that.ruleForm.organizationName) {
+                        orgName = item.name
+                    }
                 })
-                apiGetorganizationdeleteList(paramsArr.join(',')).then(datas =>{
-                    if (datas) {
+                let params = {
+                    organizationName: orgName,
+                    evaluationCycle: that.ruleForm.evaluationCycle,
+                    organizationType: 'DWKP',
+                    evaluateRuleId: that.ruleForm.evaluateRule.join(','),
+                    binSection: that.ruleForm.binSection,
+                    binStage: that.ruleForm.binStage.join(','),
+                    orderNum: that.ruleForm.orderNum,
+                    isCheck: that.ruleForm.isCheck === '是' ? true : false,
+                    scjyWeight: that.ruleForm.scjyWeight,
+                    qqWeight: that.ruleForm.qqWeight,
+                    jjWeight: that.ruleForm.jjWeight,
+                    // year: that.ruleForm.year,
+                    // month: that.ruleForm.month
+                }
+                if (that.isSave) {
+                    params.id = this.evalradio.id
+                    params.organizationId = that.evalradio.organizationId
+                } else {
+                    params.organizationId = that.ruleForm.organizationName
+                }
+                apiGetorganizationSaveList(params).then(datas => {
+                    if (!datas.success) {
                         that.$message({
-                            type: 'success',
-                            message: '删除成功!'
+                            message: datas.message,
+                            type: 'error'
                         });
+                    } else {
+                        if (!that.isSave) {
+                            that.$message({
+                                message: '考评单位新增成功',
+                                type: 'success'
+                            });
+                        } else {
+                            that.$message({
+                                message: '考评单位修改成功',
+                                type: 'success'
+                            });
+                        }
+                        that.dialogVisible = false
                         that.changeDateSelect = []
                         that.getEvalCompanyData()
                     }
                 })
-            })
-        },        
-        rowClick(selection, row) {
-            this.changeDateSelect = selection
-        },
-        getSeachData() {
-            this.page.currentPage = 1
-            this.getEvalCompanyData()
-        },
-        resetSeach() {
-            this.page.currentPage = 1
-            this.companyS = ''
-            this.getEvalCompanyData()
-        },
-        successImport(val) {
-            this.loadingImport = false
-            this.getEvalCompanyData()
-        },
-        importLoading(val) {
-            this.loadingImport = true
-        },
-        handleSizeChange(val){
-            this.page.pagesize = val
-            this.getEvalCompanyData()
-        },
-        handleCurrentChange(val){
-            this.page.currentPage =val
-            this.getEvalCompanyData()
-        },
-        handleImport() {
-            this.$refs.importPage.upload.title = "考评指标管理信息导入"
-            this.$refs.importPage.upload.open = true
-        },
+            },
+            //删除指标数据
+            handleDelete() {
+                this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let that = this
+                    let paramsArr = []
+                    that.changeDateSelect.forEach(it => {
+                        paramsArr.push(it.id)
+                    })
+                    apiGetorganizationdeleteList(paramsArr.join(',')).then(datas => {
+                        if (datas) {
+                            that.$message({
+                                type: 'success',
+                                message: '删除成功!'
+                            });
+                            that.changeDateSelect = []
+                            that.getEvalCompanyData()
+                        }
+                    })
+                })
+            },
+            rowClick(selection, row) {
+                this.changeDateSelect = selection
+            },
+            getSeachData() {
+                this.page.currentPage = 1
+                this.getEvalCompanyData()
+            },
+            resetSeach() {
+                this.page.currentPage = 1
+                this.companyS = ''
+                this.getEvalCompanyData()
+            },
+            successImport(val) {
+                this.loadingImport = false
+                this.getEvalCompanyData()
+            },
+            importLoading(val) {
+                this.loadingImport = true
+            },
+            handleSizeChange(val) {
+                this.page.pagesize = val
+                this.getEvalCompanyData()
+            },
+            handleCurrentChange(val) {
+                this.page.currentPage = val
+                this.getEvalCompanyData()
+            },
+            handleImport() {
+                this.$refs.importPage.upload.title = "考评指标管理信息导入"
+                this.$refs.importPage.upload.open = true
+            },
+        }
     }
-}
 </script>
 
 <style lang="less">
-.evaluationCompany{
-  .evaluationCompanyBtn{
-        .collectSeach{
-            display: flex;
-            padding: 24px 20px;
-            border-bottom: 1px solid#D6DBEA;
-                .exceed{
+    .evaluationCompany {
+        .evaluationCompanyBtn {
+            .collectSeach {
+                display: flex;
+                padding: 24px 20px;
+                border-bottom: 1px solid#D6DBEA;
+
+                .exceed {
                     display: flex;
-                    .exceedSpan{
+
+                    .exceedSpan {
                         width: 100px;
                         height: 12px;
                         font-size: 14px;
@@ -533,99 +526,121 @@ export default {
                         line-height: 12px;
                         margin-top: 10px;
                     }
-                    .el-input{
-                        margin-right:10px;
-                        .el-input__inner{
-                            height:30px;
+
+                    .el-input {
+                        margin-right: 10px;
+
+                        .el-input__inner {
+                            height: 30px;
                         }
-                        .el-input__suffix{
-                            .el-select__caret{
-                                line-height:30px;
+
+                        .el-input__suffix {
+                            .el-select__caret {
+                                line-height: 30px;
                             }
                         }
                     }
                 }
-                .el-select{
-                    margin-right:10px;
-                    .el-input__inner{
-                        height:30px;
+
+                .el-select {
+                    margin-right: 10px;
+
+                    .el-input__inner {
+                        height: 30px;
                     }
-                    .el-input__suffix{
-                        .el-select__caret{
-                            line-height:30px;
+
+                    .el-input__suffix {
+                        .el-select__caret {
+                            line-height: 30px;
                         }
                     }
                 }
-        }
-        span{
-            font-size:14px;
-        }
-        .PeriodBtn{
-            display: flex;
-            justify-content: end;
-            padding: 20px 0;
-        }
-        .el-button{
-            height: 30px;
-            // width:100px;
-            padding: 0 30px ;
-            // padding-top: 8px;
-            span{
-                margin:0;
             }
-        }
-        .indexdialog{
-            .el-overlay{
-                .el-dialog{
-                    .el-dialog__body{
-                        padding: 30px 60px 30px 20px !important;
-                        .periodFrom{
-                            .el-select, .el-input{
-                                width: 100%;
-                            }
-                            .el-input{
-                                height: 30px;
+
+            span {
+                font-size: 14px;
+            }
+
+            .PeriodBtn {
+                display: flex;
+                justify-content: end;
+                padding: 20px 0;
+            }
+
+            .el-button {
+                height: 30px;
+                // width:100px;
+                padding: 0 30px;
+
+                // padding-top: 8px;
+                span {
+                    margin: 0;
+                }
+            }
+
+            .indexdialog {
+                .el-overlay {
+                    .el-dialog {
+                        .el-dialog__body {
+                            padding: 30px 60px 30px 20px !important;
+
+                            .periodFrom {
+
+                                .el-select,
+                                .el-input {
+                                    width: 100%;
+                                }
+
+                                .el-input {
+                                    height: 30px;
+                                }
                             }
                         }
                     }
                 }
             }
         }
-    }
-  .evaluationCompanyTableData{
-    .el-table{
-        .el-table__body-wrapper{
-            height: 60vh !important;
-        }
-        .el-input__inner{
-            height: 30px !important;
-        }
-        .el-radio__label{
-            display: none;
-        }
-        .tooltipCC{
-            width: 300px;
-            display: inline-block;
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-        }
-        .indicitem{
-            color: #409EFF;
-            font-size: 12px;
-            margin-right: 20px;
-            cursor:pointer;
-            &:hover{
-                text-decoration: underline;
+
+        .evaluationCompanyTableData {
+            .el-table {
+                .el-table__body-wrapper {
+                    height: 60vh !important;
+                }
+
+                .el-input__inner {
+                    height: 30px !important;
+                }
+
+                .el-radio__label {
+                    display: none;
+                }
+
+                .tooltipCC {
+                    width: 300px;
+                    display: inline-block;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                }
+
+                .indicitem {
+                    color: #409EFF;
+                    font-size: 12px;
+                    margin-right: 20px;
+                    cursor: pointer;
+
+                    &:hover {
+                        text-decoration: underline;
+                    }
+                }
+            }
+
+            .el-pagination {
+                margin-top: 20px;
+                text-align: end;
+                position: relative;
             }
         }
+
     }
-    .el-pagination{
-        margin-top: 20px;
-        text-align: end;
-        position: relative;
-    }
-    }
-    
-}
 </style>

+ 2 - 1
src/components/evaluationSystem/evaluationIndexPage.vue

@@ -21,11 +21,12 @@
                 <el-button style="margin-left: 10px;" @click="resetSeach">重置</el-button>
             </div>
             <div class="PeriodBtn">
+                <!-- $utils.havePurview('evalIndex:oneLevel:save') -->
                 <btns
                 :showImport="false"
                 :showExport="false"
                 :showAdd="$utils.havePurview('evalIndex:oneLevel:add')"
-                :showSave="$utils.havePurview('evalIndex:oneLevel:save')"
+                :showSave="true"
                 :showDelete="$utils.havePurview('evalIndex:oneLevel:delete')"
                 :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
                 :disDelete="changeDateSelect.length === 0"

+ 3 - 3
src/components/evaluationSystem/partyBuildingKPage.vue

@@ -38,12 +38,12 @@
                 <el-table :data="partyBuildingData" style="width: 100%" @select="rowClick" @select-all="rowClick">
                     <el-table-column type="selection" label="操作" align="center"></el-table-column>
                     <el-table-column label="序号" type="index" />
-                    <el-table-column label="单位名称" prop="organizationName" width="300" />
+                    <el-table-column label="单位名称" prop="createOrgName" width="300" />
                     <el-table-column label="业务属性" prop="sectionName" />
                     <el-table-column label="年度" prop="year" />
                     <el-table-column label="党建系数" prop="multiplier">
                         <template #default="scope">
-                            <span>{{scope.row.multiplier*100}}%</span>
+                            <span>{{scope.row.multiplier}}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="备注" prop="remarks" width="350" />
@@ -341,7 +341,7 @@ export default {
             this.$refs.importPage.upload.url = '/party-building-multiplier/import'
         },
         handleExport() {
-            this.$utils.downloadPer('party-building-multiplier/export', '党建考核系数信息数据.xlsx')
+            this.$utils.downloadPer('party-building-multiplier/export1', '党建考核系数信息数据.xlsx')
         },
     }
 }

+ 2 - 2
src/utils/baseUrl.js

@@ -17,8 +17,8 @@ switch (process.env.NODE_ENV) {
  
     case 'production': 
         // baseUrl.ROOT = "http://123.60.219.66:28800/" 
-        baseUrl.ROOT = "http://10.65.78.23:28800/" //测试环境
-        // baseUrl.ROOT = "http://10.65.78.81:28800/"  // 正式环境
+        // baseUrl.ROOT = "http://10.65.78.23:28800/" //测试环境
+        baseUrl.ROOT = "http://10.65.78.81:28800/"  // 正式环境
         break 
 }