fix : 修复页面

This commit is contained in:
2024-05-19 18:00:48 +08:00
parent 1fc0ae6ac0
commit 08a609e2a8
7 changed files with 291 additions and 156 deletions

View File

@@ -4,15 +4,13 @@
</template>
<script setup lang="jsx">
import { reactive, ref, shallowRef } from 'vue';
import {reactive, ref, shallowRef} from 'vue';
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import { useRouter } from 'vue-router';
import {useRouter} from 'vue-router';
const localData = reactive({
const localData = reactive({})
})
const tableIns= ref()
const tableIns = ref()
const router = useRouter()
@@ -99,11 +97,6 @@ const tableConfig = reactive({
label: '项目影响',
align: 'center'
},
{
prop: 'survey',
label: '经营概况',
align: 'center'
},
{
prop: 'startTime',
label: '起止时间',
@@ -115,9 +108,9 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if(row.state!==null){
if (row.state !== null) {
return (<Tag dictType={'demand_collection'} value={row.state}/>)
}else {
} else {
return '--'
}
}
@@ -128,11 +121,27 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3') {
btn.push({label: '编辑', func: () => handleEdit(row), type: 'primary'})
} else if (row.state === '0') {
btn.push({label: '上报', func: () => handleAdd(row), type: 'primary'})
}
return (
<div>
<el-button type={'primary'} link onClick={()=>handleDetail(row)} >详情</el-button>
<el-button type={'primary'} link onClick={()=>handleAdd(row)} >上报</el-button>
</div>
<div style={{width: '100%'}}>
{
btn.map(item => (
<el-button
type={item.type}
// v-perm={item.auth}
onClick={() => item.func()}
link
>
{item.label}
</el-button>
))
}
</div>
)
}
}
@@ -140,15 +149,14 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect',
params: {},
btns: [
// {name: '新增上报', key: 'add', type: 'primary', auth: ''},
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
{name: '年度计划导出', key: '_export', color: '#DED0B2', auth: ''},
{name: '经费预算生成', key: 'preMonty', color: '#DED0B2', auth: ''},
]
})
const search = (val) => {
let obj = {...val}
if(obj.time) {
if (obj.time) {
obj.startTime = obj.time[0]
obj.endTime = obj.time[1]
delete obj.dateValue
@@ -158,8 +166,9 @@ const search = (val) => {
}
const headBtnClick = (key) => {
switch(key) {
case 'add': handleAdd()
switch (key) {
case 'add':
handleAdd()
break;
}
}
@@ -174,7 +183,7 @@ const handleDetail = (row) => {
router.push({
name: 'Summary/detail',
query: {
id:row.requirementId
id: row.requirementId
}
})
}