fix : 修复需求汇总的征集名称匹配及注释部分log

This commit is contained in:
2024-10-26 21:02:53 +08:00
parent 1a72339ade
commit 49596316f2
9 changed files with 43 additions and 30 deletions

View File

@@ -6,7 +6,6 @@ import {ElLoading} from 'element-plus'
const authStore = useAuthStore()
const router = useRouter();
const tokenValue = reactive(router.currentRoute.value.query.token)
console.log('tokenValue', tokenValue)
const init = () => {
const loading = ElLoading.service({
lock: true,
@@ -16,7 +15,6 @@ const init = () => {
if (authStore.casToken(tokenValue)) {
loading.close()
const toView = sessionStorage.getItem('toView')
console.log(toView, 'toView');
if (toView) {
let parse = JSON.parse(toView);
window.location.href = window.location.origin + parse.path + parse.query

View File

@@ -1,12 +1,12 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px" ></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
@selectionChange="selectionChange"></fvTable>
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {addPlan} from "@/api/project-demand/summary";
import {addPlan,getRequirementName} from "@/api/project-demand/summary";
const tableIns = ref()
const router = useRouter()
@@ -40,17 +40,37 @@ const shortcuts = [
},
},
]
const searchConfig = reactive([
const searchConfig = ref([
{
label: '征集名称',
prop: 'requirementName',
props: {
placeholder: '请输入征集名称',
clearable: true,
checkStrictly: true
filterable: true,
options: [],
remote: true,
remoteMethod:async (val)=>{
// requirementNameValue.value=val
// search({requirementName:val})
if(val){
const res=await getRequirementName(val)
if(res.code==1000){
let optionObj={}
let options=[]
res.data.forEach(item=>{
optionObj={
value:item,
label:item
}
options.push(optionObj)
})
searchConfig.value.find(item => item.prop == 'requirementName').props.options = options
}
}
}
},
component: 'el-input',
colProps: {}
component: shallowRef(fvSelect),
},
{
label: '项目类型',
@@ -219,7 +239,7 @@ const tableConfig = reactive({
prop: 'projectImpact',
label: '项目影响',
align: 'center',
width: 100,
width: 120,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectImpact !== null) {
@@ -237,6 +257,20 @@ const tableConfig = reactive({
return row.startTime + ' 至 ' + row.endTime
}
},
// {
// prop: 'approveName',
// label: '当前审批节点',
// align: 'center',
// width: 120,
// currentRender: ({row, index}) => {
// if (row.state == '1') {
// return <span>{row.approveName}</span>
// } else {
// return <span>{row.taskNode}</span>
// }
// }
// },
{
prop: 'state',
label: '状态',
@@ -368,16 +402,6 @@ const handleEdit = (row) => {
}
})
}
// const handleDetail = (row) => {
// router.push({
// name: 'Summary/detail',
// query: {
// id: row.requirementId == null ? '-1' : row.requirementId,
// projectId: row.projectId,
// state: row.state
// }
// })
// }
const handleDetail = (row) => {
router.push({