feat : 动态前置流程
This commit is contained in:
@@ -63,7 +63,8 @@
|
|||||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<file-preview ref="filePreviewRef" :fullscreen="fullscreen" v-if="filePreviewShow" :fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
<file-preview ref="filePreviewRef" :fullscreen="fullscreen" v-if="filePreviewShow"
|
||||||
|
:fileName="filePreviewParam.fileName" :fileUrl="filePreviewParam.fileUrl"
|
||||||
:fileType="filePreviewParam.fileType"/>
|
:fileType="filePreviewParam.fileType"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -184,7 +185,8 @@ const editSingleTableConfig = reactive({
|
|||||||
label: '文件名',
|
label: '文件名',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 400,
|
width: 400,
|
||||||
currentRender: ({row, index}) => (<div style="color: #2a99ff;cursor: pointer;" onClick={()=>clickToPreview(row)}>{row.originalFileName}</div>)
|
currentRender: ({row, index}) => (
|
||||||
|
<div style="color: #2a99ff;cursor: pointer;" onClick={() => clickToPreview(row)}>{row.originalFileName}</div>)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'tag',
|
prop: 'tag',
|
||||||
@@ -233,6 +235,24 @@ const editSingleTableConfig = reactive({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
let preProcess = {
|
||||||
|
label: '前置流程',
|
||||||
|
prop: 'preProcess',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
labelWidth: 'left',
|
||||||
|
component: () => (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
||||||
|
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
||||||
|
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
||||||
|
}) : <span>{'--'}</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
const schema = computed(() => {
|
const schema = computed(() => {
|
||||||
let arr
|
let arr
|
||||||
if (props.type == 'approval') {
|
if (props.type == 'approval') {
|
||||||
@@ -271,7 +291,9 @@ const schema = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
]
|
||||||
|
if (props.preProcessShow == 'EDIT') {
|
||||||
|
preProcess = {
|
||||||
label: '前置流程',
|
label: '前置流程',
|
||||||
prop: 'preProcess',
|
prop: 'preProcess',
|
||||||
colProps: {
|
colProps: {
|
||||||
@@ -281,33 +303,32 @@ const schema = computed(() => {
|
|||||||
component: () => (
|
component: () => (
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
<select-pre-process formData={props.formData}/>
|
||||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
|
||||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
|
||||||
}) : <span>{'--'}</span>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.push(preProcess)
|
||||||
|
arr.push({
|
||||||
|
label: '项目立项附件',
|
||||||
|
prop: 'singleFile',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
labelWidth: 'left',
|
||||||
label: '项目立项附件',
|
component: () => {
|
||||||
prop: 'singleFile',
|
let singleFileArray = [props.formData.singleFile]
|
||||||
colProps: {
|
return <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||||
span: 24
|
tableConfig={editSingleTableConfig}
|
||||||
},
|
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||||
labelWidth: 'left',
|
</fvTable>
|
||||||
component: () => {
|
}
|
||||||
let singleFileArray = [props.formData.singleFile]
|
})
|
||||||
return <fvTable style="width: 100%;max-height: 80px;" height="80"
|
|
||||||
tableConfig={editSingleTableConfig}
|
|
||||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
|
||||||
</fvTable>
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
} else if (props.type == 'execute') {
|
} else if (props.type == 'execute') {
|
||||||
arr = [
|
arr = []
|
||||||
{
|
if (props.preProcessShow == 'EDIT') {
|
||||||
|
preProcess = {
|
||||||
label: '前置流程',
|
label: '前置流程',
|
||||||
prop: 'preProcess',
|
prop: 'preProcess',
|
||||||
colProps: {
|
colProps: {
|
||||||
@@ -317,30 +338,28 @@ const schema = computed(() => {
|
|||||||
component: () => (
|
component: () => (
|
||||||
<div>
|
<div>
|
||||||
{
|
{
|
||||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
<select-pre-process formData={props.formData}/>
|
||||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
|
||||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
|
||||||
}) : <span>{'--'}</span>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.push(preProcess)
|
||||||
|
arr.push({
|
||||||
|
label: '项目验收附件',
|
||||||
|
prop: 'singleFile',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
labelWidth: 'left',
|
||||||
label: '项目验收附件',
|
component: () => {
|
||||||
prop: 'singleFile',
|
let singleFileArray = [props.formData.singleFile]
|
||||||
colProps: {
|
return <fvTable style="width: 100%;max-height: 80px;" height="80"
|
||||||
span: 24
|
tableConfig={editSingleTableConfig}
|
||||||
},
|
data={singleFileArray} isSettingCol={false} pagination={false}>
|
||||||
labelWidth: 'left',
|
</fvTable>
|
||||||
component: () => {
|
}
|
||||||
let singleFileArray = [props.formData.singleFile]
|
})
|
||||||
return <fvTable style="width: 100%;max-height: 80px;" height="80"
|
|
||||||
tableConfig={editSingleTableConfig}
|
|
||||||
data={singleFileArray} isSettingCol={false} pagination={false}>
|
|
||||||
</fvTable>
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
} else if (props.type == 'archivist') {
|
} else if (props.type == 'archivist') {
|
||||||
arr = [
|
arr = [
|
||||||
{
|
{
|
||||||
@@ -384,7 +403,7 @@ const schema = computed(() => {
|
|||||||
const filePreviewParam = ref({
|
const filePreviewParam = ref({
|
||||||
fileUrl: '',
|
fileUrl: '',
|
||||||
fileName: '',
|
fileName: '',
|
||||||
fileType: 'pdf'
|
fileType: ''
|
||||||
})
|
})
|
||||||
const filePreviewShow = ref(false)
|
const filePreviewShow = ref(false)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -397,14 +416,14 @@ const _value = computed({
|
|||||||
emit("update:value", val);
|
emit("update:value", val);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const clickToPreview=(row)=>{
|
const clickToPreview = (row) => {
|
||||||
filePreviewShow.value = false
|
filePreviewShow.value = false
|
||||||
filePreviewParam.value = {
|
filePreviewParam.value = {
|
||||||
fileUrl: row.url,
|
fileUrl: row.url,
|
||||||
fileName: row.originalFileName,
|
fileName: row.originalFileName,
|
||||||
fileType: row.fileType
|
fileType: row.fileType
|
||||||
}
|
}
|
||||||
nextTick(()=>{
|
nextTick(() => {
|
||||||
filePreviewShow.value = true
|
filePreviewShow.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,8 +141,10 @@ const handleReject = async () => {
|
|||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
})
|
})
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
if (res.code === 1000){
|
||||||
back()
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
back()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAgree = async () => {
|
const handleAgree = async () => {
|
||||||
@@ -158,8 +160,10 @@ const handleAgree = async () => {
|
|||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
})
|
})
|
||||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
if (res.code === 1000){
|
||||||
back()
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
back()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -539,22 +539,6 @@ const getFileParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
|
||||||
if (localFormData.value.preProcess == undefined) {
|
|
||||||
if (JSON.parse(localStorage.getItem('preProcess'))?.length > 0) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: '请选择前置流程!',
|
|
||||||
type: 'error'
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let files = []
|
let files = []
|
||||||
if (props.mode === 'resubmit') {
|
if (props.mode === 'resubmit') {
|
||||||
attachment.value.allFileList.forEach(item => {
|
attachment.value.allFileList.forEach(item => {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
|
|||||||
id: perm.id, //todo ,id 就是字段名称
|
id: perm.id, //todo ,id 就是字段名称
|
||||||
title: perm.title,
|
title: perm.title,
|
||||||
required: perm.required,
|
required: perm.required,
|
||||||
perm: 'H'
|
perm: 'R'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user