feat : 动态前置流程
This commit is contained in:
@@ -63,7 +63,8 @@
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||
</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"/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -184,7 +185,8 @@ const editSingleTableConfig = reactive({
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
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',
|
||||
@@ -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(() => {
|
||||
let arr
|
||||
if (props.type == 'approval') {
|
||||
@@ -271,7 +291,9 @@ const schema = computed(() => {
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
]
|
||||
if (props.preProcessShow == 'EDIT') {
|
||||
preProcess = {
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
@@ -281,33 +303,32 @@ const schema = computed(() => {
|
||||
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>
|
||||
<select-pre-process formData={props.formData}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
arr.push(preProcess)
|
||||
arr.push({
|
||||
label: '项目立项附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
{
|
||||
label: '项目立项附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
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>
|
||||
}
|
||||
},
|
||||
]
|
||||
labelWidth: 'left',
|
||||
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') {
|
||||
arr = [
|
||||
{
|
||||
arr = []
|
||||
if (props.preProcessShow == 'EDIT') {
|
||||
preProcess = {
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
@@ -317,30 +338,28 @@ const schema = computed(() => {
|
||||
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>
|
||||
<select-pre-process formData={props.formData}/>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
arr.push(preProcess)
|
||||
arr.push({
|
||||
label: '项目验收附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
{
|
||||
label: '项目验收附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
labelWidth: 'left',
|
||||
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>
|
||||
}
|
||||
},
|
||||
]
|
||||
labelWidth: 'left',
|
||||
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') {
|
||||
arr = [
|
||||
{
|
||||
@@ -384,7 +403,7 @@ const schema = computed(() => {
|
||||
const filePreviewParam = ref({
|
||||
fileUrl: '',
|
||||
fileName: '',
|
||||
fileType: 'pdf'
|
||||
fileType: ''
|
||||
})
|
||||
const filePreviewShow = ref(false)
|
||||
const route = useRoute()
|
||||
@@ -397,14 +416,14 @@ const _value = computed({
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const clickToPreview=(row)=>{
|
||||
const clickToPreview = (row) => {
|
||||
filePreviewShow.value = false
|
||||
filePreviewParam.value = {
|
||||
fileUrl: row.url,
|
||||
fileName: row.originalFileName,
|
||||
fileType: row.fileType
|
||||
}
|
||||
nextTick(()=>{
|
||||
nextTick(() => {
|
||||
filePreviewShow.value = true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -141,8 +141,10 @@ const handleReject = async () => {
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
if (res.code === 1000){
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
@@ -158,8 +160,10 @@ const handleAgree = async () => {
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
if (res.code === 1000){
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -539,22 +539,6 @@ const getFileParam = (item) => {
|
||||
}
|
||||
}
|
||||
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 = []
|
||||
if (props.mode === 'resubmit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
|
||||
@@ -104,7 +104,7 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
|
||||
id: perm.id, //todo ,id 就是字段名称
|
||||
title: perm.title,
|
||||
required: perm.required,
|
||||
perm: 'H'
|
||||
perm: 'R'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user