123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872 |
- <template>
- <div class="taskUnitRatingDetail">
- <el-dialog title="单位考评评级详情" v-model="ratingdialogVisible" :fullscreen="true" :close-on-click-modal="false">
- <div class="taskUnit">
- <p class="starttitleSty">单据信息:</p>
- <el-row class="danjuMsg">
- <el-col :span="6">
- <div class="danjuMsg_data">
- <span class="data_tit">业务编号:</span>
- <span>{{receiptMsg.code}}</span>
- </div>
- <div class="danjuMsg_data">
- <span class="data_tit">创建日期:</span>
- <span>{{receiptMsg.createDate}}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="danjuMsg_data">
- <span class="data_tit">业务简述:</span>
- <span>{{receiptMsg.des}}</span>
- </div>
- <div class="danjuMsg_data">
- <span class="data_tit">年度:</span>
- <span>{{receiptMsg.year}}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="danjuMsg_data">
- <span class="data_tit">流程状态:</span>
- <span>{{receiptMsg.stage}}</span>
- </div>
- <div class="danjuMsg_data">
- <span class="data_tit">单据状态:</span>
- <span>{{receiptMsg.recStage}}</span>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="danjuMsg_data">
- <span class="data_tit">创建人:</span>
- <span>{{receiptMsg.createName}}</span>
- </div>
- </el-col>
- </el-row>
- <div class="evaluationUnitRatingBtn">
- <div class="headerRight">
- <div class="seachFor">
- <el-input v-model="resCompanyName" placeholder="请输入单位名称" clearable
- @keyup.enter="getevaluRatingDiaList(rowObj, rowkeyId)"></el-input>
- <el-select v-model="businessStr" placeholder="请选择业务属性" clearable
- @change="getevaluRatingDiaList(rowObj, rowkeyId)">
- <el-option v-for="item in binSectionoptions" :key="item.sectionCode"
- :label="item.sectionName" :value="item.sectionCode">
- </el-option>
- </el-select>
- </div>
- <div class="tableBtn add" @click="handleAdd">
- <img :src="addIcon" alt="">
- <span>新增</span>
- </div>
- <div class="tableBtn save" @click="handleEdit">
- <img :src="saveIcon" alt="">
- <span>保存</span>
- </div>
- <div class="tableBtn delete" @click="handleDelete">
- <img :src="deleteIcon" alt="">
- <span>删除</span>
- </div>
- <div class="tableBtn import" @click="handleImport">
- <img :src="importIcon" alt="">
- <span>导入</span>
- </div>
- <div class="tableBtn export" @click="handleExport">
- <img :src="exportIcon" alt="">
- <span>导出</span>
- </div>
- </div>
- <div class="evaluationUnitRatingTableData">
- <!-- @row-click="rowClickToggle" -->
- <el-table :data="evaluationRatingDiaData" style="width: 100%" ref="tableSS" @select="rowClick"
- @select-all="rowClick">
- <el-table-column type="selection" label="操作" align="center"></el-table-column>
- <el-table-column type="index" label="序号" align="center"></el-table-column>
- <el-table-column label="考评单位" width="200">
- <template #default="scope">
- <el-tooltip class="box-item" effect="customized"
- :content="scope.row.organizationShortName" placement="right">
- <span class="tooltipCC">{{scope.row.organizationShortName}}</span>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column label="业务板块" prop="binSectionName" />
- <el-table-column label="考评年度" prop="year" />
- <el-table-column label="生成经营评级" prop="scjyRate" />
- <el-table-column label="前期评级" prop="qqRate" />
- <el-table-column label="基建评级" prop="jjRate" />
- <el-table-column label="年度评级" prop="yearRate" />
- </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>
- <p class="starttitleSty">审批意见:</p>
- <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
- </div>
- </div>
- <el-dialog :title="title" custom-class="startToDia" 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="companyRuleF">
- <el-select v-model="ruleForm.companyRuleF" placeholder="请选择考评单位" :disabled="isSave">
- <el-option v-for="item in companyData" :key="item.organizationId"
- :label="item.organizationShortName" :value="item.organizationId">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="业务属性" prop="binSection">
- <el-select v-model="ruleForm.binSection" placeholder="请选择业务属性">
- <el-option v-for="item in binSectionoptions" :key="item.sectionCode"
- :label="item.sectionName" :value="item.sectionCode">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="年份" prop="year">
- <el-date-picker v-model="ruleForm.year" :disabled="isSave" type="year"
- value-format="YYYY" placeholder="请选择年份" />
- </el-form-item>
- <el-form-item label="生成经营评级">
- <el-select v-model="ruleForm.scjyRate" placeholder="请选择评级">
- <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="前期评级">
- <el-select v-model="ruleForm.qqRate" placeholder="请选择评级">
- <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="基建评级">
- <el-select v-model="ruleForm.jjRate" placeholder="请选择评级">
- <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="年度评级">
- <el-select v-model="ruleForm.yearRate" placeholder="请选择评级">
- <el-option v-for="item in ratingArr" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="描述" prop="remark">
- <el-input v-model="ruleForm.remark" :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" @click="saveevaluaStart('ruleForm')">确 定</el-button>
- </span>
- </template>
- </el-dialog>
- </div>
- </div>
- <template #footer>
- <span class="dialog-footer">
- <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
- <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
- </span>
- </template>
- </el-dialog>
- <import-dailog ref="importPage" @successImport="successImport"></import-dailog>
- </div>
- </template>
- <script>
- import importDailog from '../importPage/importDailog.vue'
- import btns from '../elbuttonS.vue'
- import seachs from '../seachGroup.vue'
- import ExcelJS from 'exceljs'
- import fileSave from 'file-saver'
- import addIcon from '../../assets/btnIcon/add.png'
- import saveIcon from '../../assets/btnIcon/save.png'
- import deleteIcon from '../../assets/btnIcon/delete.png'
- import exportIcon from '../../assets/btnIcon/export.png'
- import importIcon from '../../assets/btnIcon/import.png'
- import {
- apiGetorganizationratinglist,
- apiGetorganizationratingsave,
- apiGetOrganizationListAll,
- apiGetbinsectionList,
- apiPostorganizationratingDelete,
- apiPostIsdoAction,
- apiGetorganizationyearratingHeader
- } from '../../api/api'
- export default {
- components: {
- importDailog,
- btns,
- seachs
- },
- data() {
- return {
- dialogVisible: false,
- ratingdialogVisible: false,
- isSave: false,
- title: '',
- descMsg: '',
- evalradio: {},
- addIcon: addIcon,
- saveIcon: saveIcon,
- deleteIcon: deleteIcon,
- exportIcon: exportIcon,
- importIcon: importIcon,
- changeDateSelect: [],
- evaluationRatingDiaData: [],
- companyData: [],
- binSectionoptions: [],
- ruleForm: {
- companyRuleF: '',
- year: '',
- binSection: '',
- scjyRate: '',
- qqRate: '',
- jjRate: '',
- yearRate: '',
- remark: ''
- },
- rules: {
- companyRuleF: [{
- required: true,
- message: '请选择考评单位',
- trigger: 'change'
- }],
- binSection: [{
- required: true,
- message: '请选择考评单位',
- trigger: 'change'
- }],
- year: [{
- required: true,
- message: '请选择年份',
- trigger: 'change'
- }]
- },
- page: {
- pagesize: 12,
- currentPage: 1,
- total: 0
- },
- receiptMsg: {
- code: '',
- des: '',
- stage: '',
- createName: '',
- createDate: '',
- year: '',
- recStage: ''
- },
- resCompanyName: '',
- businessStr: '',
- monthArr: [],
- ratingArr: [],
- winPix: window.devicePixelRatio,
- innerWidth: window.innerWidth,
- rowObj: {},
- instanceChild: {},
- rowkeyId: ''
- }
- },
- created() {
- this.ratingArr = [{
- label: 'A级',
- value: 'A'
- },
- {
- label: 'B级',
- value: 'B'
- },
- {
- label: 'C级',
- value: 'C'
- }
- ]
- },
- methods: {
- init(row, keyId, allData) {
- this.ratingdialogVisible = true
- this.rowObj = row
- this.rowkeyId = keyId
- this.instanceChild = allData
- this.getevaluRatingDiaList(row, keyId)
- this.getUnitRatingHeader(keyId)
- this.getOrganizetionData()
- this.getDataDictionary()
- },
- // 查询头部信息
- getUnitRatingHeader(id) {
- let that = this
- let params = {
- id: id
- }
- apiGetorganizationyearratingHeader(params).then(datas => {
- if (datas && datas.data) {
- let item = datas.data
- that.receiptMsg = {
- code: item.yearRatingCode,
- des: item.des,
- stage: item.stage,
- createName: item.createName,
- createDate: item.createTime,
- year: item.year,
- recStage: '有效'
- }
- }
- })
- },
- // 查询列表页面
- getevaluRatingDiaList(row, id) {
- let that = this
- let params = {
- pageNum: that.page.currentPage,
- pageSize: that.page.pagesize,
- organizationYearRatingId: id,
- organizationId: that.resCompanyName,
- binSection: that.businessStr,
- year: row.year
- }
- apiGetorganizationratinglist(params).then(datas => {
- if (datas && datas.data.records) {
- that.evaluationRatingDiaData = datas.data.records
- that.page.total = datas.data.total
- }
- })
- },
- //查询单位数据
- getOrganizetionData() {
- let that = this
- let params = {
- evaluationCycle: 'NDKP',
- organizationType: 'DWKP'
- }
- apiGetOrganizationListAll(params).then(datas => {
- if (datas && datas.data) {
- that.companyData = datas.data
- }
- })
- },
- // 查询属性和阶段
- getDataDictionary() {
- let that = this
- let params = {
- type: '1'
- }
- apiGetbinsectionList(params).then(datas => {
- if (datas && datas.data) {
- that.binSectionoptions = datas.data
- }
- })
- },
- saveevaluaStart(formName) {
- let that = this
- that.$refs[formName].validate((valid) => {
- if (valid) {
- that.saveAndEditIndicatorData()
- }
- });
- },
- //新增/修改考评启动数据
- saveAndEditIndicatorData() {
- let that = this
- let orgName = ''
- this.companyData.forEach(item => {
- if (item.organizationId === that.ruleForm.companyRuleF) {
- orgName = item.organizationShortName
- }
- })
- let params = {
- organizationId: that.ruleForm.companyRuleF,
- organizationShortName: orgName,
- year: that.ruleForm.year,
- binSection: that.ruleForm.binSection,
- scjyRate: that.ruleForm.scjyRate,
- qqRate: that.ruleForm.qqRate,
- jjRate: that.ruleForm.jjRate,
- yearRate: that.ruleForm.yearRate,
- remark: that.ruleForm.remark
- }
- if (that.isSave) {
- params.id = that.evalradio.id
- }
- apiGetorganizationratingsave(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'
- });
- }
- that.dialogVisible = false
- that.changeDateSelect = []
- that.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- }
- })
- },
- examineAndApprove(type) {
- let that = this
- let actionCS = ''
- if (type === 'agree') {
- if (that.rowObj.taskType === 'SIGN') {
- actionCS = 'signAgree'
- } else if (that.rowObj.taskType === 'NORMAL') {
- actionCS = 'agree'
- }
- } else {
- if (that.rowObj.taskType === 'SIGN') {
- actionCS = 'signReject'
- } else if (that.rowObj.taskType === 'NORMAL') {
- actionCS = 'reject'
- }
- }
- let params = {
- taskId: that.rowObj.id, //任务ID
- nodeId: that.rowObj.nodeId, //节点ID
- action: actionCS, //固定值
- instanceId: that.rowObj.instId, //流程实例ID
- opinion: that.descMsg, //审批意见
- iamCode: window.localStorage.getItem('code'), //认证后code值
- taskName: that.rowObj.name,
- defKey: that.instanceChild.defKey,
- bizKey: that.instanceChild.bizKey
- }
- apiPostIsdoAction(params).then(datas => {
- if (datas && datas.data) {
- if (datas.data.isOk) {
- that.$message({
- message: datas.data.data,
- type: 'success'
- })
- that.ratingdialogVisible = false
- that.$emit('approveMsg', datas.data.isOk)
- } else {
- that.$message({
- message: datas.data.msg,
- type: 'error'
- })
- }
- }
- })
- },
- getSeachData() {
- this.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- },
- resetSeach() {
- this.resCompanyName = ''
- this.businessStr = ''
- this.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- },
- handleSizeChange(val) {
- this.page.pagesize = val
- this.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- },
- handleCurrentChange(val) {
- this.page.currentPage = val
- this.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- },
- rowClick(selection, row) {
- this.changeDateSelect = selection
- },
- // rowClickToggle(row) {
- // this.$refs.tableSS.toggleRowSelection(row)
- // },
- handleAdd() {
- this.dialogVisible = true
- this.isSave = false
- this.title = '新建单位绩效考核评级'
- this.$nextTick(() => {
- this.ruleForm = {
- companyRuleF: '',
- year: '',
- binSection: '',
- scjyRate: '',
- qqRate: '',
- jjRate: '',
- yearRate: '',
- remark: ''
- }
- })
- },
- handleEdit() {
- this.dialogVisible = true
- this.isSave = true
- this.title = '修改单位绩效考核评级'
- this.evalradio = this.changeDateSelect[0]
- this.ruleForm = {
- companyRuleF: this.evalradio.organizationId,
- year: this.evalradio.year,
- binSection: this.evalradio.binSection,
- scjyRate: this.evalradio.scjyRate,
- qqRate: this.evalradio.qqRate,
- jjRate: this.evalradio.jjRate,
- yearRate: this.evalradio.yearRate,
- remark: this.evalradio.remark
- }
- },
- //删除
- handleDelete() {
- this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let that = this
- let paramsArr = []
- that.changeDateSelect.forEach(it => {
- paramsArr.push(it.id)
- })
- apiPostorganizationratingDelete(paramsArr.join(',')).then(datas => {
- that.$message({
- type: 'success',
- message: '删除成功!'
- });
- that.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- that.changeDateSelect = []
- })
- })
- },
- handleImport() {
- this.$refs.importPage.upload.title = "单位考评评级"
- this.$refs.importPage.upload.open = true
- this.$refs.importPage.upload.url = '/organization-rating/import'
- },
- successImport(val) {
- this.getevaluRatingDiaList(that.rowObj, that.rowkeyId)
- },
- handleExport() {
- let data = this.evaluationRatingDiaData //接口返回数据
- const workbook = new ExcelJS.Workbook()
- const worksheet = workbook.addWorksheet('Sheet1')
- //根据数据自己调整
- let colums = []
- colums = [{
- header: 'ID',
- key: 'id',
- width: 26,
- hidden: true
- },
- {
- header: '考评单位',
- key: 'organizationShortName',
- width: 26
- },
- {
- header: '考评单位ID',
- key: 'organizationId',
- width: 26,
- hidden: true
- },
- {
- header: '业务板块ID',
- key: 'binSection',
- width: 26,
- hidden: true
- },
- {
- header: '考评年度',
- key: 'year',
- width: 26
- },
- {
- header: '生成经营评级',
- key: 'scjyRate',
- width: 26
- },
- {
- header: '前期评级',
- key: 'qqRate',
- width: 26
- },
- {
- header: '基建评级',
- key: 'jjRate',
- width: 26
- },
- {
- header: '年度评级',
- key: 'yearRate',
- width: 26
- },
- {
- header: '备注',
- key: 'remake',
- width: 26
- },
- ]
- worksheet.columns = colums
- worksheet.getRow(1).font = {
- size: 12,
- bold: true
- }
- worksheet.addRows(data)
- workbook.xlsx.writeBuffer().then(buffer => {
- //这里为type
- const blob = new Blob([buffer], {
- type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'
- })
- fileSave(blob, `单位考评评级数据导出.xlsx`)
- })
- },
- }
- }
- </script>
- <style lang="less">
- .taskUnitRatingDetail {
- .el-overlay {
- .el-dialog {
- // margin-top: 7vh;
- .el-dialog__body {
- padding: 0 20px !important;
- .taskUnit {
- .starttitleSty {
- font-size: 18px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #3B7AD1;
- // line-height: 12px;
- margin: 20px 0 20px 10px;
- }
- .danjuMsg {
- border: 1px solid #D6DBEA;
- padding: 10px 20px;
- border-radius: 10px;
- // margin-bottom: 20px;
- .danjuMsg_data {
- padding: 5px 0 10px 0;
- .data_tit {
- margin-right: 10px;
- font-weight: bold;
- font-size: 14px;
- font-family: Microsoft YaHei;
- color: #8991B0;
- }
- .data_tit_wd {
- display: inline-block;
- width: 90px;
- }
- .el-form-item--small {
- .el-input {
- height: 25px;
- width: 160px;
- }
- margin-bottom: 0;
- .el-input-number {
- height: 25px;
- .el-input-number__decrease,
- .el-input-number__increase {
- right: -39px;
- }
- }
- }
- }
- }
- .evaluationUnitRatingBtn {
- .headerRight {
- display: flex;
- justify-content: flex-end;
- width: 100%;
- margin: 15px 0;
- .seachFor {
- display: flex;
- .el-input {
- height: 30px;
- margin-right: 5px;
- width: 150px;
- .el-input__inner {
- height: 30px;
- }
- // .el-input__suffix{
- // .el-select__caret{
- // line-height:30px;
- // }
- // }
- }
- .el-icon {
- margin: 5px 10px 0 10px;
- cursor: pointer;
- }
- }
- .tableBtn {
- display: flex;
- height: 20px;
- margin: 5px 8px 0 8px;
- // width: 20%;
- width: fit-content;
- img {
- margin-right: 5px;
- margin-top: 1px;
- }
- span {
- display: inline-block;
- width: 35px;
- font-size: 14px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- }
- }
- .add {
- cursor: pointer;
- span {
- color: #3B7AD1;
- }
- }
- .save {
- cursor: pointer;
- span {
- color: #50C14E;
- }
- }
- .import {
- cursor: pointer;
- span {
- color: #ce1e78;
- }
- }
- .export {
- cursor: pointer;
- span {
- color: #2baa8a;
- }
- }
- }
- .evaluationUnitRatingTableData {
- .el-table {
- .el-table__body-wrapper {
- height: 40vh !important;
- }
- .el-input__inner {
- height: 30px !important;
- }
- .el-radio__label {
- display: none;
- }
- .tooltipCC {
- width: 300px !important;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .tooltipCCDes {
- width: 50px;
- 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-overlay {
- .startToDia {
- .el-dialog__body {
- padding: 30px 60px 30px 20px !important;
- .periodFrom {
- .el-select,
- .el-input {
- width: 100%;
- }
- .el-input {
- height: 30px;
- }
- }
- .flowSty {
- width: 100%;
- height: 70vh;
- }
- }
- }
- }
- }
- }
- }
- .el-dialog__footer {
- .dialog-footer {
- display: flex;
- justify-content: center;
- .el-button {
- width: 180px !important;
- height: 40px !important;
- }
- }
- }
- }
- }
- }
- </style>
|