Merge pull request 'dj' (#178) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/178
This commit is contained in:
2024-05-14 16:27:50 +00:00
6 changed files with 294 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "check"
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,49 @@
<template>
<div class="detail-block">
<el-tabs
v-model="activeName"
type="card"
class="demo-tabs"
@tab-click="handleClick"
>
<el-tab-pane label="需求征集" name="first">
</el-tab-pane>
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
<el-tab-pane label="项目立项" name="third" ></el-tab-pane>
<el-tab-pane label="项目实施" name="third" :disabled="true"></el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="jsx">
const activeName = ref('first')
const handleClick = (tab, event) => {
console.log(tab, event)
if(tab.index.value === 0){
}
}
</script>
<style scoped lang="scss">
.detail-block{
padding-top: 15px;
:deep(.el-tabs__nav-scroll){
width: 100%;
display: flex;
.el-tabs__nav{
display: flex;
flex: 1;
.el-tabs__item{
flex: 1;
font-size: 16px;
}
.is-active{
color: black;
background-color: #DED0B2;
}
}
}
}
</style>

View File

@@ -1,15 +1,195 @@
<template>
<div>
项目实施
</div>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig">
<template #empty>
<el-empty description="暂无数据"/>
</template>
</fvTable>
</template>
<script>
export default {
name: "index"
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue";
const router = useRouter()
const searchConfig = reactive([
{
label: '名称',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入名称查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '项目类型',
prop: 'collectType',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目类型',
clearable: true,
filterable: true,
}
},
{
label: '项目影响',
prop: 'projectEffect',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择项目影响',
clearable: true,
filterable: true,
},
colProps: {}
},
{
label: '研发主体',
prop: 'collectType',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择研发主体',
clearable: true,
filterable: true,
}
},
{
label: '起止时间',
prop: 'time',
component: 'el-date-picker',
props: {
placeholder: '请选择起止时间',
clearable: true,
},
colProps: {}
},
{
label: '最小金额',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '最大金额',
prop: 'requirementName',
component: 'el-input',
props: {
placeholder: '请输入金额查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
])
const tableIns = ref()
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',
showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
},
{
prop: 'oper',
label: '操作',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
if (row.state === '3') {
btn.push({label: '验收', func: () => handleCheck(row), type: 'primary'})
} else if (row.state === '4') {
btn.push({label: '台账', func: () => handleStandingBook(row), type: 'primary'})
btn.push({label: '附件', func: () => handleAttachment(row), type: 'primary'})
btn.push({label: '分摊', func: () => handleShare(row), type: 'primary'})
}
return (
<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>
)
}
}
],
api: '',
params: {},
btns: [
{name: '生成分摊报表', key: '_export', color: '#DED0B2',auth: ''}
]
})
const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()
}
const handleDetail = (row) => {
router.push({
name:'Implementation/detail',
query: {
id: row.requirementId
}
})
}
</script>
<style scoped>
</style>

View File

@@ -1,12 +1,48 @@
<template>
<div>
项目立项详情
<div class="detail-block">
<el-tabs
v-model="activeName"
type="card"
class="demo-tabs"
@tab-click="handleClick"
>
<el-tab-pane label="需求征集" name="first">
</el-tab-pane>
<el-tab-pane label="需求上报" name="second"></el-tab-pane>
<el-tab-pane label="项目立项" name="third" :disabled="true"></el-tab-pane>
</el-tabs>
</div>
</template>
<script setup lang="jsx">
const activeName = ref('first')
const handleClick = (tab, event) => {
console.log(tab, event)
if(tab.index.value === 0){
}
}
</script>
<style scoped>
<style scoped lang="scss">
.detail-block{
padding-top: 15px;
:deep(.el-tabs__nav-scroll){
width: 100%;
display: flex;
.el-tabs__nav{
display: flex;
flex: 1;
.el-tabs__item{
flex: 1;
font-size: 16px;
}
.is-active{
color: black;
background-color: #DED0B2;
}
}
}
}
</style>

View File

@@ -1,12 +0,0 @@
<template>
<div>
项目立项编辑
</div>
</template>
<script setup lang="jsx">
</script>
<style scoped>
</style>

View File

@@ -129,7 +129,7 @@ const tableConfig = reactive({
},
{
prop: 'status',
label: '发布状态',
label: '状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => (<Tag dictType={'process_state'} value={row.state}/>)
@@ -165,7 +165,7 @@ const tableConfig = reactive({
}
}
],
api: '/workflow/mosr/requirement',
api: '',
params: {},
})