fix : 修复页面细节
This commit is contained in:
@@ -8,11 +8,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import Tag from '@/components/Tag.vue'
|
import Tag from '@/components/Tag.vue'
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {deleteDemand} from "@/api/project-demand";
|
import {deleteDemand} from "@/api/project-demand";
|
||||||
|
|
||||||
|
const authStore = useAuthStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
@@ -39,6 +41,7 @@ const searchConfig = reactive([
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
|
const userInfo = ref(authStore.userinfo)
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -55,6 +58,13 @@ const tableConfig = reactive({
|
|||||||
label: '征集类型',
|
label: '征集类型',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'companyName',
|
||||||
|
label: '所属公司',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => (
|
||||||
|
<div style={{width: '300px',textOverflow: 'ellipsis'}}>{row.companyName}</div>)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'approveName',
|
prop: 'approveName',
|
||||||
label: '审批人',
|
label: '审批人',
|
||||||
@@ -84,6 +94,7 @@ const tableConfig = reactive({
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
|
console.log('row',row.buttons)
|
||||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
if (row.state === '3' || row.state === '2') {
|
if (row.state === '3' || row.state === '2') {
|
||||||
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
|
||||||
@@ -104,7 +115,8 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
row.state === '3' || row.state === '2' ?
|
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>
|
</div>
|
||||||
)
|
)
|
||||||
@@ -119,13 +131,16 @@ const tableConfig = reactive({
|
|||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('userInfo',userInfo.value.userName)
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
tableConfig.params = {...val}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Collection/add',
|
// name: 'Add',
|
||||||
|
path: '/project/demand/collection/add',
|
||||||
query: {
|
query: {
|
||||||
isAdd: 1
|
isAdd: 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||||
// if (row.state === '3') {
|
// 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') {
|
// } else if (row.state === '4') {
|
||||||
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
|
btn.push({label: '结项', func: () => handleConclusion(row), type: 'primary'})
|
||||||
btn.push({label: '编辑', func: () => handleEdit(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) => {
|
const handleConclusion = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Filing/conclusion',
|
name:'Filing/conclusion',
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ const handleAttachment = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/attachment',
|
name: 'Implementation/attachment',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user