|
@@ -62,6 +62,14 @@
|
|
|
<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="tasktabs" @tab-click="handleClick">
|
|
|
<el-tab-pane label="考评指标项内容" name="first">
|
|
@@ -72,8 +80,8 @@
|
|
|
<el-table-column label="单位名称" prop="organizationName" width="300" />
|
|
|
<el-table-column label="填报部门" prop="deptName" width="260" />
|
|
|
<el-table-column label="指标分类" prop="typeName" />
|
|
|
- <el-table-column label="指标名称" prop="childName" v-if="instanceChild.defKey === 'yddwkplc'" />
|
|
|
- <el-table-column label="指标项" prop="optionName" v-if="instanceChild.defKey === 'yddwkplc'" />
|
|
|
+ <el-table-column label="指标名称" prop="childName" v-if="instanceChild.defKey === 'yddwkplc' || instanceChild.defKey === 'jddwkplc'" />
|
|
|
+ <el-table-column label="指标项" prop="optionName" v-if="instanceChild.defKey === 'yddwkplc' || instanceChild.defKey === 'jddwkplc'" />
|
|
|
<el-table-column label="计划值" width="150">
|
|
|
<template #default="scope">
|
|
|
<el-input-number v-model="scope.row.quantifiedValue"
|
|
@@ -233,10 +241,12 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import importDailog from '../importPage/importDailog.vue'
|
|
|
import {apiGettaskevalStartDetail,apiGettaskmothAyearDetail,apiGetindicatorsaveBatchDto,
|
|
|
apiPostIsdoAction, apiPostgetInstanceAndChildren, apiGetindicatorListAll,apiGetscoreCountList,apiPostScoreCountSave,
|
|
|
apiGetOrganizationRule, apiGetbinstageList, apiGetIndicatorTypeList, apiGetOrgEvaInfoBatchDto} from '../../api/api'
|
|
@@ -246,6 +256,9 @@ import editIcon from '../../assets/btnIcon/edit.png'
|
|
|
import deleteIcon from '../../assets/btnIcon/delete.png'
|
|
|
import { getToken } from '../../api/auth'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ importDailog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
@@ -347,7 +360,7 @@ export default {
|
|
|
let params = {
|
|
|
id: id
|
|
|
}
|
|
|
- if (defKey === 'yddwkplc') {
|
|
|
+ if (defKey === 'yddwkplc' || defKey === 'jddwkplc') {
|
|
|
apiGettaskmothAyearDetail(params).then(datas =>{
|
|
|
that.getDataMsg(defKey, datas)
|
|
|
})
|
|
@@ -582,6 +595,73 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handleImport() {
|
|
|
+ let title = ''
|
|
|
+ let url = ''
|
|
|
+ if (that.instanceChild.defKey === 'yddwkplc' || that.instanceChild.defKey === 'jddwkplc') {
|
|
|
+ title = '月/季度单位信息导入'
|
|
|
+ url = '/organization-evaluation-info/import'
|
|
|
+ } else {
|
|
|
+ title = '考评目标信息导入'
|
|
|
+ url = '/responsibility-indicator-info/import'
|
|
|
+ }
|
|
|
+ this.$refs.importPage.upload.title = title
|
|
|
+ this.$refs.importPage.upload.open = true
|
|
|
+ this.$refs.importPage.upload.url = url
|
|
|
+ },
|
|
|
+ successImport(val) {
|
|
|
+ this.getevalStartDetails(this.rowMsg.id, this.instanceChild.defKey)
|
|
|
+ },
|
|
|
+ handleExport() {
|
|
|
+ let data = [] //接口返回数据
|
|
|
+ const workbook = new ExcelJS.Workbook()
|
|
|
+ const worksheet = workbook.addWorksheet('Sheet1')
|
|
|
+ //根据数据自己调整
|
|
|
+ let colums = []
|
|
|
+ colums = [
|
|
|
+ { header: 'ID', key: 'id', width: 26 },
|
|
|
+ { 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>
|
|
@@ -639,10 +719,10 @@ export default {
|
|
|
}
|
|
|
.detaTableBtns{
|
|
|
display: flex;
|
|
|
- width: 500px;
|
|
|
+ width: 340px;
|
|
|
position: relative;
|
|
|
top: 32px;
|
|
|
- left: 90vw;
|
|
|
+ left: 80vw;
|
|
|
z-index: 11111;
|
|
|
.tableBtn {
|
|
|
display: flex;
|
|
@@ -680,6 +760,18 @@ export default {
|
|
|
color: #F65177;
|
|
|
}
|
|
|
}
|
|
|
+ .export{
|
|
|
+ cursor: pointer;
|
|
|
+ span{
|
|
|
+ color: #2baa8a;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .import{
|
|
|
+ cursor: pointer;
|
|
|
+ span{
|
|
|
+ color: #ce1e78;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.tasktabs{
|
|
|
.el-tabs__header{
|