Browse Source

修改单位考评月季年主表操作逻辑,代码调整;多序列计算指标页面新增,修改功能改造;

SunZehao 1 year ago
parent
commit
9be75c4ae4

+ 1 - 4
src/components/assessment/evaluationMonthPage.vue

@@ -79,7 +79,7 @@
                                     <p class="indicitem" v-if="scope.row.stage === '流程未启动' || scope.row.stage === '数据已生成'"
                                      @click="getGenerateUnitMonthFn(scope.row)">数据生成</p>
                                 </div>
-                                <div v-if="isAction" style="display:flex;justify-content: left;">
+                                <div v-if="scope.row.instId" style="display:flex;justify-content: left;">
                                     <p class="indicitem" v-if="scope.row.stage !== '流程已结束'" @click="calculateScore(scope.row)">计算得分</p>
                                     <p class="indicitem" style="cursor: no-drop;color: #d9d9d9" v-if="isReportshow">生成报表</p>
                                     <p class="indicitem" v-else @click="generateReport(scope.row)">生成报表</p>
@@ -250,7 +250,6 @@ export default {
             rescode: '',
             resDes: '',
             isReportshow: false,
-            isAction: false,
             winPix: window.devicePixelRatio,
             innerWidth: window.innerWidth
         }
@@ -352,7 +351,6 @@ export default {
         },
         agetdeptresponsibility(row) {
             let that = this
-            that.isAction = false
             let par = {
                 defKey: "yddwkplc",
                 businessKey: row.id,
@@ -363,7 +361,6 @@ export default {
             apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
                     if (datas.data.isOk) {
-                        that.isAction = true
                         that.$message({
                             message: '月度单位考评已启动',
                             type: 'success'

+ 1 - 4
src/components/assessment/evaluationQuarterPage.vue

@@ -79,7 +79,7 @@
                                     <p class="indicitem" v-if="scope.row.stage === '流程未启动' || scope.row.stage === '数据已生成'"
                                      @click="getGenerateUnitQuarter(scope.row)">数据生成</p>
                                 </div>
-                                <div v-if="isAction" style="display:flex;justify-content: left;">
+                                <div v-if="scope.row.instId" style="display:flex;justify-content: left;">
                                     <p class="indicitem" v-if="scope.row.stage !== '流程已结束'" @click="calculateScore(scope.row)">计算得分</p>
                                     <p class="indicitem" style="cursor: no-drop;color: #d9d9d9" v-if="isReportshow">生成报表</p>
                                     <p class="indicitem" v-else @click="generateReport(scope.row)">生成报表</p>
@@ -250,7 +250,6 @@ export default {
             rescode: '',
             resDes: '',
             isReportshow: false,
-            isAction: false,
             winPix: window.devicePixelRatio,
             innerWidth: window.innerWidth
         }
@@ -375,7 +374,6 @@ export default {
         },
         agetdeptresponsibility(row) {
             let that = this
-            that.isAction = false
             let par = {
                 defKey: "jddwkplc",
                 businessKey: row.id,
@@ -386,7 +384,6 @@ export default {
             apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
                     if (datas.data.isOk) {
-                        that.isAction = true
                         that.$message({
                             message: '季度单位考评已启动',
                             type: 'success'

+ 1 - 4
src/components/assessment/evaluationYearPage.vue

@@ -77,7 +77,7 @@
                                     <p class="indicitem" v-if="scope.row.stage === '流程未启动' || scope.row.stage === '数据已生成'"
                                      @click="getMessageData(scope.row)">数据生成</p>
                                 </div>
-                                <div v-if="isAction" style="display:flex;justify-content: left;">
+                                <div v-if="scope.row.instId" style="display:flex;justify-content: left;">
                                     <p class="indicitem" v-if="scope.row.stage !== '流程已结束'" @click="calculateScore(scope.row)">计算得分</p>
                                     <p class="indicitem" style="cursor: no-drop;color: #d9d9d9" v-if="isReportshow">生成报表</p>
                                     <p class="indicitem" v-else @click="generateReport(scope.row)">生成报表</p>
@@ -247,7 +247,6 @@ export default {
             rescode: '',
             resDes: '',
             isReportshow: false,
-            isAction: false,
             winPix: window.devicePixelRatio,
             innerWidth: window.innerWidth
         }
@@ -369,7 +368,6 @@ export default {
         },
         agetdeptresponsibility(row) {
             let that = this
-            that.isAction = false
             let par = {
                 defKey: "nddwkplc",
                 businessKey: row.id,
@@ -380,7 +378,6 @@ export default {
             apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
                     if (datas.data.isOk) {
-                        that.isAction = true
                         that.$message({
                             message: '年度考评目标已启动',
                             type: 'success'

+ 41 - 18
src/components/evaluationSystem/evaluationMultiSequencePage.vue

@@ -9,12 +9,15 @@
                 <seachs @handleSeach="getSeachData" @handleRest="resetSeach"></seachs>
             </div>
             <div class="PeriodBtn" :style="$utils.PeriodBtnSty()">
+                <!-- :showAdd="$utils.havePurview('multiSequence:oneLevel:add')"
+                :showSave="$utils.havePurview('multiSequence:oneLevel:save')"
+                :showDelete="$utils.havePurview('multiSequence:oneLevel:delete')" -->
                 <btns
                 :showImport="false"
                 :showExport="false"
-                :showAdd="$utils.havePurview('multiSequence:oneLevel:add')"
-                :showSave="$utils.havePurview('multiSequence:oneLevel:save')"
-                :showDelete="$utils.havePurview('multiSequence:oneLevel:delete')"
+                :showAdd="true"
+                :showSave="true"
+                :showDelete="true"
                 :disSave="changeDateSelect.length === 0 || changeDateSelect.length>1"
                 :disDelete="changeDateSelect.length === 0"
                 :disImport="true"
@@ -28,9 +31,9 @@
                 <el-table :data="evaluationCombinationData" style="width: 100%" :class="multisequenceTableSty()"
                  @select="rowClick" @select-all="rowClick">
                     <el-table-column type="selection" label="操作" align="center"></el-table-column>
-                    <el-table-column label="组合名称" prop="citeCalculationName" />
-                    <el-table-column label="所属板块" prop="binSectionName" />
-                    <el-table-column label="指标名称" prop="indicatorNames" />
+                    <el-table-column label="名称" prop="citeCalculationName" />
+                    <el-table-column label="参与差值板块" prop="binSectionName" />
+                    <!-- <el-table-column label="指标名称" prop="indicatorNames" /> -->
                     <el-table-column label="排序" prop="orderNum" />
                 </el-table>
                 <el-pagination
@@ -46,10 +49,10 @@
                 <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="combination">
-                            <el-input v-model="ruleForm.combination" placeholder="请输入组合名称"></el-input>
+                            <el-input v-model="ruleForm.combination" @blur="changeIndicItem" placeholder="请输入组合名称"></el-input>
                         </el-form-item>
                         <el-form-item label="业务属性" prop="sectionName">
-                            <el-select v-model="ruleForm.sectionName" placeholder="请选择业务属性" @change="changeIndicItem">
+                            <el-select v-model="ruleForm.sectionName" multiple collapse-tags placeholder="请选择业务属性">
                                 <el-option
                                 v-for="item in binSectionOptions"
                                 :key="item.id"
@@ -65,6 +68,16 @@
                                 :key="item.id"
                                 :label="item.indicatorName"
                                 :value="item.id">
+                                <span style="float: left">{{ item.indicatorName }}</span>
+                                <span
+                                    style="
+                                    margin-left: 20px;
+                                    float: right;
+                                    color: var(--el-text-color-secondary);
+                                    font-size: 13px;
+                                    "
+                                    >{{ item.binSectionName }}</span
+                                >
                                 </el-option>
                             </el-select>
                         </el-form-item>
@@ -104,7 +117,7 @@ export default {
             evaluationCombinationData:[],
             ruleForm: {
                 combination: '',
-                sectionName: '',
+                sectionName: [],
                 indicItemName: [],
                 serialNumber: 1,
                 desc: ''
@@ -169,13 +182,13 @@ export default {
             })
         },
         changeIndicItem(val) {
-            this.getIndListAll(val)
+            this.getIndListAll(this.ruleForm.combination)
         },
         //查询指标
-        getIndListAll(id) {
+        getIndListAll(val) {
             let that = this
             let params = {
-                binSection: id
+                indicatorName: val
             }
             apiGetindicatorListAll(params).then(datas =>{
                 if (datas && datas.data) {
@@ -190,7 +203,7 @@ export default {
             this.$nextTick(() =>{
                 this.ruleForm = {
                     combination: '',
-                    sectionName: '',
+                    sectionName: [],
                     indicItemName: [],
                     serialNumber: 1,
                 }
@@ -202,11 +215,12 @@ export default {
             this.title = '修改多序列计算指标'
             this.evalradio = this.changeDateSelect[0]
             this.ruleForm = {
-                combination: this.evalradio.combination,
-                sectionName: this.evalradio.binSection,
-                indicItemName: this.evalradio.indicatorIds.spilt(','),
-                serialNumber: this.evalradio.serialNumber
+                combination: this.evalradio.citeCalculationName,
+                sectionName: this.evalradio.binSection.split(','),
+                indicItemName: this.evalradio.indicatorIds.split(','),
+                serialNumber: this.evalradio.orderNum
             }
+            this.getIndListAll(this.evalradio.citeCalculationName)
         },
         saveevaluationPersonMsg(formName) {
             let that = this
@@ -220,6 +234,7 @@ export default {
         saveAndEditIndicatorData() {
             let that = this
             let indNames = []
+            let binSectionName = []
             that.ruleForm.indicItemName.forEach(iv =>{
                 that.indicItemoptions.forEach(it =>{
                     if (iv === it.id) {
@@ -227,9 +242,17 @@ export default {
                     }
                 })
             })
+            // that.ruleForm.sectionName.forEach(iv =>{
+            //     that.binSectionOptions.forEach(it =>{
+            //         if (iv === it.id) {
+            //             binSectionName.push(it.sectionName)
+            //         }
+            //     })
+            // })
             let params = {
                 citeCalculationName: that.ruleForm.combination,
-                binSection: that.ruleForm.sectionName,
+                binSection: that.ruleForm.sectionName.join(','),
+                // binSectionName: binSectionName.join(','),
                 indicatorNames: indNames.join(','),
                 indicatorIds: that.ruleForm.indicItemName.join(','),
                 orderNum: that.ruleForm.serialNumber