fix : 修复页面细节

This commit is contained in:
2024-05-23 15:36:57 +08:00
parent e9e5a0c785
commit bcdafbc7cd
3 changed files with 28 additions and 4 deletions

View File

@@ -8,11 +8,13 @@
</template>
<script setup lang="jsx">
import {useAuthStore} from '@/stores/userstore.js'
import Tag from '@/components/Tag.vue'
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {ElMessage} from "element-plus";
import {deleteDemand} from "@/api/project-demand";
const authStore = useAuthStore()
const router = useRouter()
const searchConfig = reactive([
{
@@ -39,6 +41,7 @@ const searchConfig = reactive([
}
])
const tableIns = ref()
const userInfo = ref(authStore.userinfo)
const tableConfig = reactive({
columns: [
{
@@ -55,6 +58,13 @@ const tableConfig = reactive({
label: '征集类型',
align: 'center'
},
{
prop: 'companyName',
label: '所属公司',
align: 'center',
currentRender: ({row, index}) => (
<div style={{width: '300px',textOverflow: 'ellipsis'}}>{row.companyName}</div>)
},
{
prop: 'approveName',
label: '审批人',
@@ -84,6 +94,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
console.log('row',row.buttons)
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3' || row.state === '2') {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
@@ -104,7 +115,8 @@ const tableConfig = reactive({
}
{
row.state === '3' || row.state === '2' ?
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'} onDelete={() => handleDelete(row)}/> : ''
<popover-delete name={row.requirementName} type={'需求征集'} btnType={'danger'}
onDelete={() => handleDelete(row)}/> : ''
}
</div>
)
@@ -119,13 +131,16 @@ const tableConfig = reactive({
params: {}
})
console.log('userInfo',userInfo.value.userName)
const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()
}
const handleAdd = () => {
router.push({
name: 'Collection/add',
// name: 'Add',
path: '/project/demand/collection/add',
query: {
isAdd: 1
}

View File

@@ -148,7 +148,7 @@ const tableConfig = reactive({
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
// if (row.state === '3') {
btn.push({label: '附件', func: () => handleCheck(row), type: 'primary'})
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
// } else if (row.state === '4') {
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
@@ -189,6 +189,15 @@ const handleDetail = (row) => {
}
})
}
const handleAttachment = (row) => {
router.push({
name:'Filing/attachment',
query: {
id: row.requirementId,
projectId: row.projectId
}
})
}
const handleConclusion = (row) => {
router.push({
name:'Filing/conclusion',

View File

@@ -230,7 +230,7 @@ const handleAttachment = (row) => {
router.push({
name: 'Implementation/attachment',
query: {
id: row.requirementId
id: row.projectId
}
})
}