169 lines
3.1 KiB
Vue
169 lines
3.1 KiB
Vue
<template>
|
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
|
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
|
</template>
|
|
|
|
<script setup lang="jsx">
|
|
import { reactive, ref, shallowRef } from 'vue';
|
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
|
import { useRouter } from 'vue-router';
|
|
|
|
const localData = reactive({
|
|
|
|
})
|
|
|
|
const tableIns= ref()
|
|
const router = useRouter()
|
|
|
|
|
|
const searchConfig = reactive([
|
|
{
|
|
label: '名称',
|
|
prop: 'name',
|
|
props: {
|
|
placeholder: '请输入'
|
|
},
|
|
component: 'el-input',
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '项目类型',
|
|
prop: 'projectType',
|
|
component: shallowRef(fvSelect),
|
|
props: {},
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '研发主体',
|
|
prop: 'productMainBody',
|
|
component: shallowRef(fvSelect),
|
|
props: {},
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '项目影响',
|
|
prop: 'projectEffect',
|
|
component: shallowRef(fvSelect),
|
|
props: {},
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '起止时间',
|
|
prop: 'time',
|
|
component: 'el-date-picker',
|
|
props: {},
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '最小金额',
|
|
prop: 'minMoney',
|
|
component: 'el-input',
|
|
colProps: {}
|
|
},
|
|
{
|
|
label: '最大金额',
|
|
prop: 'maxMoney',
|
|
component: 'el-input',
|
|
colProps: {}
|
|
},
|
|
])
|
|
|
|
const tableConfig = reactive({
|
|
columns: [
|
|
{
|
|
type: 'selection',
|
|
prop: 'selection'
|
|
},
|
|
{
|
|
prop: 'name',
|
|
label: '名称',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'company',
|
|
label: '所属公司',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'projectType',
|
|
label: '项目类型',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'productMainBody',
|
|
label: '研发主体',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'projectEffect',
|
|
label: '项目影响',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'survey',
|
|
label: '经营概况',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'time',
|
|
label: '起止时间',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'status',
|
|
label: '发布状态',
|
|
align: 'center'
|
|
},
|
|
{
|
|
prop: 'oper',
|
|
label: '操作',
|
|
align: 'center',
|
|
currentRender: ({row, index}) => {
|
|
return (
|
|
<div>
|
|
<el-button type={'primary'} link onClick={()=>{}} >详情</el-button>
|
|
<el-button type={'primary'} link onClick={()=>{}} >上报</el-button>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
],
|
|
api: '',
|
|
params: {},
|
|
btns: [
|
|
{name: '新增上报', key: 'add', type: 'primary', auth: ''},
|
|
{name: '年度计划导出', key: '_export', type: 'primary', auth: ''},
|
|
{name: '经费预算生成', key: 'preMonty', type: 'primary', auth: ''},
|
|
]
|
|
})
|
|
|
|
const search = (val) => {
|
|
let obj = {...val}
|
|
if(obj.time) {
|
|
obj.startTime = obj.time[0]
|
|
obj.endTime = obj.time[1]
|
|
delete obj.dateValue
|
|
}
|
|
tableConfig.params = obj
|
|
tableIns.value.refresh()
|
|
}
|
|
|
|
const headBtnClick = (key) => {
|
|
switch(key) {
|
|
case 'add': handleAdd()
|
|
break;
|
|
}
|
|
}
|
|
|
|
const handleAdd = () => {
|
|
router.push({
|
|
name: 'Summary/add',
|
|
query: {}
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
</style>
|