fix : 修改打印范围, 详情增加项目实施模块
This commit is contained in:
@@ -1,36 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-row v-if="type==='execute'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<baseTitle :title="'附件信息'" style="margin-bottom: 5px"></baseTitle>
|
|
||||||
</el-col>
|
|
||||||
<el-form :model="attachmentParam" inline style="margin-top: 15px;margin-left: 15px">
|
|
||||||
<el-form-item label="标签" prop="tag">
|
|
||||||
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in tagsOption"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button @click="handleSearchImplementationFileList" color="#DED0B2">搜索</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<fvTable style="width: 100%;min-height:160px;max-height: 160px" v-if="showAttachmentTable" height="160"
|
|
||||||
:tableConfig="executeTableConfig" class="execute-table"
|
|
||||||
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
|
||||||
<template #empty>
|
|
||||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
|
||||||
</template>
|
|
||||||
</fvTable>
|
|
||||||
</el-row>
|
|
||||||
<baseTitle v-if="type!='phase'" :title="getTagName(type)+getTitleInfo(data.taskId)"></baseTitle>
|
<baseTitle v-if="type!='phase'" :title="getTagName(type)+getTitleInfo(data.taskId)"></baseTitle>
|
||||||
<fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm>
|
<fvForm :schema="schema" @getInstance="(e)=>form = e" style="margin-left: 15px"></fvForm>
|
||||||
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
|
<el-form :model="formData" label-width="auto" style="margin-top: -15px">
|
||||||
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)" :isOpenPrint="isOpenPrint"
|
||||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||||
:file-list-show="fileListShow"/>
|
:file-list-show="fileListShow"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -77,58 +50,6 @@ import {downloadFile} from "@/api/project-demand";
|
|||||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||||
import {getTags} from "@/api/project-manage";
|
import {getTags} from "@/api/project-manage";
|
||||||
|
|
||||||
const attachmentParam = reactive({
|
|
||||||
tag: ''
|
|
||||||
})
|
|
||||||
const tagsOption = ref([])
|
|
||||||
const uploadState = ref(false)
|
|
||||||
const showAttachmentTable = ref(true)
|
|
||||||
const otherAttachmentList = ref([])
|
|
||||||
|
|
||||||
const executeTableConfig = reactive({
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
prop: 'index',
|
|
||||||
type: 'index',
|
|
||||||
label: '序号',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'originalFileName',
|
|
||||||
label: '文件名',
|
|
||||||
align: 'center',
|
|
||||||
// width: 700,
|
|
||||||
currentRender: ({row, index}) => (
|
|
||||||
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'tag',
|
|
||||||
label: '标签',
|
|
||||||
align: 'center',
|
|
||||||
// width: 200,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'size',
|
|
||||||
label: '文件大小',
|
|
||||||
align: 'center',
|
|
||||||
// width: 450,
|
|
||||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'oper',
|
|
||||||
label: '操作',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: false,
|
|
||||||
currentRender: ({row, index}) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(false)
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formData: {
|
formData: {
|
||||||
@@ -164,6 +85,11 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
//是否开始打印
|
||||||
|
isOpenPrint: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
value: {
|
value: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
@@ -472,50 +398,6 @@ const clickToPreview = (row) => {
|
|||||||
filePreviewShow.value = true
|
filePreviewShow.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getTagsOption = () => {
|
|
||||||
if (!route.query.projectId) return
|
|
||||||
getTags(route.query.projectId).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
tagsOption.value = res.data
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleSearchImplementationFileList = () => {
|
|
||||||
let params = {
|
|
||||||
targetId: route.query.projectId,
|
|
||||||
targetState: "40"
|
|
||||||
}
|
|
||||||
if (attachmentParam.tag) {
|
|
||||||
tagsOption.value.forEach(item => {
|
|
||||||
if (item.value === attachmentParam.tag) {
|
|
||||||
attachmentParam.tag = item.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
params.tag = attachmentParam.tag
|
|
||||||
}
|
|
||||||
searchImplementationFileList(params).then(res => {
|
|
||||||
showAttachmentTable.value = false
|
|
||||||
if (res.code === 1000) {
|
|
||||||
otherAttachmentList.value = res.data.fileList
|
|
||||||
uploadState.value = res.data.upload
|
|
||||||
nextTick(() => {
|
|
||||||
showAttachmentTable.value = true
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const getTitleInfo = (taskId) => {
|
const getTitleInfo = (taskId) => {
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
@@ -551,11 +433,6 @@ watchEffect(() => {
|
|||||||
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
if (props.formData.mode == 'view' && props.type == 'execute') {
|
|
||||||
handleSearchImplementationFileList()
|
|
||||||
getTagsOption()
|
|
||||||
}
|
|
||||||
watch(() => props.loading, (newVal) => {
|
watch(() => props.loading, (newVal) => {
|
||||||
props.loading = newVal
|
props.loading = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
<el-form :label-position="labelAlign">
|
<el-form :label-position="labelAlign">
|
||||||
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
|
<el-form-item :label="title?'其他文件':''" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign" :label-width="title?95:''" :style="{marginTop: '10px',marginLeft: tag!=='需求上报'?'15px':'0'}">
|
||||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||||
<fvTable style="width: 100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"
|
<!-- :style="{width:isOpenPrint?'610px': '100%'}" table-layout="auto" id="printTable"-->
|
||||||
|
<fvTable style="width:100%;max-height: 160px;" v-if="processViewer" height="160" :tableConfig="tableConfig"
|
||||||
:data="_value" :isSettingCol="false" :pagination="false">
|
:data="_value" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
||||||
@@ -52,7 +53,12 @@ const props = defineProps({
|
|||||||
fullscreen: {
|
fullscreen: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
}
|
},
|
||||||
|
//是否开始打印
|
||||||
|
isOpenPrint: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:value'])
|
const emit = defineEmits(['update:value'])
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
@@ -196,5 +202,10 @@ watch(() => props.processViewer, (newVal) => {
|
|||||||
:deep(.el-table--fit ) {
|
:deep(.el-table--fit ) {
|
||||||
height: 160px !important;
|
height: 160px !important;
|
||||||
}
|
}
|
||||||
|
@media print {
|
||||||
|
//#printTable{
|
||||||
|
// width: 400px!important;
|
||||||
|
//}
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,40 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-block">
|
<div class="apply-block">
|
||||||
<el-row v-if="title==='check'">
|
|
||||||
<el-col :span="24">
|
|
||||||
<baseTitle :title="'附件信息'"></baseTitle>
|
|
||||||
</el-col>
|
|
||||||
<el-form :model="attachmentParam" inline style="margin-left: 15px">
|
|
||||||
<el-form-item label="标签" prop="tag">
|
|
||||||
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in tagsOption"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
|
||||||
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<fvTable style="width: 100%;min-height:160px;max-height: 160px" v-if="showAttachmentTable" height="160"
|
|
||||||
:tableConfig="executeTableConfig" class="execute-apply-table"
|
|
||||||
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
|
||||||
<template #empty>
|
|
||||||
<el-empty :image-size="55" description="暂无数据" style="padding: 0"/>
|
|
||||||
</template>
|
|
||||||
</fvTable>
|
|
||||||
</el-row>
|
|
||||||
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
|
<baseTitle :title="getTitleName(title)+'信息'"></baseTitle>
|
||||||
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
<el-form :model="localFormData" ref="formRef" label-width="auto" v-if="step!=='50'">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6" v-if="title==='apply'">
|
<el-col :span="6" v-if="title==='apply'">
|
||||||
<!-- label-width="106"-->
|
<!-- label-width="106"-->
|
||||||
<el-form-item label="项目负责人" :required="true" prop="" label-width="111"
|
<el-form-item label="项目负责人" :required="true" prop="" label-width="111">
|
||||||
>
|
|
||||||
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
|
<el-button style="margin-right: 10px" color="#DED0B2" @click="handleShowProjectChargePersonTable">
|
||||||
{{ projectChargePersonUserList?.length !== 0 ? '更改' : '请选择' }}
|
{{ projectChargePersonUserList?.length !== 0 ? '更改' : '请选择' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -170,7 +141,6 @@
|
|||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {getTags} from "@/api/project-manage";
|
|
||||||
import {
|
import {
|
||||||
getApplyProcess,
|
getApplyProcess,
|
||||||
getPreProcess,
|
getPreProcess,
|
||||||
@@ -188,70 +158,16 @@ import {useTagsView} from '@/stores/tagsview.js'
|
|||||||
import Paging from "@/components/pagination/index.vue";
|
import Paging from "@/components/pagination/index.vue";
|
||||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
|
|
||||||
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(false)
|
||||||
const formRef = ref()
|
|
||||||
const showSingleTable = ref(false)
|
const showSingleTable = ref(false)
|
||||||
const projectChargePersonUserList = ref([])
|
const projectChargePersonUserList = ref([])
|
||||||
const projectChargePersonUserPicker = ref()
|
const projectChargePersonUserPicker = ref()
|
||||||
const projectPersonUserList = ref([])
|
const projectPersonUserList = ref([])
|
||||||
const projectPersonUserPicker = ref()
|
const projectPersonUserPicker = ref()
|
||||||
const singleList = ref([])
|
const singleList = ref([])
|
||||||
const tagsOption = ref([])
|
|
||||||
const uploadState = ref(false)
|
|
||||||
const showAttachmentTable = ref(true)
|
|
||||||
const otherAttachmentList = ref([])
|
|
||||||
const attachmentParam = reactive({
|
|
||||||
tag: ''
|
|
||||||
})
|
|
||||||
const executeTableConfig = reactive({
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
prop: 'index',
|
|
||||||
type: 'index',
|
|
||||||
label: '序号',
|
|
||||||
align: 'center',
|
|
||||||
width: '80',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'originalFileName',
|
|
||||||
label: '文件名',
|
|
||||||
align: 'center',
|
|
||||||
width: 620,
|
|
||||||
currentRender: ({row, index}) => (
|
|
||||||
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'tag',
|
|
||||||
label: '标签',
|
|
||||||
align: 'center',
|
|
||||||
width: 160,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'size',
|
|
||||||
label: '文件大小',
|
|
||||||
align: 'center',
|
|
||||||
width: 600,
|
|
||||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'oper',
|
|
||||||
label: '操作',
|
|
||||||
align: 'center',
|
|
||||||
showOverflowTooltip: false,
|
|
||||||
currentRender: ({row, index}) => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
@@ -393,61 +309,6 @@ const getRequestName = (list) => {
|
|||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getTagsOption = () => {
|
|
||||||
if (!route.query.projectId) return
|
|
||||||
getTags(route.query.projectId).then(res => {
|
|
||||||
if (res.code === 1000) {
|
|
||||||
tagsOption.value = res.data
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleSearch = () => {
|
|
||||||
let params = {
|
|
||||||
targetId: route.query.projectId,
|
|
||||||
targetState: "40"
|
|
||||||
}
|
|
||||||
if (attachmentParam.tag) {
|
|
||||||
tagsOption.value.forEach(item => {
|
|
||||||
if (item.value === attachmentParam.tag) {
|
|
||||||
attachmentParam.tag = item.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
params.tag = attachmentParam.tag
|
|
||||||
}
|
|
||||||
searchImplementationFileList(params).then(res => {
|
|
||||||
showAttachmentTable.value = false
|
|
||||||
if (res.code === 1000) {
|
|
||||||
otherAttachmentList.value = res.data.fileList
|
|
||||||
uploadState.value = res.data.upload
|
|
||||||
nextTick(() => {
|
|
||||||
showAttachmentTable.value = true
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const handleUpload = () => {
|
|
||||||
router.push({
|
|
||||||
name: 'Implementation/upload',
|
|
||||||
query: {
|
|
||||||
id: route.query.id,
|
|
||||||
projectId: route.query.projectId,
|
|
||||||
state: route.query.state,
|
|
||||||
step: '40'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const getProjectChargePersonUser = () => {
|
const getProjectChargePersonUser = () => {
|
||||||
if (projectChargePersonUserList.value.length !== 0) {
|
if (projectChargePersonUserList.value.length !== 0) {
|
||||||
return projectChargePersonUserList.value.map(item => item.name).join()
|
return projectChargePersonUserList.value.map(item => item.name).join()
|
||||||
@@ -720,10 +581,6 @@ const handleSubmit = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
if (props.title && props.title === 'check') {
|
|
||||||
handleSearch()
|
|
||||||
getTagsOption()
|
|
||||||
}
|
|
||||||
let id = projectId.value
|
let id = projectId.value
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
processDiagramViewer.value = false
|
processDiagramViewer.value = false
|
||||||
|
|||||||
158
src/components/DetailComponent/ProjectAttachment.vue
Normal file
158
src/components/DetailComponent/ProjectAttachment.vue
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
<template>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<baseTitle :title="'项目附件'"></baseTitle>
|
||||||
|
</el-col>
|
||||||
|
<el-form :model="attachmentParam" inline style="margin-left: 15px">
|
||||||
|
<el-form-item label="标签" prop="tag">
|
||||||
|
<el-select v-model="attachmentParam.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in tagsOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch" color="#DED0B2">搜索</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-col :span="24" style="margin-bottom: 8px;margin-left: 15px">
|
||||||
|
<el-button v-if="uploadState" color="#DED0B2" @click="handleUpload">上传附件</el-button>
|
||||||
|
</el-col>
|
||||||
|
<fvTable style="width: 100%;min-height:311px;max-height: 311px" v-if="showAttachmentTable" height="311"
|
||||||
|
:tableConfig="executeTableConfig" class="execute-apply-table"
|
||||||
|
:data="otherAttachmentList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {getTags} from "@/api/project-manage";
|
||||||
|
import {ElLoading, ElNotification} from "element-plus";
|
||||||
|
import {searchImplementationFileList} from "@/api/project-manage/attachment";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const attachmentParam = reactive({
|
||||||
|
tag: ''
|
||||||
|
})
|
||||||
|
const uploadState = ref(false)
|
||||||
|
const tagsOption = ref([])
|
||||||
|
const showAttachmentTable = ref(true)
|
||||||
|
const executeTableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: 85,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '文件名',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (
|
||||||
|
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'size',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const otherAttachmentList = ref([])
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
let params = {
|
||||||
|
targetId: route.query.projectId,
|
||||||
|
targetState: "40"
|
||||||
|
}
|
||||||
|
if (attachmentParam.tag) {
|
||||||
|
tagsOption.value.forEach(item => {
|
||||||
|
if (item.value === attachmentParam.tag) {
|
||||||
|
attachmentParam.tag = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
params.tag = attachmentParam.tag
|
||||||
|
}
|
||||||
|
searchImplementationFileList(params).then(res => {
|
||||||
|
showAttachmentTable.value = false
|
||||||
|
if (res.code === 1000) {
|
||||||
|
otherAttachmentList.value = res.data.fileList
|
||||||
|
uploadState.value = res.data.upload
|
||||||
|
nextTick(() => {
|
||||||
|
showAttachmentTable.value = true
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getTagsOption = () => {
|
||||||
|
if (!route.query.projectId) return
|
||||||
|
getTags(route.query.projectId).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsOption.value = res.data
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleUpload = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/upload',
|
||||||
|
query: {
|
||||||
|
id: route.query.id,
|
||||||
|
projectId: route.query.projectId,
|
||||||
|
state: route.query.state,
|
||||||
|
step: '30'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
handleSearch()
|
||||||
|
getTagsOption()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
:deep(.el-table--fit ) {
|
||||||
|
height: 311px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,37 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding: 0 30px">
|
<div style="padding: 0 30px" id="printBox">
|
||||||
|
<div style="display: flex;justify-content: space-between">
|
||||||
<baseTitle title="项目基本信息"></baseTitle>
|
<baseTitle title="项目基本信息"></baseTitle>
|
||||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
<el-button v-print="print" ref color="#ded0b2" icon="Printer" style="margin-top: 15px" @click="handlePrint(print)"> 打印</el-button>
|
||||||
<div class="steps-box">
|
</div>
|
||||||
<el-steps v-if="stepsShow" :active="localActive" finish-status="success">
|
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e" label-position="left" label-width="left" style="margin-left: 15px"></fvForm>
|
||||||
<el-step
|
<div class="steps-box">
|
||||||
v-for="(item, index) in localSteps"
|
<el-steps v-if="stepsShow" :active="localActive" finish-status="success">
|
||||||
:key="item.key"
|
<el-step
|
||||||
:title="item.title"
|
v-for="(item, index) in localSteps"
|
||||||
:class="stepClass(index)"
|
:key="item.key"
|
||||||
@click="handleStep(item.key, index)"
|
:title="item.title"
|
||||||
|
:class="stepClass(index)"
|
||||||
>
|
@click="handleStep(item.key, index)"
|
||||||
<template #icon>
|
>
|
||||||
<el-icon style="font-size: 20px;" :class="index == localActive ? 'is-active' : 'is-end'"
|
<template #icon>
|
||||||
v-if="localStepSuccess.includes(index)">
|
<el-icon style="font-size: 20px;" :class="index == localActive ? 'is-active' : 'is-end'"
|
||||||
<SuccessFilled/>
|
v-if="localStepSuccess.includes(index)">
|
||||||
</el-icon>
|
<SuccessFilled/>
|
||||||
<el-icon style="font-size: 20px; color: gray;" v-else>
|
</el-icon>
|
||||||
<WarningFilled/>
|
<el-icon style="font-size: 20px; color: gray;" v-else>
|
||||||
</el-icon>
|
<WarningFilled/>
|
||||||
</template>
|
</el-icon>
|
||||||
</el-step>
|
</template>
|
||||||
</el-steps>
|
</el-step>
|
||||||
</div>
|
</el-steps>
|
||||||
<!-- 步骤内容 -->
|
</div>
|
||||||
<div>
|
<!-- 步骤内容 -->
|
||||||
<slot name="content" :localActive="localActive"></slot>
|
<div>
|
||||||
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
<slot name="content" :localActive="localActive"></slot>
|
||||||
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
||||||
</template> -->
|
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
||||||
</div>
|
</template> -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const cacheStore = useCacheStore()
|
const cacheStore = useCacheStore()
|
||||||
const emits = defineEmits(['stepChange', 'setDetail'])
|
const emits = defineEmits(['stepChange', 'setDetail','openPrint'])
|
||||||
const localData = reactive({})
|
const localData = reactive({})
|
||||||
const localActive = ref(0) // 当前激活步骤
|
const localActive = ref(0) // 当前激活步骤
|
||||||
const stepsShow = ref(false)
|
const stepsShow = ref(false)
|
||||||
@@ -83,6 +84,10 @@ const localSteps = ref([
|
|||||||
title: '项目立项',
|
title: '项目立项',
|
||||||
key: 'approve',
|
key: 'approve',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '项目实施',
|
||||||
|
key: 'implement',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '项目验收',
|
title: '项目验收',
|
||||||
key: 'execute',
|
key: 'execute',
|
||||||
@@ -96,10 +101,8 @@ const localSteps = ref([
|
|||||||
// key: 'end',
|
// key: 'end',
|
||||||
// },
|
// },
|
||||||
])
|
])
|
||||||
|
|
||||||
const baseForm = ref()
|
const baseForm = ref()
|
||||||
const baseFormData = ref([])
|
const baseFormData = ref([])
|
||||||
|
|
||||||
const schema = computed(() => {
|
const schema = computed(() => {
|
||||||
return [
|
return [
|
||||||
// {
|
// {
|
||||||
@@ -326,11 +329,42 @@ const schema = computed(() => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const localStepSuccess = ref([])
|
const localStepSuccess = ref([])
|
||||||
|
const print = ref({
|
||||||
|
id: 'printBox',//这里的id就是上面我们的打印区域id,实现指哪打哪
|
||||||
|
popTitle: '配置页眉标题', // 打印配置页上方的标题
|
||||||
|
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
|
||||||
|
preview: false, // 是否启动预览模式,默认是false
|
||||||
|
previewTitle: '预览的标题', // 打印预览的标题
|
||||||
|
previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
|
||||||
|
zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
|
||||||
|
previewBeforeOpenCallback() {
|
||||||
|
console.log('正在加载预览窗口!');
|
||||||
|
}, // 预览窗口打开之前的callback
|
||||||
|
previewOpenCallback() {
|
||||||
|
console.log('已经加载完预览窗口,预览打开了!')
|
||||||
|
}, // 预览窗口打开时的callback
|
||||||
|
beforeOpenCallback() {
|
||||||
|
console.log('开始打印之前!')
|
||||||
|
}, // 开始打印之前的callback
|
||||||
|
openCallback() {
|
||||||
|
console.log('执行打印了!')
|
||||||
|
}, // 调用打印时的callback
|
||||||
|
closeCallback() {
|
||||||
|
console.log('关闭了打印工具!')
|
||||||
|
emits('closePrint')
|
||||||
|
}, // 关闭打印的callback(无法区分确认or取消)
|
||||||
|
clickMounted() {
|
||||||
|
console.log('点击v-print绑定的按钮了!')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const handlePrint=(print)=>{
|
||||||
|
emits('openPrint',print)
|
||||||
|
}
|
||||||
// 格式化详情步骤条
|
// 格式化详情步骤条
|
||||||
const formatProcedure = (data) => {
|
const formatProcedure = (data) => {
|
||||||
|
console.info("🚀 ~method:formatProcedure -----", data)
|
||||||
let arr = []
|
let arr = []
|
||||||
if (data instanceof Array) {
|
if (data instanceof Array) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
@@ -342,12 +376,15 @@ const formatProcedure = (data) => {
|
|||||||
case '20':
|
case '20':
|
||||||
arr.push(1)
|
arr.push(1)
|
||||||
break
|
break
|
||||||
case '40':
|
case '30':
|
||||||
arr.push(2)
|
arr.push(2)
|
||||||
break
|
break
|
||||||
case '50':
|
case '40':
|
||||||
arr.push(3)
|
arr.push(3)
|
||||||
break
|
break
|
||||||
|
case '50':
|
||||||
|
arr.push(4)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (item) {
|
switch (item) {
|
||||||
@@ -360,12 +397,15 @@ const formatProcedure = (data) => {
|
|||||||
case '20':
|
case '20':
|
||||||
arr.push(2)
|
arr.push(2)
|
||||||
break
|
break
|
||||||
case '40':
|
case '30':
|
||||||
arr.push(3)
|
arr.push(3)
|
||||||
break
|
break
|
||||||
case '50':
|
case '40':
|
||||||
arr.push(4)
|
arr.push(4)
|
||||||
break
|
break
|
||||||
|
case '50':
|
||||||
|
arr.push(5)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,12 +453,13 @@ const formatReProcedure = (data) => {
|
|||||||
case 2:
|
case 2:
|
||||||
arr.push('20')
|
arr.push('20')
|
||||||
break
|
break
|
||||||
// case 3: arr.push('30')
|
|
||||||
// break
|
|
||||||
case 3:
|
case 3:
|
||||||
arr.push('40')
|
arr.push('30')
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
|
arr.push('40')
|
||||||
|
break
|
||||||
|
case 5:
|
||||||
arr.push('50')
|
arr.push('50')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -437,9 +478,9 @@ const formatActive = (val) => {
|
|||||||
newVal == 0 && (active = '00')
|
newVal == 0 && (active = '00')
|
||||||
newVal == 1 && (active = '10')
|
newVal == 1 && (active = '10')
|
||||||
newVal == 2 && (active = '20')
|
newVal == 2 && (active = '20')
|
||||||
// val == 3 && (active = '30')
|
newVal == 3 && (active = '30')
|
||||||
newVal == 3 && (active = '40')
|
newVal == 4 && (active = '40')
|
||||||
newVal == 4 && (active = '50')
|
newVal == 5 && (active = '50')
|
||||||
return active
|
return active
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,9 +504,12 @@ const handleStep = (key, index) => {
|
|||||||
active = '20'
|
active = '20'
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
active = '40'
|
active = '30'
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
|
active = '40'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
active = '50'
|
active = '50'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -481,9 +525,12 @@ const handleStep = (key, index) => {
|
|||||||
active = '20'
|
active = '20'
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
active = '40'
|
active = '30'
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
|
active = '40'
|
||||||
|
break
|
||||||
|
case 5:
|
||||||
active = '50'
|
active = '50'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -504,11 +551,18 @@ const getBaseInfo = async () => {
|
|||||||
try {
|
try {
|
||||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||||
// console.log('data.procedure', data.procedure, route.query.step)
|
// console.log('data.procedure', data.procedure, route.query.step)
|
||||||
if (route.query.step === '40') {
|
if (route.query.step === '30'||route.query.step === '40') {
|
||||||
if (data.procedure.indexOf('40') == -1) {
|
if (data.procedure.indexOf('30') == -1||data.procedure.indexOf('40') == -1) {
|
||||||
|
data.procedure.push('30')
|
||||||
data.procedure.push('40')
|
data.procedure.push('40')
|
||||||
}
|
}
|
||||||
} else if (route.query.step === '50') {
|
}
|
||||||
|
// else if (route.query.step === '40') {
|
||||||
|
// if (data.procedure.indexOf('40') == -1) {
|
||||||
|
// data.procedure.push('40')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
else if (route.query.step === '50') {
|
||||||
if (data.procedure.indexOf('50') == -1) {
|
if (data.procedure.indexOf('50') == -1) {
|
||||||
data.procedure.push('50')
|
data.procedure.push('50')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
:fileListShow="fileListShow"
|
:fileListShow="fileListShow"
|
||||||
:preProcessShow="preProcessShow"
|
:preProcessShow="preProcessShow"
|
||||||
v-model:value="auditOpinion"/>
|
v-model:value="auditOpinion"/>
|
||||||
|
<div v-if="showActive == '30'&&!editShow">
|
||||||
|
<project-attachment/>
|
||||||
|
</div>
|
||||||
<ApprovalDetail type="execute"
|
<ApprovalDetail type="execute"
|
||||||
v-if="showActive == '40'&&!editShow"
|
v-if="showActive == '40'&&!editShow"
|
||||||
:formData="detailData.formData"
|
:formData="detailData.formData"
|
||||||
@@ -49,7 +52,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</steps>
|
</steps>
|
||||||
<div style="width: 100%;height: 30px"></div>
|
<div style="width: 100%;height: 30px"></div>
|
||||||
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId" :taskUserOptionList="detailData.taskUserOptionList"
|
<opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||||
|
:taskUserOptionList="detailData.taskUserOptionList"
|
||||||
v-model:value="auditOpinion"/>
|
v-model:value="auditOpinion"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -75,8 +79,9 @@ const auditOpinion = ref('')
|
|||||||
// const step = ref(route.query.step)
|
// const step = ref(route.query.step)
|
||||||
route.query.step == '10' && (currentStep.value = 1)
|
route.query.step == '10' && (currentStep.value = 1)
|
||||||
route.query.step == '20' && (currentStep.value = 2)
|
route.query.step == '20' && (currentStep.value = 2)
|
||||||
route.query.step == '40' && (currentStep.value = 3)
|
route.query.step == '30' && (currentStep.value = 3)
|
||||||
route.query.step == '50' && (currentStep.value = 4)
|
route.query.step == '40' && (currentStep.value = 4)
|
||||||
|
route.query.step == '50' && (currentStep.value = 5)
|
||||||
const showActive = ref()
|
const showActive = ref()
|
||||||
const detailShow = ref(false)
|
const detailShow = ref(false)
|
||||||
const detailData = ref({})
|
const detailData = ref({})
|
||||||
@@ -88,6 +93,8 @@ localStorage.removeItem('projectChargePersonUserList')
|
|||||||
localStorage.removeItem('projectPersonUserList')
|
localStorage.removeItem('projectPersonUserList')
|
||||||
localStorage.removeItem('optionalChargeLeadershipList')
|
localStorage.removeItem('optionalChargeLeadershipList')
|
||||||
localStorage.removeItem('originallySelectedList')
|
localStorage.removeItem('originallySelectedList')
|
||||||
|
|
||||||
|
|
||||||
const getAllInfo = async (state) => {
|
const getAllInfo = async (state) => {
|
||||||
const loading = ElLoading.service({fullscreen: true})
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
detailData.value = {
|
detailData.value = {
|
||||||
@@ -148,18 +155,28 @@ const changeModel = (active, mode) => {
|
|||||||
applyTitle.value = 'apply'
|
applyTitle.value = 'apply'
|
||||||
} else if (active === '40') {
|
} else if (active === '40') {
|
||||||
applyTitle.value = 'check'
|
applyTitle.value = 'check'
|
||||||
}else if ( active === '50') {
|
} else if (active === '50') {
|
||||||
applyTitle.value = 'filing'
|
applyTitle.value = 'filing'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const setDetail = (active) => {
|
const setDetail = (active) => {
|
||||||
showActive.value = active
|
showActive.value = active
|
||||||
|
if (active == '30') {
|
||||||
|
changeModel(30, 'view')
|
||||||
|
detailShow.value = true
|
||||||
|
return;
|
||||||
|
}
|
||||||
getAllInfo(active)
|
getAllInfo(active)
|
||||||
}
|
}
|
||||||
|
|
||||||
const stepChange = (data) => {
|
const stepChange = (data) => {
|
||||||
showActive.value = data.active
|
showActive.value = data.active
|
||||||
|
if (data.active == '30') {
|
||||||
|
changeModel(30, 'view')
|
||||||
|
detailShow.value = true
|
||||||
|
return;
|
||||||
|
}
|
||||||
getAllInfo(data.active)
|
getAllInfo(data.active)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -297,14 +297,14 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '验收', prem: ['mosr:implementation:check'], func: () => handleCheck(row), type: 'primary'})
|
btn.push({label: '验收', prem: ['mosr:implementation:check'], func: () => handleCheck(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑', prem: ['mosr:implementation:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:implementation:resubmit'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("standing")) {
|
if (buttons.has("standing")) {
|
||||||
btn.push({label: '台账', prem: ['project:management:implementation:account'], func: () => handleStandingBook(row), type: 'primary'})
|
btn.push({label: '台账', prem: ['project:management:implementation:account'], func: () => handleStandingBook(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("attachments")) {
|
// if (buttons.has("attachments")) {
|
||||||
btn.push({label: '附件', prem: ['project:management:implementation:attachment'], func: () => handleAttachment(row), type: 'primary'})
|
// btn.push({label: '附件', prem: ['project:management:implementation:attachment'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
}
|
// }
|
||||||
if (buttons.has("viewAllocation")) {
|
if (buttons.has("viewAllocation")) {
|
||||||
btn.push({label: '查看分摊', prem: ['project:management:implementation:share'], func: () => handleShare(row), type: 'primary'})
|
btn.push({label: '查看分摊', prem: ['project:management:implementation:share'], func: () => handleShare(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
@@ -355,13 +355,19 @@ const search = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
|
let step=''
|
||||||
|
if(row.state==0){
|
||||||
|
step='30'
|
||||||
|
}else {
|
||||||
|
step='40'
|
||||||
|
}
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/detail',
|
name: 'Implementation/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId,
|
id: row.requirementId,
|
||||||
projectId: row.projectId,
|
projectId: row.projectId,
|
||||||
state: row.state,
|
state: row.state,
|
||||||
step: '40'
|
step: step
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ const handleSubmit = async (instance) => {
|
|||||||
id: route.query.id,
|
id: route.query.id,
|
||||||
projectId: route.query.projectId,
|
projectId: route.query.projectId,
|
||||||
state: route.query.state,
|
state: route.query.state,
|
||||||
step: '40'
|
step: '30'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-button v-print="print" color="#ded0b2" icon="Printer"> 打印</el-button>
|
<!-- <el-button v-print="print" color="#ded0b2" icon="Printer"> 打印</el-button> id="printBox"-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div style="margin: 10px" id="printBox">
|
<div style="margin: 10px" >
|
||||||
<el-timeline>
|
<el-timeline>
|
||||||
<el-timeline-item v-for="(operation,index) in operationList"
|
<el-timeline-item v-for="(operation,index) in operationList"
|
||||||
:key="index" :timestamp="operation.startTime"
|
:key="index" :timestamp="operation.startTime"
|
||||||
@@ -104,34 +104,6 @@ const timeline = ref({
|
|||||||
icon: '',
|
icon: '',
|
||||||
context: ''
|
context: ''
|
||||||
})
|
})
|
||||||
const print = ref({
|
|
||||||
id: 'printBox',//这里的id就是上面我们的打印区域id,实现指哪打哪
|
|
||||||
popTitle: '配置页眉标题', // 打印配置页上方的标题
|
|
||||||
extraHead: '', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
|
|
||||||
preview: false, // 是否启动预览模式,默认是false
|
|
||||||
previewTitle: '预览的标题', // 打印预览的标题
|
|
||||||
previewPrintBtnLabel: '预览结束,开始打印', // 打印预览的标题下方的按钮文本,点击可进入打印
|
|
||||||
zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
|
|
||||||
previewBeforeOpenCallback() {
|
|
||||||
console.log('正在加载预览窗口!');
|
|
||||||
}, // 预览窗口打开之前的callback
|
|
||||||
previewOpenCallback() {
|
|
||||||
console.log('已经加载完预览窗口,预览打开了!')
|
|
||||||
}, // 预览窗口打开时的callback
|
|
||||||
beforeOpenCallback() {
|
|
||||||
console.log('开始打印之前!')
|
|
||||||
}, // 开始打印之前的callback
|
|
||||||
openCallback() {
|
|
||||||
console.log('执行打印了!')
|
|
||||||
}, // 调用打印时的callback
|
|
||||||
closeCallback() {
|
|
||||||
console.log('关闭了打印工具!')
|
|
||||||
}, // 关闭打印的callback(无法区分确认or取消)
|
|
||||||
clickMounted() {
|
|
||||||
console.log('点击v-print绑定的按钮了!')
|
|
||||||
},
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
switch (props.state) {
|
switch (props.state) {
|
||||||
|
|||||||
Reference in New Issue
Block a user