|
@@ -58,21 +58,26 @@
|
|
|
<img :src="editIcon" alt="">
|
|
|
<span>新增</span>
|
|
|
</div> -->
|
|
|
- <!-- <div class="tableBtn delete">
|
|
|
- <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>
|
|
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
|
<el-tab-pane label="考评指标项内容" name="first">
|
|
|
<el-table :data="quantifiedList" style="width: 100%" @select="rowClick" @select-all="rowClick">
|
|
|
<el-table-column type="selection" label="操作" align="center"></el-table-column>
|
|
|
<el-table-column type="index" label="序号" width="80" />
|
|
|
+ <el-table-column label="单位名称" prop="organizationName" width="300" />
|
|
|
+ <el-table-column label="指标分类" prop="typeName" />
|
|
|
<el-table-column label="业务阶段" prop="stageName" />
|
|
|
<el-table-column label="业务属性" prop="sectionName" />
|
|
|
- <el-table-column label="单位名称" prop="organizationName" width="300" />
|
|
|
+ <el-table-column label="指标名称" prop="childName" />
|
|
|
<el-table-column label="填报部门" prop="deptName" width="260" />
|
|
|
- <el-table-column label="指标分类" prop="typeName" />
|
|
|
<el-table-column label="目标值">
|
|
|
<template #default="scope">
|
|
|
<el-input-number v-model="scope.row.quantifiedValue"
|
|
@@ -205,17 +210,26 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {apiGetdeptresponDetail,apiGetindicatorsaveBatchDto, apiGetOrganizationRule,
|
|
|
+import importDailog from '../importPage/importDailog.vue'
|
|
|
+import {apiGetdeptresponDetail,apiGetindicatorsaveBatchDto, apiGetOrganizationRule, apiPostIsdoAction,
|
|
|
apiGetindicatorListAll, apiGetbinstageList, apiGetIndicatorTypeList} from '../../api/api'
|
|
|
+import ExcelJS from 'exceljs'
|
|
|
+import fileSave from 'file-saver'
|
|
|
import addIcon from '../../assets/btnIcon/add.png'
|
|
|
import saveIcon from '../../assets/btnIcon/save.png'
|
|
|
import editIcon from '../../assets/btnIcon/edit.png'
|
|
|
import deleteIcon from '../../assets/btnIcon/delete.png'
|
|
|
+import exportIcon from '../../assets/btnIcon/export.png'
|
|
|
+import importIcon from '../../assets/btnIcon/import.png'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ importDailog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
@@ -237,6 +251,8 @@ export default {
|
|
|
saveIcon: saveIcon,
|
|
|
editIcon: editIcon,
|
|
|
deleteIcon: deleteIcon,
|
|
|
+ exportIcon: exportIcon,
|
|
|
+ importIcon: importIcon,
|
|
|
rowMsg: {},
|
|
|
orgruleData: [],
|
|
|
indicatorTypeData: [],
|
|
@@ -442,7 +458,114 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ examineAndApprove(type) {
|
|
|
+ let that = this
|
|
|
+ let actionCS = ''
|
|
|
+ if (type === 'agree') {
|
|
|
+ if (that.rowMsg.taskType === 'SIGN') {
|
|
|
+ actionCS = 'signAgree'
|
|
|
+ } else if (that.rowMsg.taskType === 'NORMAL') {
|
|
|
+ actionCS = 'agree'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (that.rowMsg.taskType === 'SIGN') {
|
|
|
+ actionCS = 'signReject'
|
|
|
+ } else if (that.rowMsg.taskType === 'NORMAL') {
|
|
|
+ actionCS = 'reject'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let params = {
|
|
|
+ taskId: that.rowMsg.id, //任务ID
|
|
|
+ nodeId: that.rowMsg.nodeId, //节点ID
|
|
|
+ action: actionCS, //固定值
|
|
|
+ instanceId: that.rowMsg.instId, //流程实例ID
|
|
|
+ opinion: that.descMsg, //审批意见
|
|
|
+ iamCode: window.localStorage.getItem('code'), //认证后code值
|
|
|
+ taskName: that.rowMsg.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.dialogVisible = false
|
|
|
+ that.$emit('approveMsg', datas.data.isOk)
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ message: datas.data.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleImport() {
|
|
|
+ this.$refs.importPage.upload.title = "考评目标信息导入"
|
|
|
+ this.$refs.importPage.upload.open = true
|
|
|
+ this.$refs.importPage.upload.url = '/predict/api/smpmc/standardPointManagementImport'
|
|
|
+ this.$refs.importPage.upload.urlName = 'standardPointManagementImport'
|
|
|
+ this.$refs.importPage.upload.proName = '考评目标信息模板.xlsx'
|
|
|
+ },
|
|
|
+ successImport(val) {
|
|
|
+ that.getDetails(that.rowMsg.id)
|
|
|
+ },
|
|
|
+ importLoading(val) {
|
|
|
+
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ let data = [] //接口返回数据
|
|
|
+ const workbook = new ExcelJS.Workbook()
|
|
|
+ const worksheet = workbook.addWorksheet('Sheet1')
|
|
|
+ //根据数据自己调整
|
|
|
+ let colums = []
|
|
|
+ colums = [
|
|
|
+ { header: '单位名称', key: 'organizationName', width: 26 },
|
|
|
+ { header: '指标分类', key: 'typeName', width: 18 },
|
|
|
+ { header: '业务阶段', key: 'stageName', width: 18 },
|
|
|
+ { header: '业务属性', key: 'sectionName', width: 18 },
|
|
|
+ { header: '指标名称', key: 'childName', width: 18 },
|
|
|
+ { header: '填报部门', key: 'deptName', width: 26 },
|
|
|
+ ]
|
|
|
+ if (this.activeName === 'first') {
|
|
|
+ colums.push(
|
|
|
+ { header: '目标值', key: 'quantifiedValue', width: 18 },
|
|
|
+ { header: '单位', key: 'unit', width: 18 },
|
|
|
+ { header: '审核状态', key: 'state', width: 18 }
|
|
|
+ )
|
|
|
+ this.quantifiedList.forEach(item =>{
|
|
|
+ if (item.updateMark) {
|
|
|
+ data.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ colums.push(
|
|
|
+ { header: '值', key: 'nonQuantifiedValue', width: 18 },
|
|
|
+ { header: '审核状态', key: 'state', width: 18 }
|
|
|
+ )
|
|
|
+ this.nonQuantifiedList.forEach(item =>{
|
|
|
+ if (item.updateMark) {
|
|
|
+ data.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ 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>
|
|
@@ -501,10 +624,10 @@ export default {
|
|
|
}
|
|
|
.detaTableBtns{
|
|
|
display: flex;
|
|
|
- width: 200px;
|
|
|
+ width: 250px;
|
|
|
position: relative;
|
|
|
top: 32px;
|
|
|
- left: 80vw;
|
|
|
+ left: 85vw;
|
|
|
z-index: 11111;
|
|
|
.tableBtn {
|
|
|
display: flex;
|
|
@@ -542,6 +665,18 @@ export default {
|
|
|
color: #F65177;
|
|
|
}
|
|
|
}
|
|
|
+ .export{
|
|
|
+ cursor: pointer;
|
|
|
+ span{
|
|
|
+ color: #2baa8a;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .import{
|
|
|
+ cursor: pointer;
|
|
|
+ span{
|
|
|
+ color: #ce1e78;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.el-tabs{
|
|
|
.el-tabs__header{
|