feat: 修改单位下拉框获取数据方式,去掉采购项目编辑中的部分字段,去掉初步结论

This commit is contained in:
Xu Zhimeng 2024-10-29 10:44:19 +08:00
parent 0b5eab5fbd
commit 1dd9478745
5 changed files with 97 additions and 94 deletions

View File

@ -13,11 +13,14 @@
<a-select
v-model="tenderId"
show-search
:filter-option="filterOption"
:filter-option="false"
:default-active-first-option="false"
:maxTagCount="1"
placeholder="请选择参与单位"
style="width:350px">
<a-select-option v-for="item in allTender" :key="item.id" :value="item.id">{{ item.unitName }}
style="width:350px"
@search="handleSearchUnits"
>
<a-select-option v-for="item in filterdTender" :key="item.id" :value="item.id">{{ item.unitName }}
</a-select-option>
</a-select>
</div>
@ -58,14 +61,14 @@
<a-col class="col" :span="8">
<a-card title="违规次数统计" class="card-with-date-range">
<template #extra>
<a-radio-group v-model="violationTimesTab" button-style="solid">
<a-radio-button value="pie" style="padding: 0px 8px;">
<a-icon type="pie-chart" />
</a-radio-button>
<a-radio-button value="table" style="padding: 0px 8px;">
<a-icon type="table" />
</a-radio-button>
</a-radio-group>
<a-radio-group v-model="violationTimesTab" button-style="solid">
<a-radio-button value="pie" style="padding: 0px 8px;">
<a-icon type="pie-chart" />
</a-radio-button>
<a-radio-button value="table" style="padding: 0px 8px;">
<a-icon type="table" />
</a-radio-button>
</a-radio-group>
</template>
<v-chart v-if="violationTimesTab === 'pie'" :option="violationTimesChart" ref="winningAmountChart"/>
<a-table
@ -174,6 +177,8 @@ export default {
this.columns = columns
return {
allTender: [],
filterdTender: [], //
year: undefined,
tenderId: undefined,
yearNumberChart: {},
@ -202,6 +207,8 @@ export default {
getProjectNameList({}).then(res => {
this.allTender = res
const firstUnit = res[0]
this.handleSearchUnits(firstUnit ? firstUnit.unitName : '')
if (res.length) {
this.tenderId = res[0].id
this.year = dayjs().format('YYYY')
@ -257,11 +264,6 @@ export default {
this.getWinningAmountList()
this.getInvolvedTenderNumber()
},
filterOption (input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
)
},
getWinningList () {
winningList({ tenderId: this.tenderId }).then(res => {
this.winningList = res
@ -566,6 +568,15 @@ export default {
},
getTableIndex (idx) {
return idx + 1
},
//
handleSearchUnits (val) {
if (val) {
this.filterdTender = this.allTender.filter(item => item.unitName.toLowerCase().includes(val.toLowerCase()))
} else {
this.filterdTender = []
}
}
}
}

View File

@ -14,26 +14,22 @@
:rules="rules"
:labelCol="{ flex: '110px' }"
:wrapperCol="{ flex: 1, style: { overflow: 'hidden' } }">
<a-form-model-item label="采购月计划号" prop="projectNumber">
<a-input v-model="model.projectNumber" placeholder="请输入采购月计划号" :maxLength="30"/>
</a-form-model-item>
<a-form-model-item label="项目名称" prop="projectName">
<a-input v-model="model.projectName" placeholder="请输入项目名称" :maxLength="50"/>
</a-form-model-item>
<a-form-model-item label="所属科室" prop="department">
<a-select
v-model="model.department"
:filter-option="filterOption"
:disabled="(!isAdmin && !isReviewer)"
show-search
placeholder="请选择科室名称">
<a-select-option v-for="item in deptList" :key="item.key">{{ item.title }}</a-select-option>
</a-select>
</a-form-model-item>
<a-row>
<a-col :span="12">
<a-form-model-item label="项目来源" prop="projectSource">
<a-input v-model="model.projectSource" placeholder="请输入项目来源" :maxLength="50"/>
<a-col :span="24">
<a-form-model-item label="采购月计划号" prop="projectNumber">
<a-input v-model="model.projectNumber" placeholder="请输入采购月计划号" :maxLength="30"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="所属科室" prop="department">
<a-select
v-model="model.department"
:filter-option="filterOption"
:disabled="(!isAdmin && !isReviewer)"
show-search
placeholder="请选择科室名称">
<a-select-option v-for="item in deptList" :key="item.key">{{ item.title }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -41,8 +37,6 @@
<a-input v-model="model.procurementContent" placeholder="请输入采购内容" :maxLength="50"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="采购方式" prop="procurementType">
<dict-select v-model="model.procurementType" dic-type="procurementType" placeholder="请选择采购方式" />
@ -53,8 +47,6 @@
<a-input v-model="model.agent" placeholder="请输入经办人" :maxLength="10"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="组织形式" prop="organizationalForm">
<dict-select v-model="model.organizationalForm" dic-type="organizationalFormType" placeholder="请输入组织形式" />
@ -65,38 +57,23 @@
<dict-select v-model="model.infoPublish" dic-type="infoPublishType" placeholder="请输入信息发布" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="预算金额" prop="budget">
<a-input-number
style="width: calc(100% - 60px);marginRight: 10px"
v-model="model.budget"
:precision="4"
placeholder="请输入预算金额" />万元
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购进度" prop="nextMonthPlan">
<dict-select v-model="model.nextMonthPlan" dic-type="procurementProgressType" placeholder="请输入采购进度" />
</a-form-model-item>
</a-col>
</a-row>
<a-form-model-item label="参与单位" prop="participateUnit">
<!-- <a-select v-model="model.participateUnit" :filter-option="filterOption" mode="multiple" placeholder="请选择参与单位">
<a-select-option v-for="item in allTender" :key="item.id" :value="item.id">{{ item.unitName }}
</a-select-option>
</a-select> -->
<a-tooltip :trigger="['focus']" placement="topLeft" overlay-class-name="numeric-input">
<template #title>
<span class="numeric-input-title">
{{ participateUnitTips }}
</span>
</template>
<a-input v-model="model.participateUnit" @blur="participateUnitChange" placeholder="请输入参与单位" />
</a-tooltip>
</a-form-model-item>
<a-row>
<a-col :span="24">
<a-form-model-item label="参与单位" prop="participateUnit">
<a-tooltip :trigger="['focus']" placement="topLeft" overlay-class-name="numeric-input">
<template #title>
<span class="numeric-input-title">
{{ participateUnitTips }}
</span>
</template>
<a-input v-model="model.participateUnit" @blur="participateUnitChange" placeholder="请输入参与单位" />
</a-tooltip>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="中标单位" prop="winningUnit">
<a-select v-model="model.winningUnit" :filter-option="filterOption" placeholder="请选择中标单位">
@ -125,26 +102,6 @@
style="width:100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="12">
<a-form-model-item label="项目编号" prop="projectNumber">
<a-input v-model="model.projectNumber" placeholder="请输入项目编号" />
</a-form-model-item>
</a-col> -->
<!-- <a-col :span="12">
<a-form-model-item label="查重结果" prop="checkResults">
<a-input v-model="model.checkResults" placeholder="请输入查重结果" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="查重时间" prop="checkTime">
<a-date-picker
v-model="model.checkTime"
show-time
valueFormat="YYYY-MM-DD HH:mm:ss"
placeholder="请选择查重时间"
style="width:100%" />
</a-form-model-item>
</a-col> -->
</a-row>
</a-form-model>
</a-modal>

View File

@ -63,16 +63,32 @@
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="中标单位">
<a-select v-model="queryParam.winningUnit" :filter-option="filterOption" placeholder="请选择中标单位" allow-clear show-search>
<a-select-option v-for="item in allTender" :key="item.id" :value="item.id">{{ item.unitName }}
<a-select
v-model="queryParam.winningUnit"
:filter-option="false"
:default-active-first-option="false"
placeholder="请选择中标单位"
allow-clear
show-search
@search="handleSearchWinningUnits">
<a-select-option v-for="item in winningUnits" :key="item.id" :value="item.id">
{{ item.unitName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="参与单位">
<a-select v-model="queryParam.participateUnit" :filter-option="filterOption" placeholder="请选择参与单位" allow-clear show-search>
<a-select-option v-for="item in allTender" :key="item.id" :value="item.id">{{ item.unitName }}
<a-select
v-model="queryParam.participateUnit"
:filter-option="false"
:default-active-first-option="false"
placeholder="请选择参与单位"
allow-clear
show-search
@search="handleSearchParticipateUnits">
<a-select-option v-for="item in participateUnits" :key="item.id" :value="item.id">
{{ item.unitName }}
</a-select-option>
</a-select>
</a-form-item>
@ -471,6 +487,9 @@ export default {
importVisible: false,
logPerviewVisible: false,
allTender: [],
winningUnits: [], //
participateUnits: [], //
deptList: [],
projectFileColumns,
expandedRowKeys: [],
@ -970,6 +989,22 @@ export default {
return 'display:none;'
}
return 'width: 60%; display:inline-block;padding-left: 10px;'
},
//
handleSearchWinningUnits (val) {
if (val) {
this.winningUnits = this.allTender.filter(item => item.unitName.toLowerCase().includes(val.toLowerCase()))
} else {
this.winningUnits = []
}
},
//
handleSearchParticipateUnits (val) {
if (val) {
this.participateUnits = this.allTender.filter(item => item.unitName.toLowerCase().includes(val.toLowerCase()))
} else {
this.participateUnits = []
}
}
},
computed: {

View File

@ -142,10 +142,10 @@
<a-col class="value">
{{ detail.similarity + '%' }}
</a-col>
<a-col :offset="2" span="5" class="label"> 初步结论</a-col>
<!-- <a-col :offset="2" span="5" class="label"> 初步结论</a-col>
<a-col class="value">
<span :style="{color:detail.rgba|| '#333'}">{{ detail.conclusion }}</span>
</a-col>
</a-col> -->
</a-row>
<a-row v-if="false" type="flex">
<a-col span="6" class="label"> 排除本人已发表作品相似比</a-col>

View File

@ -12,10 +12,10 @@
<a-col class="value">
{{ item.similarity + '%' }}
</a-col>
<a-col :offset="2" span="5" class="label"> 初步结论</a-col>
<!-- <a-col :offset="2" span="5" class="label"> 初步结论</a-col>
<a-col class="value">
<span :style="{ color: item.rgba || '#333' }">{{ item.conclusion }}</span>
</a-col>
</a-col> -->
</a-row>
</div>