Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 216 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,174 @@ |
|||||
|
<template> |
||||
|
<BasicModal v-bind="$attrs" @register="registerModal" :title="ismodify ? '修改项目考核' : '新增项目考核'" width="1200px" |
||||
|
:showOkBtn="false" :showCancelBtn="false"> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #selfScores="{ record }"> |
||||
|
<div v-if="isShowByRoles('projectContact') && record.scores != null"> |
||||
|
<a-row> |
||||
|
<a-col :span="12"> |
||||
|
<a-input-number v-model="record.selfScores" style="width: 100%; " min="0" :max=record.scores /> |
||||
|
</a-col> |
||||
|
<a-col :span="12"> |
||||
|
<!-- <el-button type="primary" size="small" @click="(record) => { record.selfScores = 0 }" |
||||
|
style="width: 100%; margin-left: 5px;"> |
||||
|
上传文件a |
||||
|
</el-button> --> |
||||
|
<el-upload v-if="ismodify" class="upload-demo" ref="upload" action :http-request="(file) => { return httpRequest(file, record.id,record.selfScores) }" |
||||
|
:before-upload="beforeUpload" :on-exceed="handleExceed" :limit="1" :show-file-list="false" style="width: 100%;"> |
||||
|
<el-button slot="trigger" size="small" type="primary" style="width: 80%;font-size: 10px; ">上传文件</el-button> |
||||
|
</el-upload> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
{{ record.selfScores }} |
||||
|
</div> |
||||
|
<a-row> |
||||
|
<!-- <a-divider orientation="left" orientation-margin="0px" style="font-size: small;">文件信息</a-divider> --> |
||||
|
<!-- {{ record.filename }} --> |
||||
|
<a @click="handledown(record)">{{ record.documentName }}</a> |
||||
|
</a-row> |
||||
|
</template> |
||||
|
<template #pscores="{ record }"> |
||||
|
<div v-if="isShowByRoles('manageOrg') && record.scores != null"> |
||||
|
<a-row> |
||||
|
<a-col :span="12"> |
||||
|
<el-input v-model="record.pscores" style="width: 100%; " type="number" min="0" :max=record.scores /> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</div> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<div style="display: flex; justify-content: center; align-items: center; height: 100px;"> |
||||
|
<el-button type="primary" @click="add" size="large">提交</el-button> |
||||
|
<el-button @click="close" size="large">取消</el-button> |
||||
|
|
||||
|
</div> |
||||
|
</BasicModal> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="addProjectAssessment" setup> |
||||
|
//ts语法 |
||||
|
import { ref, onMounted, defineEmits } from 'vue'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
||||
|
import { isShowByRoles } from '@/views/projectLib/projectInfo/projectInfo.api'; |
||||
|
|
||||
|
import { addProjectassessment, modifyProjectassessment, getProjectassessmentByprojectId,uploadProjectassessmentFile } from '@/views/performanceIndicator/projectAssessment/projectAssessment.api'; |
||||
|
import { templateContentColumns } from '@/views/performanceIndicator/templateContent/templateContent.data'; |
||||
|
import { getPerformancescore } from '@/views/performanceIndicator/templateContent/templateContent.api' |
||||
|
import { cloneDeep } from 'lodash-es'; |
||||
|
import{ElMessage,UploadInstance} from 'element-plus' |
||||
|
import { downloadFile } from "@/api/common/api" |
||||
|
|
||||
|
const [registerModal, { closeModal }] = useModalInner(init); |
||||
|
let projectid = ref(null); |
||||
|
let type = ref(null); |
||||
|
let ismodify = ref(false); |
||||
|
const upload = ref<UploadInstance>() |
||||
|
let emit = defineEmits(["close"]) |
||||
|
|
||||
|
|
||||
|
async function init(data) { |
||||
|
console.log("datadatadata", data) |
||||
|
let columnsTemp = cloneDeep(templateContentColumns) |
||||
|
setColumns(columnsTemp) |
||||
|
if (data.projectid) { |
||||
|
projectid.value = data.projectid |
||||
|
type.value = data.type |
||||
|
ismodify.value = data.ismodify |
||||
|
} |
||||
|
if (data.ismodify) { |
||||
|
setProps({ api: getProjectassessmentByprojectId }) |
||||
|
reload() |
||||
|
} |
||||
|
} |
||||
|
const [registerTable, { getDataSource, setProps, reload, setColumns }] = useTable({ |
||||
|
api: getPerformancescore, |
||||
|
columns: templateContentColumns, |
||||
|
useSearchForm: false, |
||||
|
pagination: false, |
||||
|
// actionColumn: { |
||||
|
// width: 140, |
||||
|
// title: '操作', |
||||
|
// dataIndex: 'action', |
||||
|
// slots: { customRender: 'action' }, |
||||
|
// }, |
||||
|
beforeFetch(params) { |
||||
|
params.projectId = projectid.value |
||||
|
params.type = type.value |
||||
|
}, |
||||
|
afterFetch: (data) => { |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
// formConfig: { |
||||
|
// schemas: searchFormSchema, |
||||
|
// } |
||||
|
|
||||
|
}); |
||||
|
function close() { |
||||
|
closeModal(); |
||||
|
} |
||||
|
async function add() { |
||||
|
let tableData = await getDataSource() |
||||
|
tableData.forEach(item => { |
||||
|
item.projectId = projectid.value |
||||
|
item.type = type.value |
||||
|
}) |
||||
|
if (ismodify.value) { |
||||
|
await modifyProjectassessment(tableData) |
||||
|
console.log("修改", tableData) |
||||
|
|
||||
|
} else { |
||||
|
await addProjectassessment(tableData) |
||||
|
console.log("新增", tableData) |
||||
|
|
||||
|
} |
||||
|
closeModal(); |
||||
|
emit("close") |
||||
|
|
||||
|
} |
||||
|
// 覆盖默认的上传行为,可以自定义上传的实现,将上传的文件依次添加到fileList数组中,支持多个文件 |
||||
|
async function httpRequest(option,id,selfScores) { |
||||
|
const params = new FormData() |
||||
|
params.append('file', option.file) |
||||
|
params.append('id',id) |
||||
|
params.append('selfScores',selfScores) |
||||
|
upload.value?.clearFiles() |
||||
|
|
||||
|
await uploadProjectassessmentFile(params) |
||||
|
ElMessage.success('上传成功') |
||||
|
reload() |
||||
|
return true |
||||
|
} |
||||
|
// 上传前处理 |
||||
|
function beforeUpload(file) { |
||||
|
// let fileSize = file.size |
||||
|
// const FIVE_M = 10 * 1024 * 1024; |
||||
|
// //大于5M,不允许上传 |
||||
|
// if (fileSize > FIVE_M) { |
||||
|
// ElMessage.error("最大上传10M") |
||||
|
// return false |
||||
|
// } |
||||
|
|
||||
|
return true |
||||
|
} |
||||
|
// 文件数量过多时提醒 |
||||
|
function handleExceed() { |
||||
|
ElMessage.warning("最多只能上传一个文件") |
||||
|
} |
||||
|
function handledown(record) { |
||||
|
console.log("我这一行的数据是", record) |
||||
|
let param = { |
||||
|
path: record.documentPath, |
||||
|
fileName: record.documentName |
||||
|
} |
||||
|
// |
||||
|
console.log("我这一行的数据是", param) |
||||
|
|
||||
|
downloadFile("/huzhouUploadfileinfo/downloadfile", record.documentName, param) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,58 @@ |
|||||
|
<template> |
||||
|
<BasicModal v-bind="$attrs" @register="registerModal" title="查看项目考核" width="1200px" :showOkBtn="false"> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
</BasicTable> |
||||
|
</BasicModal> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="addProjectAssessment" setup> |
||||
|
//ts语法 |
||||
|
import { ref } from 'vue'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
||||
|
|
||||
|
import { getProjectassessmentByprojectId } from '@/views/performanceIndicator/projectAssessment/projectAssessment.api'; |
||||
|
import { templateContentColumns } from '@/views/performanceIndicator/templateContent/templateContent.data'; |
||||
|
const [registerModal, { closeModal }] = useModalInner(init); |
||||
|
let projectid = ref(null); |
||||
|
let type = ref(null); |
||||
|
async function init(data) { |
||||
|
console.log("datadatadata", data) |
||||
|
if (data.projectid) { |
||||
|
projectid.value = data.projectid |
||||
|
type.value = data.type |
||||
|
} |
||||
|
} |
||||
|
const [registerTable] = useTable({ |
||||
|
api: getProjectassessmentByprojectId, |
||||
|
columns: templateContentColumns, |
||||
|
useSearchForm: false, |
||||
|
pagination:false, |
||||
|
// actionColumn: { |
||||
|
// width: 140, |
||||
|
// title: '操作', |
||||
|
// dataIndex: 'action', |
||||
|
// slots: { customRender: 'action' }, |
||||
|
// }, |
||||
|
beforeFetch(params) { |
||||
|
params.projectId = projectid.value |
||||
|
}, |
||||
|
afterFetch: (data) => { |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
// formConfig: { |
||||
|
// schemas: searchFormSchema, |
||||
|
// } |
||||
|
|
||||
|
}); |
||||
|
function close() { |
||||
|
closeModal(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,136 @@ |
|||||
|
<template> |
||||
|
<PageWrapper dense> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #action="{ record }"> |
||||
|
<!-- <TableAction :actions="getTableAction(record)" /> --> |
||||
|
<TableAction :actions="getTableAction(record)" /> |
||||
|
</template> |
||||
|
<template #tableTitle> |
||||
|
<el-button type="primary" @click="handleAddcontract" v-if="isShowByRoles('projectContact')"> |
||||
|
新增项目考核</el-button> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<ProjectinfoComponent @register="registerProjectinfo" |
||||
|
@openChildModal="openModalProjectr"> |
||||
|
<template #default> |
||||
|
<addProjectAssessment @register="registerProjectAssessment" @close="closeModel" /> |
||||
|
</template> |
||||
|
</ProjectinfoComponent> |
||||
|
<addProjectAssessment @register="registerProjectAssessment" @close="closeModel" /> |
||||
|
<detailTabel @register="registerDetailTable" /> |
||||
|
</PageWrapper> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="system-user" setup> |
||||
|
//ts语法 |
||||
|
import { ref } from "vue" |
||||
|
import { ActionItem, BasicTable, TableAction, useTable } from '@/components/Table'; |
||||
|
import { useModal } from '@/components/Modal'; |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
|
||||
|
import { isShowByRoles } from '@/views/projectLib/projectInfo/projectInfo.api'; |
||||
|
import { searchFormSchema } from '@/views/projectLib/projectInfo/projectInfo.data'; |
||||
|
import { getProjectassessmentPageList,getProjectassessmentProjectPageList ,deleteProjectassessment} from '@/views/performanceIndicator/projectAssessment/projectAssessment.api'; |
||||
|
import { projectAssessmentColumns } from '@/views/performanceIndicator/projectAssessment/projectAssessment.data'; |
||||
|
import detailTabel from './detailTabel.vue' |
||||
|
import ProjectinfoComponent from '@/views/ProcessApprovalSubPage/component/ProjectinfoComponent.vue' |
||||
|
import addProjectAssessment from './addProjectAssessment.vue' |
||||
|
const [registerProjectAssessment, { openModal: openModalProjectAssessment, closeModal: closeModalProjectAssessment }] = useModal(); |
||||
|
const [registerProjectinfo, { openModal: openModalProjectinfo, closeModal: closeModalProjectinfo }] = useModal(); |
||||
|
const [registerDetailTable, { openModal: openModalDetailTable }] = useModal(); |
||||
|
|
||||
|
let projectid = ref() |
||||
|
const [registerTable, { reload }] = useTable({ |
||||
|
title: '合同信息', |
||||
|
api: getProjectassessmentPageList, |
||||
|
columns: projectAssessmentColumns, |
||||
|
useSearchForm: true, |
||||
|
rowKey: "id", |
||||
|
showIndexColumn: false, |
||||
|
actionColumn: { |
||||
|
width: 140, |
||||
|
title: '操作', |
||||
|
dataIndex: 'action', |
||||
|
slots: { customRender: 'action' }, |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
formConfig: { |
||||
|
schemas: searchFormSchema, |
||||
|
|
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
function getTableAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '详情', |
||||
|
ifShow: () => { |
||||
|
return isShowByRoles("projectContact,manageOrg") && (record.children == null || record.projectId != null) |
||||
|
}, |
||||
|
onClick: handledetail.bind(null, record), |
||||
|
}, |
||||
|
{ |
||||
|
label: '编辑', |
||||
|
ifShow: () => { |
||||
|
return isShowByRoles("projectContact,manageOrg") && (record.children == null || record.projectId != null) |
||||
|
}, |
||||
|
onClick: handleModify.bind(null, record), |
||||
|
}, |
||||
|
|
||||
|
// { |
||||
|
// label: '删除', |
||||
|
// ifShow: () => { |
||||
|
// return isShowByRoles("manageOrg") && (record.children == null || record.projectId != null) |
||||
|
// }, |
||||
|
// popConfirm: { |
||||
|
// title: '确定删除吗?', |
||||
|
// confirm: handleDelete.bind(null, record), |
||||
|
// }, |
||||
|
// } |
||||
|
|
||||
|
]; |
||||
|
} |
||||
|
function handledetail(record) { |
||||
|
openModalDetailTable(true, { projectid: record.projectId }) |
||||
|
} |
||||
|
/** |
||||
|
* 修改 |
||||
|
*/ |
||||
|
function handleModify(record) { |
||||
|
console.log(record, projectid.value) |
||||
|
openModalProjectAssessment(true, { projectid: record.projectId, type: record.type,ismodify:true }) |
||||
|
|
||||
|
} |
||||
|
/** |
||||
|
* 新增 |
||||
|
*/ |
||||
|
function openModalProjectr(value) { |
||||
|
console.log("proidproid", value) |
||||
|
let type="1" |
||||
|
if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("医院")!=-1){ |
||||
|
type="2" |
||||
|
}else if(value.superLeader=="5"&&value.dutyWorkplace.indexOf("卫生健康")!=-1){ |
||||
|
type="1" |
||||
|
}else{ |
||||
|
return; |
||||
|
} |
||||
|
openModalProjectAssessment(true, { projectid: value.id,type: type,ismodify:false }) |
||||
|
} |
||||
|
async function handleDelete(record) { |
||||
|
await deleteProjectassessment({ projectId: record.projectId}) |
||||
|
reload() |
||||
|
} |
||||
|
|
||||
|
function closeModel() { |
||||
|
closeModalProjectAssessment() |
||||
|
closeModalProjectinfo() |
||||
|
reload() |
||||
|
} |
||||
|
function handleAddcontract(record) { |
||||
|
openModalProjectinfo(true,{title:'新增项目考核' ,api:getProjectassessmentProjectPageList ,stage:6}) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped></style> |
@ -0,0 +1,26 @@ |
|||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
export enum Api { |
||||
|
|
||||
|
addProjectassessment = '/huzhouProjectassessment/addProjectassessment', |
||||
|
modifyProjectassessment='/huzhouProjectassessment/modifyProjectassessment', |
||||
|
getProjectassessmentPageList = '/huzhouProjectassessment/getProjectassessmentPageList', |
||||
|
getProjectassessmentProjectPageList='/huzhouProjectassessment/getProjectassessmentProjectPageList', |
||||
|
deleteProjectassessment="/huzhouProjectassessment/deleteProjectassessment", |
||||
|
getProjectassessmentByprojectId="/huzhouProjectassessment/getProjectassessmentByprojectId", |
||||
|
uploadProjectassessmentFile="/huzhouProjectassessment/uploadProjectassessmentFile", |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 职务list |
||||
|
*/ |
||||
|
export const addProjectassessment = (params?) => defHttp.post({ url: Api.addProjectassessment, params }); |
||||
|
export const modifyProjectassessment = (params?) => defHttp.post({ url: Api.modifyProjectassessment, params }); |
||||
|
export const deleteProjectassessment = (params?) => defHttp.post({ url: Api.deleteProjectassessment, params }); |
||||
|
export const getProjectassessmentByprojectId = (params?) => defHttp.get({ url: Api.getProjectassessmentByprojectId, params }); |
||||
|
export const getProjectassessmentPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentPageList, params }); |
||||
|
|
||||
|
|
||||
|
export const getProjectassessmentProjectPageList = (params?) => defHttp.get({ url: Api.getProjectassessmentProjectPageList, params }); |
||||
|
export const uploadProjectassessmentFile = (params?) =>defHttp.post({ url: Api.uploadProjectassessmentFile,headers:{ "Content-Type": "multipart/form-data" }, params }) |
@ -0,0 +1,200 @@ |
|||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { el } from 'element-plus/es/locale'; |
||||
|
// export const showDetailColumns: BasicColumn[] = [
|
||||
|
// {
|
||||
|
// title: '评价维度',
|
||||
|
// width: 150,
|
||||
|
// dataIndex: 'evaluationDimension',
|
||||
|
// customRender: ({ text, record, index }) => {
|
||||
|
// const obj = {
|
||||
|
// children: text,
|
||||
|
// props: {} as any,
|
||||
|
// };
|
||||
|
// if (record.evaluationLength != null && record.evaluationLength != 0) {
|
||||
|
// obj.props.rowSpan = record.evaluationLength
|
||||
|
// } else {
|
||||
|
// obj.props.rowSpan = 0
|
||||
|
// }
|
||||
|
// return obj
|
||||
|
// },
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '一级指标',
|
||||
|
// dataIndex: 'primaryIndicator',
|
||||
|
// customRender: ({ text, record, index }) => {
|
||||
|
// const obj = {
|
||||
|
// children: text,
|
||||
|
// props: {} as any,
|
||||
|
// };
|
||||
|
// if (record.primaryLength != null && record.primaryLength != 0) {
|
||||
|
// obj.props.rowSpan = record.primaryLength
|
||||
|
// }
|
||||
|
// else {
|
||||
|
// obj.props.rowSpan = 0
|
||||
|
// }
|
||||
|
// return obj
|
||||
|
// },
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '二级指标',
|
||||
|
// dataIndex: 'secondaryIndicator',
|
||||
|
// customRender: ({ text, record, index }) => {
|
||||
|
// const obj = {
|
||||
|
// children: text,
|
||||
|
// props: {} as any,
|
||||
|
// };
|
||||
|
// if (record.secondaryLength != null) {
|
||||
|
// obj.props.rowSpan = record.secondaryLength
|
||||
|
// }
|
||||
|
// else {
|
||||
|
// obj.props.rowSpan = 0
|
||||
|
// }
|
||||
|
// return obj
|
||||
|
// },
|
||||
|
// },
|
||||
|
|
||||
|
// {
|
||||
|
// title: '三级指标',
|
||||
|
// dataIndex: 'tertiaryIndicator',
|
||||
|
// customRender: ({ text, record, index }) => {
|
||||
|
// const obj = {
|
||||
|
// children: text,
|
||||
|
// props: {} as any,
|
||||
|
// };
|
||||
|
// if (record.tertiaryLength != null) {
|
||||
|
// obj.props.rowSpan = record.tertiaryLength
|
||||
|
// }
|
||||
|
// else {
|
||||
|
// obj.props.rowSpan = 0
|
||||
|
// }
|
||||
|
// return obj
|
||||
|
// },
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '描述',
|
||||
|
// resizable: true,
|
||||
|
// ellipsis: false,
|
||||
|
// dataIndex: 'description',
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '分数',
|
||||
|
// fixed: 'right',
|
||||
|
// dataIndex: 'scores',
|
||||
|
// width: 80,
|
||||
|
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '自我评分',
|
||||
|
// width: 80,
|
||||
|
// dataIndex: 'selfScores',
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '系统评分',
|
||||
|
// dataIndex: 'sysscores',
|
||||
|
// fixed: 'right',
|
||||
|
// width: 80,
|
||||
|
// },
|
||||
|
// {
|
||||
|
// title: '管理评分',
|
||||
|
// fixed: 'right',
|
||||
|
// width: 80,
|
||||
|
// dataIndex: 'pscores',
|
||||
|
// }
|
||||
|
// ]
|
||||
|
export const projectAssessmentColumns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '项目编号', |
||||
|
width: 150, |
||||
|
dataIndex: 'projectId', |
||||
|
ifShow: false, |
||||
|
}, |
||||
|
{ |
||||
|
title: '项目名称', |
||||
|
dataIndex: 'projectName', |
||||
|
width: 300, |
||||
|
resizable: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '行政区划', |
||||
|
dataIndex: 'adminDivision', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '责任单位', |
||||
|
dataIndex: 'dutyWorkplace', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '单位属性', |
||||
|
dataIndex: 'workplaceProperties', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '改革所属项目', |
||||
|
dataIndex: 'reformName', |
||||
|
format: 'dict|reformTasks', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '上级指导处室', |
||||
|
dataIndex: 'superLeader', |
||||
|
format: 'dict|superLeader', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '系统评分总分', |
||||
|
dataIndex: 'totalSysscores', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '管理人员评分总分', |
||||
|
dataIndex: 'totalPscores', |
||||
|
resizable: true |
||||
|
}, |
||||
|
{ |
||||
|
title: '总得分', |
||||
|
dataIndex: 'totalScores', |
||||
|
resizable: true |
||||
|
}, |
||||
|
]; |
||||
|
export const projectInfoHistoryDetailColumns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '字段名称', |
||||
|
width: 150, |
||||
|
dataIndex: 'fieldName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '字段修改次数', |
||||
|
dataIndex: 'fieldTotal', |
||||
|
}, |
||||
|
{ |
||||
|
title: '新值', |
||||
|
dataIndex: 'newvalue', |
||||
|
}, |
||||
|
{ |
||||
|
title: '旧值', |
||||
|
dataIndex: 'oldvalue', |
||||
|
}, |
||||
|
{ |
||||
|
title: '修改时间', |
||||
|
dataIndex: 'createDate', |
||||
|
}, |
||||
|
] |
||||
|
|
||||
|
export const searchFormSchema: FormSchema[] = [ |
||||
|
{ |
||||
|
label: '项目名称', |
||||
|
field: 'projectName', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '项目编号', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
} |
||||
|
|
||||
|
]; |
||||
|
|
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<BasicModal v-bind="$attrs" @register="registerModal" title="详情" width="1200px" :showOkBtn="false"> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
</BasicTable> |
||||
|
</BasicModal> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="detailTemplateContent" setup> |
||||
|
//ts语法 |
||||
|
import { ref } from 'vue'; |
||||
|
import { BasicTable, useTable } from '@/components/Table'; |
||||
|
|
||||
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
||||
|
|
||||
|
import { performancescoreColumns } from './templateContent.data'; |
||||
|
import { getPerformancescore } from './templateContent.api' |
||||
|
const [registerModal, { closeModal }] = useModalInner(init); |
||||
|
|
||||
|
let type = ref() |
||||
|
function init(props) { |
||||
|
type.value = props.type |
||||
|
} |
||||
|
const [registerTable] = useTable({ |
||||
|
api: getPerformancescore, |
||||
|
columns: performancescoreColumns, |
||||
|
useSearchForm: false, |
||||
|
pagination:false, |
||||
|
// actionColumn: { |
||||
|
// width: 140, |
||||
|
// title: '操作', |
||||
|
// dataIndex: 'action', |
||||
|
// slots: { customRender: 'action' }, |
||||
|
// }, |
||||
|
beforeFetch(params) { |
||||
|
params.type = type.value |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
// formConfig: { |
||||
|
// schemas: searchFormSchema, |
||||
|
// } |
||||
|
|
||||
|
}); |
||||
|
function close() { |
||||
|
closeModal(); |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,81 @@ |
|||||
|
<template> |
||||
|
|
||||
|
<PageWrapper dense> |
||||
|
<!--引用表格--> |
||||
|
<BasicTable @register="registerTable"> |
||||
|
<template #action="{ record }"> |
||||
|
<TableAction :actions="getTableAction(record)" /> |
||||
|
</template> |
||||
|
</BasicTable> |
||||
|
<detailTemplateContent @register="registerDetail" /> |
||||
|
<modify @register="registerModify" @close="closeModel"/> |
||||
|
</PageWrapper> |
||||
|
|
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" name="planSummary" setup> |
||||
|
//ts语法 |
||||
|
import { BasicTable, useTable ,ActionItem,TableAction} from '@/components/Table'; |
||||
|
import { PageWrapper } from '@/components/Page'; |
||||
|
import { useModal } from '@/components/Modal'; |
||||
|
|
||||
|
import { isShowByRoles } from '@/views/projectLib/projectInfo/projectInfo.api'; |
||||
|
import detailTemplateContent from './detailTemplateContent.vue' |
||||
|
import modify from './modify.vue' |
||||
|
import { PerformanColumns } from './templateContent.data'; |
||||
|
import { getPerforman } from './templateContent.api' |
||||
|
const [registerDetail, { openModal: openModalDetail }] = useModal(); |
||||
|
const [registerModify, { openModal: openModalModify, closeModal: closeModalModify }] = useModal(); |
||||
|
|
||||
|
|
||||
|
const [registerTable,{reload}] = useTable({ |
||||
|
api: getPerforman, |
||||
|
columns: PerformanColumns, |
||||
|
useSearchForm: false, |
||||
|
pagination:false, |
||||
|
actionColumn: { |
||||
|
width: 140, |
||||
|
title: '操作', |
||||
|
dataIndex: 'action', |
||||
|
slots: { customRender: 'action' }, |
||||
|
}, |
||||
|
afterFetch: (data) => { |
||||
|
}, |
||||
|
//表单查询项设置 |
||||
|
// formConfig: { |
||||
|
// schemas: searchFormSchema, |
||||
|
// } |
||||
|
|
||||
|
}); |
||||
|
function getTableAction(record): ActionItem[] { |
||||
|
return [ |
||||
|
{ |
||||
|
label: '详情', |
||||
|
onClick: handledetail.bind(null, record), |
||||
|
}, |
||||
|
// { |
||||
|
// label: '修改', |
||||
|
// ifShow: () => { |
||||
|
// return isShowByRoles("manageOrg") |
||||
|
// }, |
||||
|
// onClick: handleModify.bind(null, record), |
||||
|
// }, |
||||
|
]; |
||||
|
} |
||||
|
function handledetail(record) { |
||||
|
openModalDetail(true,{type:record.type}) |
||||
|
console.log(record) |
||||
|
} |
||||
|
// function handleModify(record) { |
||||
|
// openModalModify(true,{type:record.type}) |
||||
|
// console.log(record) |
||||
|
// } |
||||
|
function closeModel() { |
||||
|
closeModalModify() |
||||
|
reload() |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,115 @@ |
|||||
|
<template> |
||||
|
<BasicModal v-bind="$attrs" @register="registerModal" title="修改" width="1200px" :showOkBtn="false"> |
||||
|
|
||||
|
<!-- 自定义表单 --> |
||||
|
<el-divider content-position="left">模板表格文件下载</el-divider> |
||||
|
<div style="padding-left: 40px;"> |
||||
|
<el-button slot="trigger" type="primary" @click="downexcel">下载模板</el-button> |
||||
|
</div> |
||||
|
<el-divider content-position="left">上传表格文件</el-divider> |
||||
|
<el-form ref="importFormRef"> |
||||
|
<el-form-item label="上传文件:"> |
||||
|
<el-upload class="upload-demo" ref="upload" action :http-request="httpRequest" :before-upload="beforeUpload" |
||||
|
:on-exceed="handleExceed" :limit="1" accept=".xls, .xlsx"> |
||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
|
<div slot="tip" class="el-upload__tip">只能上传excel文件且不超过5M</div> |
||||
|
</el-upload> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="submitImportForm">开始导入</el-button> |
||||
|
<el-button type="info" @click="dialogVisible">关闭窗口</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</BasicModal> |
||||
|
|
||||
|
</template> |
||||
|
<script lang="ts" name="uploadFile" setup> |
||||
|
import { reactive, ref ,defineEmits} from 'vue' |
||||
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
||||
|
|
||||
|
import { importPerformancescore } from './templateContent.api'; |
||||
|
import { ElMessage } from 'element-plus' |
||||
|
import { downloadFile } from "@/api/common/api" |
||||
|
const [registerModal, { closeModal }] = useModalInner(init); |
||||
|
let emit = defineEmits(['close']) |
||||
|
let type = ref() |
||||
|
let fileList = reactive<Array<any>>([]); |
||||
|
function downexcel(){ |
||||
|
let param = { |
||||
|
path: "Resources/考核模板.xlsx", |
||||
|
fileName: "考核模板.xlsx" |
||||
|
} |
||||
|
downloadFile("/huzhouUploadfileinfo/downloadfile", "考核模板.xlsx", param) |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function init(params) { |
||||
|
type.value = params.type |
||||
|
} |
||||
|
|
||||
|
function httpRequest(option) { |
||||
|
fileList.pop() |
||||
|
fileList.push(option) |
||||
|
} |
||||
|
// 上传前处理 |
||||
|
function beforeUpload(file) { |
||||
|
let fileSize = file.size |
||||
|
const FIVE_M = 5 * 1024 * 1024; |
||||
|
//大于5M,不允许上传 |
||||
|
if (fileSize > FIVE_M) { |
||||
|
ElMessage.error("最大上传5M") |
||||
|
return false |
||||
|
} |
||||
|
//判断文件类型,必须是xlsx格式 |
||||
|
|
||||
|
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1); |
||||
|
|
||||
|
let whiteList = ["xls", "xlsx"]; |
||||
|
|
||||
|
if (whiteList.indexOf(fileSuffix) === -1) { |
||||
|
ElMessage.error('上传文件只能是xls、xlsx格式'); |
||||
|
return false; |
||||
|
} |
||||
|
// let fileName = file.name |
||||
|
// let reg = /^.+(\.xlsx)$/ |
||||
|
// if(!reg.test(fileName)){ |
||||
|
// ElMessage.error("只能上传xlsx!") |
||||
|
// return false |
||||
|
// } |
||||
|
return true |
||||
|
} |
||||
|
// 文件数量过多时提醒 |
||||
|
function handleExceed() { |
||||
|
ElMessage.warning("最多只能上传一个文件") |
||||
|
} |
||||
|
//导入Excel病种信息数据 |
||||
|
async function submitImportForm() { |
||||
|
// console.log("datadatadatadatadatadata", data) |
||||
|
// if (data.stage != 2) { |
||||
|
// ElMessage({ |
||||
|
// message: "当前阶段无法上传文件", |
||||
|
// type: "error" |
||||
|
// }) |
||||
|
// return |
||||
|
// } |
||||
|
// // 使用form表单的数据格式 |
||||
|
const params = new FormData() |
||||
|
// 将上传文件数组依次添加到参数paramsData中 |
||||
|
// fileList.forEach((x) => { |
||||
|
// console.log("xxxxxxxxxx", x, x.file) |
||||
|
|
||||
|
// }); |
||||
|
params.append('file', fileList[0].file) |
||||
|
params.append('type', type.value) |
||||
|
|
||||
|
//这里根据自己封装的axios来进行调用后端接口 |
||||
|
await importPerformancescore(params).then(() => { |
||||
|
}) |
||||
|
emit('close') |
||||
|
|
||||
|
} |
||||
|
function dialogVisible() { |
||||
|
closeModal() |
||||
|
} |
||||
|
</script> |
||||
|
<style></style> |
@ -0,0 +1,19 @@ |
|||||
|
import { defHttp } from '@/utils/http/axios'; |
||||
|
|
||||
|
export enum Api { |
||||
|
|
||||
|
importPerformancescore = '/huzhouPerformancescore/importPerformancescore', |
||||
|
getPerformancescore = '/huzhouPerformancescore/getPerformancescore', |
||||
|
getPerforman="/huzhouPerformancescore/getPerforman", |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 职务list |
||||
|
*/ |
||||
|
export const importPerformancescore = (params?) =>defHttp.post({ url: Api.importPerformancescore,headers:{ "Content-Type": "multipart/form-data" }, params }) |
||||
|
|
||||
|
export const getPerformancescore = (params?) => defHttp.get({ url: Api.getPerformancescore, params }); |
||||
|
export const getPerforman = (params?) => defHttp.get({ url: Api.getPerforman, params }); |
||||
|
|
||||
|
|
@ -0,0 +1,260 @@ |
|||||
|
import { FormSchema } from '@/components/Form'; |
||||
|
import { BasicColumn } from '@/components/Table'; |
||||
|
import { useDictStore } from '@/store/modules/dict'; |
||||
|
|
||||
|
// let manageOrgDict = await getWorkPlaceTypeDict({ workPlaceType: "1" })
|
||||
|
// let supervisorDict = await getWorkPlaceTypeDict({ workPlaceType: "2" })
|
||||
|
// let contructorDict = await getWorkPlaceTypeDict({ workPlaceType: "4" })
|
||||
|
// let ownerDict = await getWorkPlaceTypeDict({ workPlaceType: "3" })
|
||||
|
// let controlerDict = await getWorkPlaceTypeDict({ workPlaceType: "6" })
|
||||
|
// let consultDict = await getWorkPlaceTypeDict({ workPlaceType: "5" })
|
||||
|
// let manageOrgDict = []
|
||||
|
// let supervisorDict = []
|
||||
|
// let contructorDict = []
|
||||
|
// let ownerDict = []
|
||||
|
// let controlerDict = []
|
||||
|
// let consultDict = []
|
||||
|
|
||||
|
|
||||
|
export const templateContentColumns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '评价维度', |
||||
|
width: 120, |
||||
|
dataIndex: 'evaluationDimension', |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.evaluationLength != null && record.evaluationLength != 0) { |
||||
|
obj.props.rowSpan = record.evaluationLength |
||||
|
} else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '一级指标', |
||||
|
dataIndex: 'primaryIndicator', |
||||
|
width: 120, |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.primaryLength != null && record.primaryLength != 0) { |
||||
|
obj.props.rowSpan = record.primaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '二级指标', |
||||
|
width: 120, |
||||
|
|
||||
|
dataIndex: 'secondaryIndicator', |
||||
|
|
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.secondaryLength != null) { |
||||
|
obj.props.rowSpan = record.secondaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
title: '三级指标', |
||||
|
width: 120, |
||||
|
|
||||
|
dataIndex: 'tertiaryIndicator', |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.tertiaryLength != null) { |
||||
|
obj.props.rowSpan = record.tertiaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '描述', |
||||
|
resizable:true, |
||||
|
|
||||
|
ellipsis:false, |
||||
|
dataIndex: 'description', |
||||
|
}, |
||||
|
{ |
||||
|
title: '分数', |
||||
|
width:80, |
||||
|
|
||||
|
dataIndex: 'scores', |
||||
|
}, |
||||
|
{ |
||||
|
title: '系统评分', |
||||
|
width:120, |
||||
|
dataIndex: 'sysscores', |
||||
|
}, |
||||
|
{ |
||||
|
title: '自我评分', |
||||
|
width: 120, |
||||
|
dataIndex: 'selfScores', |
||||
|
slots: { customRender: 'selfScores' }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '管理评分', |
||||
|
width:120, |
||||
|
dataIndex: 'pscores', |
||||
|
slots: { customRender: 'pscores' }, |
||||
|
} |
||||
|
|
||||
|
]; |
||||
|
export const performancescoreColumns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: '评价维度', |
||||
|
width: 150, |
||||
|
dataIndex: 'evaluationDimension', |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.evaluationLength != null && record.evaluationLength != 0) { |
||||
|
obj.props.rowSpan = record.evaluationLength |
||||
|
} else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '一级指标', |
||||
|
dataIndex: 'primaryIndicator', |
||||
|
width: 150, |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.primaryLength != null && record.primaryLength != 0) { |
||||
|
obj.props.rowSpan = record.primaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '二级指标', |
||||
|
width: 150, |
||||
|
|
||||
|
dataIndex: 'secondaryIndicator', |
||||
|
|
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.secondaryLength != null) { |
||||
|
obj.props.rowSpan = record.secondaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
title: '三级指标', |
||||
|
width: 150, |
||||
|
|
||||
|
dataIndex: 'tertiaryIndicator', |
||||
|
customRender: ({ text, record, index }) => { |
||||
|
const obj = { |
||||
|
children: text, |
||||
|
props: {} as any, |
||||
|
}; |
||||
|
if (record.tertiaryLength != null) { |
||||
|
obj.props.rowSpan = record.tertiaryLength |
||||
|
} |
||||
|
else { |
||||
|
obj.props.rowSpan = 0 |
||||
|
} |
||||
|
return obj |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '描述', |
||||
|
resizable:true, |
||||
|
|
||||
|
ellipsis:false, |
||||
|
dataIndex: 'description', |
||||
|
}, |
||||
|
{ |
||||
|
title: '分数', |
||||
|
width:80, |
||||
|
|
||||
|
dataIndex: 'scores', |
||||
|
}, |
||||
|
|
||||
|
]; |
||||
|
export const PerformanColumns: BasicColumn[] = [ |
||||
|
{ |
||||
|
title: 'id', |
||||
|
width: 80, |
||||
|
dataIndex: 'id', |
||||
|
}, |
||||
|
{ |
||||
|
title: '考核名称', |
||||
|
width: 150, |
||||
|
dataIndex: 'name', |
||||
|
}, |
||||
|
{ |
||||
|
title: '上级指导室', |
||||
|
dataIndex: 'superLeader', |
||||
|
}, |
||||
|
{ |
||||
|
title: '责任单位', |
||||
|
dataIndex: 'dutyWorkplace', |
||||
|
}, |
||||
|
{ |
||||
|
title: '总分', |
||||
|
dataIndex: 'total', |
||||
|
}, |
||||
|
|
||||
|
] |
||||
|
|
||||
|
|
||||
|
export const searchFormSchema: FormSchema[] = [ |
||||
|
{ |
||||
|
label: '项目名称', |
||||
|
field: 'projectName', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
}, |
||||
|
{ |
||||
|
label: '项目编号', |
||||
|
field: 'projectId', |
||||
|
component: 'Input', |
||||
|
//colProps: { span: 6 },
|
||||
|
} |
||||
|
|
||||
|
]; |
||||
|
|