Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhangkaihuai
2024-06-29 22:30:31 +08:00
9 changed files with 38 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button> <!-- <el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border <el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}"> :summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
<el-table-column type="index" label="序号" align="center" width="60"/> <el-table-column type="index" label="序号" align="center" width="60"/>
@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center"> <el-table-column prop="researchStage" label="研发阶段" align="center">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

View File

@@ -57,7 +57,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="preProcessList" stripe v-loading="loading" <el-table :data="preProcessList" stripe v-loading="loading"
@select="handleSelect" row-key="requestId"> @select="handleSelect" row-key="requestId" ref="preProcessTable">
<el-table-column type="selection" width="55" :reserve-selection="true"/> <el-table-column type="selection" width="55" :reserve-selection="true"/>
<el-table-column prop="requestId" label="请求id"></el-table-column> <el-table-column prop="requestId" label="请求id"></el-table-column>
<el-table-column prop="requestName" label="请求名称"></el-table-column> <el-table-column prop="requestName" label="请求名称"></el-table-column>
@@ -106,6 +106,7 @@ import Paging from "@/components/pagination/index.vue";
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const changeDiagram = ref(false) const changeDiagram = ref(false)
const preProcessTable = ref()
const emit = defineEmits(["getAttachment", "getOtherFile"]) const emit = defineEmits(["getAttachment", "getOtherFile"])
const props = defineProps({ const props = defineProps({
title: { title: {
@@ -210,6 +211,13 @@ const getPreProcessList = () => {
searchArray.push(item) searchArray.push(item)
} }
}) })
res.data.forEach((item) => {
localFormData.value.preProcess.forEach((item1) => {
if (item.requestId == item1.requestId) {
preProcessTable.value.toggleRowSelection(item)
}
})
})
total.value = searchArray.length total.value = searchArray.length
currentList.value = searchArray currentList.value = searchArray
preProcessList.value = currentList.value.slice(0, 10) preProcessList.value = currentList.value.slice(0, 10)

View File

@@ -63,7 +63,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="专项资金名称" prop="specialFund" v-if="localFormData.isSpecialFund"> <el-form-item label="专项资金名称" prop="specialFund" v-if="localFormData.isSpecialFund">
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span> <span>{{
localFormData.specialFundId === 0 ? localFormData.specialFund : changeName(fundOption, localFormData.specialFundId)
}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -108,7 +110,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="经济概算(元)" prop="economicEstimate"> <el-form-item label="经济概算(元)" prop="economicEstimate">
<span>{{toThousands( localFormData.economicEstimate )}}</span> <span>{{ toThousands(localFormData.economicEstimate) }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@@ -141,7 +143,7 @@
<baseTitle title="附件列表"></baseTitle> <baseTitle title="附件列表"></baseTitle>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<file-component tag="需求上报" <file-component tag="需求上报"
v-model:value="localFormData.fileList" :processViewer="processViewer" v-model:value="localFormData.fileList" :processViewer="processViewer"
:file-list-show="fileListShow"/> :file-list-show="fileListShow"/>
</el-col> </el-col>
@@ -171,7 +173,8 @@
</div> </div>
</div> </div>
<div class="process"> <div class="process">
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram" :operation-list="data.operationList" <operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
:operation-list="data.operationList"
:state="data.state"/> :state="data.state"/>
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/> <process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="summaryProcess"/>
</div> </div>
@@ -240,20 +243,17 @@ const _value = computed({
const filterDict = (data, value) => { const filterDict = (data, value) => {
if (data === undefined || value === undefined) return; if (data === undefined || value === undefined) return;
let label = '' let label = ''
let result=[] let result = []
if(value.indexOf(",") >= 0){ if (JSON.parse(value) instanceof Array) {
if (value.split(",") instanceof Array) { JSON.parse(value).forEach(item1 => {
value.split(",").forEach(item1 => { data.find(item => {
console.log('item',item1) if (item.value == item1) {
data.find(item => { result.push(item.label)
if (item.value == item1) { }
result.push(item.label)
}
})
}) })
} })
label=result.map(item=>item).join('') label = result.map(item => item).join('')
}else { } else {
if (data instanceof Array) { if (data instanceof Array) {
data.find(item => { data.find(item => {
if (item.value == value) { if (item.value == value) {

View File

@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center"> <el-table-column prop="researchStage" label="研发阶段" align="center">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

View File

@@ -41,8 +41,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="专项资金名称" prop="specialFundId"> <el-form-item label="专项资金名称" prop="specialFundId" v-if="formData.isSpecialFund">
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable :disabled="!formData.isSpecialFund"> <el-select v-model="formData.specialFundId" placeholder="请选择专项资金名称" clearable filterable >
<el-option <el-option
v-for="item in specialFundOption" v-for="item in specialFundOption"
:key="item.value" :key="item.value"
@@ -158,7 +158,7 @@ const specialFundOption = ref([])
const form = ref(null) const form = ref(null)
const fileList = ref([]) const fileList = ref([])
const loading = ref(false) const loading = ref(false)
const showTable = ref(false) const showTable = ref(true)
const processStore = useProcessStore() const processStore = useProcessStore()
const processInstanceData = ref() const processInstanceData = ref()
const formPermMap = ref(new Map()); const formPermMap = ref(new Map());

View File

@@ -412,7 +412,7 @@ const handleSubmit = debounce(async (instance) => {
if (formData.value.singleFile !== undefined) { if (formData.value.singleFile !== undefined) {
formData.value.singleFile = getFileParam(formData.value.singleFile) formData.value.singleFile = getFileParam(formData.value.singleFile)
} }
// formData.value.resultForm=formData.value.resultForm?.map(item=>item).join(',') formData.value.resultForm=JSON.stringify(formData.value.resultForm)
let params = { let params = {
...formData.value, ...formData.value,
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
@@ -466,7 +466,7 @@ const handleResubmit = debounce(() => {
if (formData.value.isSpecialFund && formData.value.specialFund === null) { if (formData.value.isSpecialFund && formData.value.specialFund === null) {
formData.value.specialFund = getFundName(formData.value.specialFundId) formData.value.specialFund = getFundName(formData.value.specialFundId)
} }
// formData.value.resultForm=formData.value.resultForm?.map(item=>item).join(',') formData.value.resultForm=JSON.stringify(formData.value.resultForm)
let params = { let params = {
...formData.value, ...formData.value,
deploymentId: deploymentId.value, deploymentId: deploymentId.value,
@@ -499,6 +499,7 @@ const getDetailInfo = async () => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId res.data.formData.specialFundId = res.data.formData.specialFundId === 0 ? null : res.data.formData.specialFundId
res.data.formData.resultForm = JSON.parse(res.data.formData.resultForm)
formData.value = res.data.formData formData.value = res.data.formData
loading.value = false loading.value = false
} }

View File

@@ -310,7 +310,6 @@ const search = (val) => {
} }
const init = async () => { const init = async () => {
const {code, msg, data} = await searchUpdateLedgerData(route.query.id) const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
console.log("🚀 ~ init ~ data:", data)
if (data) { if (data) {
tableData.value = data tableData.value = data
baseForm.value.setValues(data) baseForm.value.setValues(data)

View File

@@ -12,7 +12,7 @@
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="researchStage" label="项目阶段" align="center" min-width="100"> <el-table-column prop="researchStage" label="研发阶段" align="center" min-width="100">
<template #default="scope"> <template #default="scope">
<div <div
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined"> v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">

View File

@@ -136,6 +136,7 @@ const handleDelete = (row) => {
}) })
if (res.code === 1000) { if (res.code === 1000) {
formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1); formData.value.files.splice(formData.value.files.findIndex((item) => item.id === row.fileId), 1);
showTable.value = formData.value.files.length !== 0;
} }
}); });
} }
@@ -246,7 +247,7 @@ const init = async () => {
} else { } else {
ElNotification({ ElNotification({
title: '提示', title: '提示',
message: msg, message: res.msg,
type: 'error' type: 'error'
}) })
} }