Merge pull request 'dj' (#305) from dj into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/305
This commit is contained in:
@@ -13,8 +13,15 @@
|
||||
@getAttachment="getAttachment"
|
||||
@getOtherFile="getOtherFile" :showFileList="true" :formData="formData"
|
||||
:preview="route.query.state==3"/>
|
||||
<div v-if="route.query.state==3">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="process">
|
||||
<operation-render v-if="processDiagramViewer" :operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
</div>
|
||||
</div>
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<div class="approval-record">
|
||||
<baseTitle title="流程"></baseTitle>
|
||||
<process-diagram-viewer mode="view" idName="projectApply" v-if="processDiagramViewer"/>
|
||||
</div>
|
||||
<div class="oper-page-btn">
|
||||
@@ -25,6 +32,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElNotification} from "element-plus";
|
||||
import {getApplyProcess, projectApply, resubmitApply, getApplyDetail} from "@/api/project-manage";
|
||||
@@ -42,6 +50,10 @@ const props = defineProps({
|
||||
showTable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
})
|
||||
const rules = reactive({
|
||||
@@ -101,7 +113,7 @@ const handleSubmit = (instance) => {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
}else {
|
||||
} else {
|
||||
otherFileList.value.forEach(item => {
|
||||
files.push(getFileParam(item))
|
||||
})
|
||||
@@ -131,8 +143,8 @@ const handleSubmit = (instance) => {
|
||||
let res
|
||||
if (route.query.state === '3') {
|
||||
res = await resubmitApply(params)
|
||||
}else {
|
||||
res = await projectApply(params)
|
||||
} else {
|
||||
res = await projectApply(params)
|
||||
}
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.isSpecialFund">
|
||||
<span>{{localFormData.specialFund }}</span>
|
||||
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
@@ -10,18 +10,18 @@
|
||||
</el-col>
|
||||
<el-col :span="5" v-if="!route.query.id">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="route.query.id&&formData.isSpecialFund">
|
||||
<el-col :span="6" v-if="route.query.id && formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="!route.query.id">
|
||||
<el-col :span="6" v-if="!route.query.id && formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
@@ -283,7 +283,7 @@ const formData = ref({
|
||||
|
||||
const rules = reactive({
|
||||
projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}],
|
||||
specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
// specialFundId: [{required: true, message: '请选择专项资金', trigger: 'blur'}],
|
||||
startTime: [{required: true, message: '请选择开始时间', trigger: ['blur', 'change']}],
|
||||
endTime: [{required: true, message: '请选择结束时间', trigger: ['blur', 'change']}],
|
||||
rdSubject: [{required: true, message: '请选择研发主体', trigger: ['blur', 'change']}],
|
||||
@@ -313,10 +313,10 @@ const disabledDate = (time) => {
|
||||
|
||||
const getIsFund = async () => {
|
||||
if (!route.query.id) return;
|
||||
loading.value = true
|
||||
// loading.value = true
|
||||
await getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
loading.value = false
|
||||
// loading.value = false
|
||||
formData.value.isSpecialFund = res.data.isSpecialFund
|
||||
if (res.data.isSpecialFund) {
|
||||
res.data.specialFundId = getSpecialFundId(res.data.specialFund)
|
||||
@@ -428,7 +428,7 @@ const handleResubmit = debounce(() => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile==null) {
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -436,7 +436,7 @@ const handleResubmit = debounce(() => {
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else{
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
@@ -475,17 +475,26 @@ const getDetailInfo = async () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const specialFundChange = () => {
|
||||
processInfo()
|
||||
}
|
||||
const init = async () => {
|
||||
await getIsFund()
|
||||
loading.value = true
|
||||
const resFund = await getFundOption()
|
||||
specialFundOption.value = resFund.data
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
await processInfo()
|
||||
loading.value = false
|
||||
}
|
||||
const processInfo = () => {
|
||||
processStore.setDesign(null)
|
||||
processDiagramViewer.value=false
|
||||
getProcessInfo(formData.value.isSpecialFund).then(res => {
|
||||
if (res.code === 1000) {
|
||||
let data = res.data
|
||||
deploymentId.value = data.deploymentId
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
@@ -495,7 +504,6 @@ const init = async () => {
|
||||
nextTick(() => {
|
||||
processDiagramViewer.value = true
|
||||
})
|
||||
getIsFund()
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -506,10 +514,10 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
await init()
|
||||
if (route.query.projectId) {
|
||||
await getDetailInfo()
|
||||
}
|
||||
await init()
|
||||
})
|
||||
const staging = async () => {
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<summary-detail v-show="showActive == '10'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply&&!showTabs" :formData="commonForm.formData"
|
||||
<ApprovalDetail type="approval" v-show="showActive == '20'&&!showApply" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute" v-show="showActive == '40'" :formData="commonForm.formData"
|
||||
@@ -22,17 +22,7 @@
|
||||
<ApprovalDetail type="archivist" v-show="showActive == '50'" :formData="commonForm.formData" :data="commonForm"
|
||||
:processViewer="commonProvessViewer" :loading="loading" :fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply v-if="showApply"/>
|
||||
<el-tabs v-if="showTabs" v-model="activeName">
|
||||
<el-tab-pane label="详情" name="first">
|
||||
<ApprovalDetail type="approval" idName="applyDetail" :formData="commonForm.formData"
|
||||
:data="commonForm" :processViewer="commonProvessViewer" :loading="loading"
|
||||
:fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="重新提交" name="second">
|
||||
<project-apply/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<project-apply v-if="showApply&&showActive == '20'" :data="commonForm"/>
|
||||
</template>
|
||||
</steps>
|
||||
<opinion v-if="commonForm.taskId" :formData="commonForm.formData" :taskId="commonForm.taskId"
|
||||
@@ -49,9 +39,7 @@ import {ElLoading, ElNotification} from "element-plus";
|
||||
import Opinion from "@/components/DetailComponent/Opinion.vue";
|
||||
|
||||
const route = useRoute()
|
||||
const activeName = ref('first')
|
||||
const showApply = ref(false)
|
||||
const showTabs = ref(false)
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const fileListShow = ref('READ')
|
||||
@@ -107,12 +95,10 @@ const changeModel = (active) => {
|
||||
if (route.query.state === '0' && active === '20') {
|
||||
showApply.value = true
|
||||
} else if (route.query.state === '3' && active === '20') {
|
||||
//tab左侧详情, 右侧重新提交
|
||||
showTabs.value = true
|
||||
showApply.value = true
|
||||
getAllInfo(active)
|
||||
} else {
|
||||
showApply.value = false
|
||||
showTabs.value = false
|
||||
getAllInfo(active)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,19 +143,18 @@ const handleSubmit = async () => {
|
||||
} else {
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
console.log('params-提交', params,userList.value)
|
||||
// let res = await submitPhaseChange(params)
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: res.msg,
|
||||
// type: res.code === 1000 ? 'success' : 'error'
|
||||
// })
|
||||
// if (res.code === 1000) {
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
// await router.push({
|
||||
// name: 'Implementation'
|
||||
// })
|
||||
// }
|
||||
let res = await submitPhaseChange(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
await router.push({
|
||||
name: 'Implementation'
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleResubmit = (instance) => {
|
||||
let singleFile = {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<baseTitle title="阶段变更详情"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px">抄送人:{{copyName}}</div>
|
||||
<ApprovalDetail :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" v-model:value="auditOpinion"></opinion>
|
||||
@@ -16,6 +17,7 @@ const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
@@ -25,6 +27,7 @@ const getInfo = async () => {
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList.map(item=>item.name).join('')
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
|
||||
Reference in New Issue
Block a user