feat : 需求汇总年度计划审批前置流程选择

This commit is contained in:
clay
2024-07-24 00:28:42 +08:00
parent 1194f04eb6
commit fe8ca80452
4 changed files with 72 additions and 22 deletions

View File

@@ -145,6 +145,10 @@ const props = defineProps({
type: String, type: String,
default: 'READ' default: 'READ'
}, },
preProcessShow: {
type: String,
default: 'READ'
},
// approval 立项, execute 实施, 归档 archivist // approval 立项, execute 实施, 归档 archivist
type: { type: {
type: String, type: String,
@@ -220,30 +224,31 @@ const schema = computed(() => {
</div> </div>
) )
}, },
{ ]
label: '项目立项附件', arr.push(
prop: 'singleFile', {
colProps: { label: '项目立项附件',
span: 24 prop: 'singleFile',
}, colProps: {
labelWidth:'left', span: 24
component: () => ( },
<div> labelWidth:'left',
{ component: () => (
props.formData.singleFile?.originalFileName ? <div>
<span {
style={{color: '#409EFF', cursor: 'pointer'}} props.formData.singleFile?.originalFileName ?
onClick={() => handleDownload(props.formData.singleFile)} <span
> style={{color: '#409EFF', cursor: 'pointer'}}
onClick={() => handleDownload(props.formData.singleFile)}
>
{props.formData.singleFile?.originalFileName} {props.formData.singleFile?.originalFileName}
</span> : </span> :
<span>{'--'}</span> <span>{'--'}</span>
} }
</div> </div>
) )
}, })
]
} else if (props.type == 'execute') { } else if (props.type == 'execute') {
arr = [ arr = [
{ {
@@ -344,6 +349,29 @@ const schema = computed(() => {
return arr return arr
}) })
const setPreProcess = () => {
//preProcessShow 为 EDIT 是 可以选择前置流程
let pre = {
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 route = useRoute() const route = useRoute()
const emit = defineEmits(['update:value']) const emit = defineEmits(['update:value'])
const _value = computed({ const _value = computed({

View File

@@ -59,7 +59,7 @@
v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/> v-model:value="projectPersonUserList" @ok="projectPersonUserPickerOk"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24" v-if="preProcessShow === 'EDIT'">
<el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125"> <el-form-item label="前置流程" :required="preProcessRequired" prop="preProcess" label-width="125">
<el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px"> <el-button color="#DED0B2" @click="handleShowPreTable" style="margin-right: 10px">
{{ {{
@@ -250,6 +250,10 @@ const props = defineProps({
step: { step: {
type: String, type: String,
default: "20" default: "20"
},
preProcessShow: {
type: String,
default: "READ"
} }
}) })
const preProcessList = ref([]) const preProcessList = ref([])

View File

@@ -21,6 +21,7 @@
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<ApprovalDetail type="execute" <ApprovalDetail type="execute"
v-if="showActive == '40'&&!editShow" v-if="showActive == '40'&&!editShow"
@@ -28,6 +29,7 @@
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<ApprovalDetail type="archivist" <ApprovalDetail type="archivist"
v-if="showActive == '50'&&!editShow" v-if="showActive == '50'&&!editShow"
@@ -35,12 +37,14 @@
:data="detailData" :data="detailData"
:processViewer="commonProvessViewer" :processViewer="commonProvessViewer"
:fileListShow="fileListShow" :fileListShow="fileListShow"
:preProcessShow="preProcessShow"
v-model:value="auditOpinion"/> v-model:value="auditOpinion"/>
<project-apply :title="applyTitle" <project-apply :title="applyTitle"
v-if="editShow" v-if="editShow"
:mode="mode" :mode="mode"
:step="showActive" :step="showActive"
:data="detailData" :data="detailData"
:preProcessShow="preProcessShow"
:formData="detailData.formData"/> :formData="detailData.formData"/>
</template> </template>
</steps> </steps>
@@ -64,6 +68,7 @@ const applyTitle = ref('filing')
const loading = ref(false) const loading = ref(false)
const processStore = useProcessStore() const processStore = useProcessStore()
const fileListShow = ref('READ') const fileListShow = ref('READ')
const preProcessShow = ref('READ')
const mode = ref('') const mode = ref('')
const currentStep = ref() const currentStep = ref()
const auditOpinion = ref('') const auditOpinion = ref('')
@@ -89,6 +94,7 @@ const getAllInfo = async (state) => {
try { try {
detailShow.value = false detailShow.value = false
fileListShow.value = 'READ' fileListShow.value = 'READ'
preProcessShow.value = 'READ'
commonProvessViewer.value = false commonProvessViewer.value = false
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state) const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
if (code === 1000) { if (code === 1000) {
@@ -108,6 +114,9 @@ const getAllInfo = async (state) => {
if (data.formPermMap && data.formPermMap["fileList"]) { if (data.formPermMap && data.formPermMap["fileList"]) {
fileListShow.value = data.formPermMap["fileList"].perm fileListShow.value = data.formPermMap["fileList"].perm
} }
if (data.formPermMap && data.formPermMap["preProcess"]) {
preProcessShow.value = data.formPermMap["preProcess"].perm
}
}) })
changeModel(state, mode.value) changeModel(state, mode.value)
loading.close() loading.close()

View File

@@ -99,6 +99,15 @@ const formPermsLoadMosr = (oldPermMap, perms) => {
perm: nowNode.value.type === "ROOT" ? "E" : "R" perm: nowNode.value.type === "ROOT" ? "E" : "R"
}); });
} }
if (perm.id === 'preProcess'){
formPerms.value.push({
id: perm.id, //todo ,id 就是字段名称
title: perm.title,
required: perm.required,
perm: 'H'
});
}
} }
}) })
} }