Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-science-front
Commits
05d7e479
Commit
05d7e479
authored
Dec 30, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
222
parent
2b07f15d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
245 additions
and
943 deletions
+245
-943
index.js
src/api/index.js
+0
-23
index.js
src/router/index.js
+0
-3
projAcountSet.vue
src/views/projAcountSet/projAcountSet.vue
+0
-202
Index.vue
src/views/timeSet/batch/Index.vue
+2
-6
batchEdit.vue
src/views/timeSet/batch/components/batchEdit.vue
+8
-24
Index.vue
src/views/timeSet/checkTimeSet/Index.vue
+0
-232
Index.vue
src/views/timeSet/projectTimeSet/Index.vue
+0
-236
Index.vue
src/views/timeSet/taskTimeSet/Index.vue
+59
-172
timeEdit.vue
src/views/timeSet/taskTimeSet/components/timeEdit.vue
+176
-0
unitCount.vue
src/views/unit/components/unitCount.vue
+0
-45
No files found.
src/api/index.js
View file @
05d7e479
...
...
@@ -602,15 +602,6 @@ export default {
getCurrentReportYearList
(
params
)
{
return
fetch
(
`/v1/science-admin/com-batch/getCurrentReportYearList`
,
params
)
},
getListByPage
(
params
)
{
return
fetch
(
`/v1/science-admin/com-year/getListByPage`
,
params
)
},
getApplyYearList
(
params
)
{
return
fetch
(
'/v1/science-admin/com-year/getApplyYearList'
,
params
)
},
addOrUpdateYearInfo
(
params
)
{
return
fetch
(
'/v1/science-admin/com-year/addOrUpdateYearInfo'
,
params
,
'post'
,
'json'
)
},
getBatchById
(
params
)
{
return
fetch
(
`/v1/science-admin/com-batch/getBatchById/`
,
params
)
},
...
...
@@ -621,22 +612,8 @@ export default {
return
fetch
(
'/v1/science-admin/com-batch/getBatchList'
,
params
)
}
},
year
:
{
getYearByTreeCode
(
params
)
{
return
fetch
(
`/v1/science-admin/com-year/getYearByTreeCode`
,
params
)
},
getYearInfo
(
params
)
{
return
fetch
(
`/v1/science-admin/com-year/getYearInfo`
,
params
)
},
},
//系统管理接口
systemManage
:
{
getUnitProjLimit
(
params
)
{
return
fetch
(
'/v1/science-admin/com-unit/getUnitProjLimit'
,
params
)
},
updateUnitProjLimit
(
params
)
{
return
fetch
(
'/v1/science-admin/com-unit/updateUnitProjLimit'
,
params
,
'put'
,
'json'
)
},
getRoleListByPage
(
params
)
{
return
fetch
(
'/v1/science-admin/system-role/getListByPage'
,
params
)
},
...
...
src/router/index.js
View file @
05d7e479
...
...
@@ -243,11 +243,8 @@ export const routes = [
meta
:
{
title
:
'系统设置'
,
icon
:
'el-icon-s-tools'
},
hidden
:
false
,
children
:
[
{
path
:
'/timeSet/projectTimeSet'
,
name
:
'申报时间设置'
,
component
:
()
=>
import
(
'@/views/timeSet/projectTimeSet/Index.vue'
),
meta
:
{
title
:
'申报时间设置'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/timeSet/taskTimeSet'
,
name
:
'合同书时间设置'
,
component
:
()
=>
import
(
'@/views/timeSet/taskTimeSet/Index.vue'
),
meta
:
{
title
:
'合同书时间设置'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/timeSet/checkTimeSet'
,
name
:
'中期考核时间设置'
,
component
:
()
=>
import
(
'@/views/timeSet/checkTimeSet/Index.vue'
),
meta
:
{
title
:
'中期考核时间设置'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/setting/batch'
,
name
:
'申报批次设置'
,
component
:
()
=>
import
(
'@/views/timeSet/batch/Index.vue'
),
meta
:
{
title
:
'申报批次设置'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/setting/count'
,
name
:
'申报名额配比'
,
component
:
()
=>
import
(
'@/views/projAcountSet/projAcountSet.vue'
),
meta
:
{
title
:
'申报名额配比管理'
,
icon
:
''
,
noCache
:
true
}
},
{
path
:
'/system/evaluationStandard'
,
name
:
'年度评审标准设置'
,
component
:
()
=>
import
(
'@/views/system/evaluationStandard/index.vue'
),
meta
:
{
title
:
'年度评审标准设置'
,
icon
:
''
,
noCache
:
true
}
},
//后台
{
path
:
'/system/role'
,
name
:
'角色管理'
,
component
:
()
=>
import
(
'@/views/system/role/index.vue'
),
meta
:
{
title
:
'角色管理'
,
icon
:
''
,
noCache
:
true
}
},
...
...
src/views/projAcountSet/projAcountSet.vue
deleted
100644 → 0
View file @
2b07f15d
<
template
>
<div
class=
"card-container"
>
<a-tabs
type=
"card"
@
change=
"tabChange"
>
<a-tab-pane
key=
"1"
tab=
"市州(含辖区所有医疗机构)"
>
<div
class=
"from-table"
>
<a-row>
<a-col
style=
"text-align:center;"
>
<span
style=
"font-size:20pt"
>
{{
year
}}
年度州市医疗行政单位配比
</span>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"24/colCounts[colCountKey]/2"
class=
"bg-light_blue"
>
名额配比数量批量设置:
</a-col>
<a-col
:span=
"24/colCounts[colCountKey]/2"
>
<a-input-number
v-model=
"batchValueCount"
:min=
"0"
:max=
"1000"
/>
</a-col>
<a-col
:span=
"24/colCounts[colCountKey]/2"
>
<a-button
type=
"primary"
@
click=
"setBatchUnitCount"
>
批量设置
</a-button>
</a-col>
<a-col
:span=
"6"
>
州市行政机构数:
<span
style=
"color:red"
>
{{
unitGovCount
}}
</span>
</a-col>
<a-col
:span=
"9"
>
</a-col>
</a-row>
<a-row>
<unit-count
v-for=
"unit in unitGovInfo"
:key=
"unit.id"
:Unit=
"unit"
:colCount=
"24/colCounts[colCountKey]"
@
valueChange=
"valueChange"
/>
</a-row>
<a-row>
<a-col
style=
"text-align:center;"
>
<a-button
type=
"primary"
@
click=
"saveUnitCount"
>
保存
</a-button>
</a-col>
</a-row>
</div>
</a-tab-pane>
<a-tab-pane
key=
"2"
tab=
"省直属单位名额配比"
>
<div
class=
"from-table"
>
<a-row>
<a-col
style=
"text-align:center;"
>
<span
style=
"font-size:20pt"
>
{{
year
}}
年度省直医疗机构配比设置
</span>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"24/colCounts[colCountKey]/2"
class=
"bg-light_blue"
>
名额配比数量批量设置:
</a-col>
<a-col
:span=
"24/colCounts[colCountKey]/2"
>
<a-input-number
v-model=
"batchValueCount"
:min=
"0"
:max=
"1000"
/>
</a-col>
<a-col
:span=
"24/colCounts[colCountKey]/2"
>
<a-button
type=
"primary"
@
click=
"setBatchUnitCount"
>
批量设置
</a-button>
</a-col>
<a-col
:span=
"6"
>
省直医疗机构数:
<span
style=
"color:red"
>
{{
unitComCount
}}
</span>
</a-col>
<a-col
:span=
"9"
>
</a-col>
</a-row>
<a-row>
<unit-count
v-for=
"unit in unitComInfo"
:key=
"unit.id"
:Unit=
"unit"
:colCount=
"24/colCounts[colCountKey]"
/>
</a-row>
<a-row>
<a-col
style=
"text-align:center;"
>
<a-button
type=
"primary"
@
click=
"saveUnitCount"
>
保存
</a-button>
</a-col>
</a-row>
</div>
</a-tab-pane>
</a-tabs>
</div>
<!--
<a-row>
<a-col></a-col>
</a-row>
-->
</
template
>
<
script
>
import
{
isEmptyParams
}
from
"@/views/utils/common"
import
UnitCount
from
"@/views/unit/components/unitCount.vue"
import
moment
from
"moment"
export
default
{
name
:
"projAcountSet"
,
components
:
{
UnitCount
,
},
data
()
{
const
colCounts
=
{};
[
2
,
3
,
4
,
6
,
8
,
12
].
forEach
((
value
,
i
)
=>
{
colCounts
[
i
]
=
value
;
});
return
{
unitGovInfo
:
[],
unitComInfo
:
[],
colCounts
,
colCountKey
:
1
,
queryType
:
1
,
batchValueCount
:
0
,
year
:
moment
().
format
(
'YYYY'
),
unitGovCount
:
0
,
unitComCount
:
0
,
};
},
created
()
{
this
.
unitCount
()
},
methods
:
{
moment
,
tabChange
(
key
)
{
this
.
queryType
=
key
this
.
unitCount
()
},
unitCount
()
{
let
pars
=
{
queryType
:
this
.
queryType
}
let
par
=
{
...
pars
,
}
this
.
$api
.
systemManage
.
getUnitProjLimit
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
if
(
this
.
queryType
==
1
)
{
this
.
unitGovInfo
=
data
this
.
unitGovCount
=
data
.
length
}
else
{
this
.
unitComInfo
=
data
this
.
unitComCount
=
data
.
length
}
}
})
},
valueChange
(
unit
)
{
if
(
this
.
queryType
==
1
)
{
let
arr
=
this
.
unitGovInfo
.
filter
(
p
=>
p
.
id
===
unit
.
id
)
arr
[
0
].
projLimit
=
unit
.
projLimit
}
else
{
let
arr
=
this
.
unitComInfo
.
filter
(
p
=>
p
.
id
===
unit
.
id
)
arr
[
0
].
projLimit
=
unit
.
projLimit
}
},
setBatchUnitCount
()
{
if
(
this
.
queryType
==
1
)
this
.
unitGovInfo
.
forEach
(
p
=>
{
p
.
projLimit
=
this
.
batchValueCount
})
else
this
.
unitComInfo
.
forEach
(
p
=>
{
p
.
projLimit
=
this
.
batchValueCount
})
},
saveUnitCount
()
{
if
(
this
.
queryType
==
1
)
{
let
unitGovList
=
this
.
unitGovInfo
.
filter
(
p
=>
p
.
projLimit
!==
null
)
let
pars
=
unitGovList
this
.
$api
.
systemManage
.
updateUnitProjLimit
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
unitGovInfo
=
[]
this
.
$message
.
info
(
data
)
this
.
unitCount
()
}
})
}
else
{
let
unitComList
=
this
.
unitComInfo
.
filter
(
p
=>
p
.
projLimit
!==
null
)
let
pars
=
unitComList
this
.
$api
.
systemManage
.
updateUnitProjLimit
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
unitComInfo
=
[]
this
.
$message
.
info
(
data
)
this
.
unitCount
()
}
})
}
}
}
};
</
script
>
<
style
>
.card-container
{
background
:
#f5f5f5
;
overflow
:
hidden
;
padding
:
24px
;
}
.card-container
>
.ant-tabs-card
>
.ant-tabs-content
{
height
:
100vh
;
margin-top
:
-16px
;
}
.card-container
>
.ant-tabs-card
>
.ant-tabs-content
>
.ant-tabs-tabpane
{
background
:
#fff
;
padding
:
16px
;
}
.card-container
>
.ant-tabs-card
>
.ant-tabs-bar
{
border-color
:
#fff
;
}
.card-container
>
.ant-tabs-card
>
.ant-tabs-bar
.ant-tabs-tab
{
border-color
:
transparent
;
background
:
transparent
;
}
.card-container
>
.ant-tabs-card
>
.ant-tabs-bar
.ant-tabs-tab-active
{
border-color
:
#fff
;
background
:
#fff
;
}
</
style
>
src/views/timeSet/batch/Index.vue
View file @
05d7e479
...
...
@@ -32,12 +32,8 @@ export default {
{
key
:
'2'
,
title
:
'批次'
,
dataIndex
:
'batch'
,
align
:
'center'
},
{
key
:
'3'
,
title
:
'项目申报时间'
,
dataIndex
:
'reportStart'
,
colSpan
:
2
,
ellipsis
:
true
},
{
key
:
'4'
,
title
:
'项目申报时间'
,
dataIndex
:
'reportEnd'
,
colSpan
:
0
,
ellipsis
:
true
},
// { key: '5', title: '州市级及以下单位上报时间', dataIndex: 'unitStart', colSpan: 2, ellipsis: true },
// { key: '6', title: '州市级及以下单位上报时间', dataIndex: 'unitEnd', colSpan: 0, ellipsis: true },
// { key: '7', title: '州市级行政单位审核时间', dataIndex: 'prefectureStart', colSpan: 2, ellipsis: true },
// { key: '8', title: '州市级行政单位审核时间', dataIndex: 'prefectureEnd', colSpan: 0, ellipsis: true },
// { key: '9', title: '省直单位上报时间', dataIndex: 'provinceStart', colSpan: 2, ellipsis: true },
// { key: '10', title: '省直单位上报时间', dataIndex: 'provinceEnd', colSpan: 0, ellipsis: true },
{
key
:
'5'
,
title
:
'审核时间'
,
dataIndex
:
'auditStart'
,
colSpan
:
2
,
ellipsis
:
true
},
{
key
:
'6'
,
title
:
'审核时间'
,
dataIndex
:
'auditEnd'
,
colSpan
:
0
,
ellipsis
:
true
},
{
key
:
'11'
,
title
:
'专家评审时间'
,
dataIndex
:
'expertStart'
,
colSpan
:
2
,
ellipsis
:
true
},
{
key
:
'12'
,
title
:
'专家评审时间'
,
dataIndex
:
'expertEnd'
,
colSpan
:
0
,
ellipsis
:
true
},
{
key
:
'13'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
align
:
'center'
,
ellipsis
:
true
},
...
...
src/views/timeSet/batch/components/batchEdit.vue
View file @
05d7e479
...
...
@@ -30,17 +30,17 @@
</a-form-model-item>
</a-col>
</a-row>
<
!--
<
a-row>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div
class=
"required"
>
州市级及以下单位上报
时间
</div>
<div
class=
"required"
>
审核
时间
</div>
</a-col>
<a-col
:span=
"18"
>
<a-form-model-item
ref=
"unitRange"
prop=
"unitRange"
>
<a-range-picker
v-model=
"formData.
unitRange"
show-time
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
@
change=
"un
itDateChange"
:placeholder=
"['开始时间', '结束时间']"
/>
<a-range-picker
v-model=
"formData.
auditRange"
show-time
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
@
change=
"aud
itDateChange"
:placeholder=
"['开始时间', '结束时间']"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<
!--
<
a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div
class=
"required"
>
州市级行政单位审核时间
</div>
</a-col>
...
...
@@ -115,9 +115,7 @@ export default {
expertEnd
:
''
,
remark
:
''
,
reportRange
:
[],
unitRange
:
[],
prefectureRange
:
[],
provinceRange
:
[],
auditRange
:
[],
expertRange
:
[],
projType
:
getType
()
},
...
...
@@ -126,7 +124,7 @@ export default {
year
:
{
required
:
true
,
message
:
'请输入申报年度'
},
batch
:
{
required
:
true
,
message
:
'请输入申报批次'
},
reportRange
:
[{
required
:
true
,
validator
:
checkDateRange
,
trigger
:
'blur'
}],
// un
itRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }],
aud
itRange
:
[{
required
:
true
,
validator
:
checkDateRange
,
trigger
:
'blur'
}],
// prefectureRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }],
// provinceRange: [{ required: true, validator: checkDateRange, trigger: 'blur' }],
expertRange
:
[{
required
:
true
,
validator
:
checkDateRange
,
trigger
:
'blur'
}],
...
...
@@ -165,9 +163,7 @@ export default {
this
.
formData
.
expertEnd
=
data
.
expertEnd
this
.
formData
.
remark
=
data
.
remark
this
.
formData
.
reportRange
=
[
data
.
reportStart
,
data
.
reportEnd
]
// this.formData.unitRange = [data.unitStart, data.unitEnd]
// this.formData.prefectureRange = [data.prefectureStart, data.prefectureEnd]
// this.formData.provinceRange = [data.provinceStart, data.provinceEnd]
this
.
formData
.
auditRange
=
[
data
.
auditStart
,
data
.
auditEnd
]
this
.
formData
.
expertRange
=
[
data
.
expertStart
,
data
.
expertEnd
]
}
this
.
loading
=
false
...
...
@@ -203,24 +199,12 @@ export default {
this
.
formData
.
reportEnd
=
dateStrings
[
1
]
}
},
un
itDateChange
(
dates
,
dateStrings
)
{
aud
itDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
unitStart
=
dateStrings
[
0
]
this
.
formData
.
unitEnd
=
dateStrings
[
1
]
}
},
prefectureDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
prefectureStart
=
dateStrings
[
0
]
this
.
formData
.
prefectureEnd
=
dateStrings
[
1
]
}
},
provinceDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
provinceStart
=
dateStrings
[
0
]
this
.
formData
.
provinceEnd
=
dateStrings
[
1
]
}
},
expertDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
expertStart
=
dateStrings
[
0
]
...
...
src/views/timeSet/checkTimeSet/Index.vue
deleted
100644 → 0
View file @
2b07f15d
<
template
>
<div>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-button
type=
"primary"
class=
"search_input"
style=
"margin-right: 10px;"
v-if=
"isButten"
@
click=
"createYear"
>
添加
</a-button>
<span
:style=
"
{color:'#DC143C'}">
{{
description
}}
</span>
</a-form>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:pagination=
"false"
:loading=
"loading"
>
<template
slot=
"option"
slot-scope=
"record"
>
<a-button
type=
"primary"
size=
"small"
@
click=
"editYear(record)"
>
修改
</a-button>
<a-button
type=
"danger"
size=
"small"
@
click=
"deleteYear(record)"
>
删除
</a-button>
</
template
>
</a-table>
<a-pagination
v-if=
"pagination.total > 0"
:total=
"pagination.total"
show-size-changer
show-quick-jumper
v-model=
"pagination.pageIndex"
:page-size=
"pagination.pageSize"
:page-size-options=
"pagination.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"change"
:showTotal=
"() => `共 ${pagination.total} 条`"
/>
<a-modal
:visible=
"visibleEdit"
:title=
"'添加/修改'"
@
cancel=
"close"
@
ok=
"submit"
:maskClosable=
"false"
:width=
"800"
destroyOnClose
>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:label-col=
"{span: 6}"
:wrapper-col=
"{span: 17}"
>
<a-form-model-item
label=
"申报年度"
prop=
"reportYear"
>
<a-input
v-model=
"formData.reportYear"
placeholder=
"申报年度"
:disabled=
"disabled"
style=
"width: 120px"
></a-input>
</a-form-model-item>
<a-form-model-item
label=
"申报时间"
prop=
"startTime"
>
<a-form-model-item
prop=
"startTime"
style=
"flex-basis:30%;"
>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.startTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
<span>
~
</span>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.endTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"中期考核年度"
prop=
"checkYear"
v-if=
"display"
>
<a-input
v-model=
"formData.checkYear"
placeholder=
"中期考核年度"
></a-input>
</a-form-model-item>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-textarea
placeholder=
""
v-model=
"formData.remark"
:rows=
"3"
/>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<
script
>
import
{
isEmptyParams
}
from
"@/views/utils/common"
;
import
moment
from
'moment'
;
export
default
{
name
:
'projectTimeSet'
,
data
()
{
return
{
formData
:
{
id
:
undefined
,
reportYear
:
moment
().
format
(
'YYYY'
),
unitCode
:
''
,
yearType
:
1
,
//1项目 2任务书 3中期考核
startTime
:
''
,
endTime
:
''
,
remark
:
''
,
checkYear
:
''
,
created
:
''
,
updated
:
''
},
tableData
:
[],
columns
:
[],
pagination
:
{
pageIndex
:
1
,
pageSize
:
this
.
$defaultPageSize
,
total
:
0
,
pageSizeOptions
:
this
.
$defaultPageSizeOptions
,
},
// 弹窗标志
visibleEdit
:
false
,
loading
:
false
,
isButten
:
false
,
disabled
:
true
,
display
:
false
,
description
:
''
,
formRules
:
{
id
:
[{
required
:
false
}],
reportYear
:
[{
required
:
true
,
message
:
'请输入申报年度'
}],
unitCode
:
[{
required
:
true
,
message
:
'请输入单位编码'
}],
yearType
:
[{
required
:
true
,
message
:
'请选择年度类型'
}],
startTime
:
{
required
:
true
,
message
:
'请选择开始时间'
},
endTime
:
{
required
:
true
,
message
:
'请选择结束时间'
},
remark
:
[{
required
:
false
}],
checkYear
:
[{
required
:
true
,
message
:
'请填写中期审核年度'
}],
created
:
[{
required
:
false
}],
updated
:
[{
required
:
false
}]
}
}
},
created
()
{
this
.
InitApplyData
()
},
computed
:
{
},
methods
:
{
moment
,
InitApplyData
()
{
this
.
columns
=
[
{
title
:
'年度'
,
dataIndex
:
'reportYear'
},
{
title
:
'开始时间'
,
dataIndex
:
'startTime'
},
{
title
:
'结束时间'
,
dataIndex
:
'endTime'
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
]
this
.
getYearInfo
()
},
getYearInfo
()
{
let
len
=
this
.
$defaultLength
let
pars
=
{
type
:
3
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getListByPage
()
this
.
isButten
=
data
.
disabled
this
.
description
=
data
.
description
}
}).
catch
(()
=>
{
})
},
getListByPage
()
{
this
.
loading
=
true
let
pars
=
{
yearType
:
3
}
let
par
=
{
...
pars
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
}
this
.
$api
.
batch
.
getListByPage
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
const
{
dataList
=
[],
total
=
0
}
=
data
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
this
.
getListByPage
()
},
change
()
{
this
.
getListByPage
()
},
showSizeChange
(
current
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
current
this
.
pagination
.
pageSize
=
pageSize
this
.
getListByPage
()
},
// 起止日期选择处理
dateChange
(
value
)
{
let
statr
=
this
.
formData
.
startTime
let
end
=
this
.
formData
.
endTime
if
(
!
statr
||
!
end
)
{
return
}
if
(
statr
>
end
)
{
this
.
formData
.
startTime
=
end
this
.
formData
.
endTime
=
statr
}
},
createYear
()
{
let
pars
=
{
type
:
3
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
formData
.
reportYear
=
data
.
reportYear
this
.
formData
.
unitCode
=
data
.
unitCode
this
.
formData
.
yearType
=
data
.
yearType
this
.
formData
.
startTime
=
data
.
startTime
this
.
formData
.
endTime
=
data
.
endTime
this
.
formData
.
checkYear
=
''
this
.
formData
.
remark
=
''
}
}).
catch
(()
=>
{
})
this
.
visibleEdit
=
true
},
editYear
(
record
)
{
Object
.
assign
(
this
.
formData
,
record
);
this
.
visibleEdit
=
true
},
close
()
{
this
.
visibleEdit
=
false
},
submit
()
{
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
addOrUpdateYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'成功!'
)
this
.
visibleEdit
=
false
this
.
getYearInfo
()
this
.
getListByPage
()
}
})
}
})
},
deleteYear
(
record
)
{
this
.
$confirm
({
title
:
'删除'
,
content
:
'确定要删除该申报年度?'
,
okText
:
'确定'
,
okType
:
'danger'
,
cancelText
:
'取消'
,
onOk
()
{
let
pars
=
isEmptyParams
(
record
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
deleteApplyYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getYearInfo
()
this
.
getListByPage
()
this
.
$message
.
success
(
'删除成功!'
)
}
})
},
onCancel
()
{
},
})
}
},
watch
:
{
$route
()
{
this
.
InitApplyData
()
}
}
}
</
script
>
\ No newline at end of file
src/views/timeSet/projectTimeSet/Index.vue
deleted
100644 → 0
View file @
2b07f15d
<
template
>
<div>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-button
type=
"primary"
class=
"search_input"
style=
"margin-right: 10px;"
v-if=
"isButten"
@
click=
"createYear"
>
添加
</a-button>
<span
:style=
"
{color:'#DC143C'}">
{{
description
}}
</span>
</a-form>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:pagination=
"false"
:loading=
"loading"
>
<template
slot=
"option"
slot-scope=
"record"
>
<a-button
type=
"primary"
size=
"small"
@
click=
"editYear(record)"
>
修改
</a-button>
<a-button
type=
"danger"
size=
"small"
@
click=
"deleteYear(record)"
>
删除
</a-button>
</
template
>
</a-table>
<a-pagination
v-if=
"pagination.total > 0"
:total=
"pagination.total"
show-size-changer
show-quick-jumper
v-model=
"pagination.pageIndex"
:page-size=
"pagination.pageSize"
:page-size-options=
"pagination.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"change"
:showTotal=
"() => `共 ${pagination.total} 条`"
/>
<a-modal
:visible=
"visibleEdit"
:title=
"'添加/修改'"
@
cancel=
"close"
@
ok=
"submit"
:maskClosable=
"false"
:width=
"800"
destroyOnClose
>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:label-col=
"{span: 6}"
:wrapper-col=
"{span: 17}"
>
<a-form-model-item
label=
"申报年度"
prop=
"reportYear"
>
<a-input
v-model=
"formData.reportYear"
placeholder=
"申报年度"
:disabled=
"disabled"
style=
"width: 120px"
></a-input>
</a-form-model-item>
<a-form-model-item
label=
"申报时间"
prop=
"startTime"
>
<a-form-model-item
prop=
"startTime"
style=
"flex-basis:30%;"
>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.startTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
<span>
~
</span>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.endTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"中期考核年度"
prop=
"checkYear"
v-if=
"display"
>
<a-input
v-model=
"formData.checkYear"
placeholder=
"中期考核年度"
></a-input>
</a-form-model-item>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-textarea
placeholder=
""
v-model=
"formData.remark"
:rows=
"3"
/>
</a-form-model-item>
</a-form-model>
</a-modal>
</div>
</template>
<
script
>
import
{
isEmptyParams
}
from
"@/views/utils/common"
;
import
moment
from
'moment'
;
export
default
{
name
:
'projectTimeSet'
,
data
()
{
return
{
formData
:
{
id
:
undefined
,
reportYear
:
moment
().
format
(
'YYYY'
),
unitCode
:
''
,
yearType
:
1
,
//1项目 2任务书 3中期考核
startTime
:
''
,
endTime
:
''
,
remark
:
''
,
checkYear
:
''
,
created
:
''
,
updated
:
''
},
tableData
:
[],
columns
:
[],
pagination
:
{
pageIndex
:
1
,
pageSize
:
this
.
$defaultPageSize
,
total
:
0
,
pageSizeOptions
:
this
.
$defaultPageSizeOptions
,
},
// 弹窗标志
visibleEdit
:
false
,
loading
:
false
,
isButten
:
false
,
disabled
:
true
,
display
:
false
,
description
:
''
,
formRules
:
{
id
:
[{
required
:
false
}],
reportYear
:
[{
required
:
true
,
message
:
'请输入申报年度'
}],
unitCode
:
[{
required
:
true
,
message
:
'请输入单位编码'
}],
yearType
:
[{
required
:
true
,
message
:
'请选择年度类型'
}],
startTime
:
{
required
:
true
,
message
:
'请选择开始时间'
},
endTime
:
{
required
:
true
,
message
:
'请选择结束时间'
},
remark
:
[{
required
:
false
}],
checkYear
:
[{
required
:
true
,
message
:
'请填写中期审核年度'
}],
created
:
[{
required
:
false
}],
updated
:
[{
required
:
false
}]
}
}
},
created
()
{
this
.
InitApplyData
()
},
computed
:
{
},
methods
:
{
moment
,
InitApplyData
()
{
this
.
columns
=
[
{
title
:
'年度'
,
dataIndex
:
'reportYear'
},
{
title
:
'开始时间'
,
dataIndex
:
'startTime'
},
{
title
:
'结束时间'
,
dataIndex
:
'endTime'
},
{
title
:
'中期考核年度'
,
dataIndex
:
'checkYear'
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
]
this
.
getYearInfo
()
},
getYearInfo
()
{
let
len
=
this
.
$defaultLength
let
pars
=
{
type
:
1
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getListByPage
()
this
.
isButten
=
data
.
disabled
this
.
description
=
data
.
description
if
((
data
.
unitCode
+
""
).
length
==
len
)
{
this
.
display
=
true
}
}
}).
catch
(()
=>
{
})
},
getListByPage
()
{
this
.
loading
=
true
let
pars
=
{
yearType
:
1
}
let
par
=
{
...
pars
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
}
this
.
$api
.
batch
.
getListByPage
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
const
{
dataList
=
[],
total
=
0
}
=
data
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
this
.
getListByPage
()
},
change
()
{
this
.
getListByPage
()
},
showSizeChange
(
current
,
pageSize
)
{
this
.
pagination
.
pageIndex
=
current
this
.
pagination
.
pageSize
=
pageSize
this
.
getListByPage
()
},
// 起止日期选择处理
dateChange
(
value
)
{
let
statr
=
this
.
formData
.
startTime
let
end
=
this
.
formData
.
endTime
if
(
!
statr
||
!
end
)
{
return
}
if
(
statr
>
end
)
{
this
.
formData
.
startTime
=
end
this
.
formData
.
endTime
=
statr
}
},
createYear
()
{
let
pars
=
{
type
:
1
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
formData
.
reportYear
=
data
.
reportYear
this
.
formData
.
unitCode
=
data
.
unitCode
this
.
formData
.
yearType
=
data
.
yearType
this
.
formData
.
startTime
=
data
.
startTime
this
.
formData
.
endTime
=
data
.
endTime
this
.
formData
.
checkYear
=
''
this
.
formData
.
remark
=
''
}
}).
catch
(()
=>
{
})
this
.
visibleEdit
=
true
},
editYear
(
record
)
{
Object
.
assign
(
this
.
formData
,
record
);
this
.
visibleEdit
=
true
},
close
()
{
this
.
visibleEdit
=
false
},
submit
()
{
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
addOrUpdateYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'成功!'
)
this
.
visibleEdit
=
false
this
.
getYearInfo
()
this
.
getListByPage
()
}
})
}
})
},
deleteYear
(
record
)
{
this
.
$confirm
({
title
:
'删除'
,
content
:
'确定要删除该申报年度?'
,
okText
:
'确定'
,
okType
:
'danger'
,
cancelText
:
'取消'
,
onOk
()
{
let
pars
=
isEmptyParams
(
record
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
deleteApplyYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getYearInfo
()
this
.
getListByPage
()
this
.
$message
.
success
(
'删除成功!'
)
}
})
},
onCancel
()
{
},
})
}
},
watch
:
{
$route
()
{
this
.
InitApplyData
()
}
}
}
</
script
>
\ No newline at end of file
src/views/timeSet/taskTimeSet/Index.vue
View file @
05d7e479
<
template
>
<div>
<a-form
layout=
"inline"
class=
"search_form"
>
<a-button
type=
"primary"
class=
"search_input"
style=
"margin-right: 10px;"
v-if=
"isButten"
@
click=
"createYear"
>
添加
</a-button>
<span
:style=
"
{color:'#DC143C'}">
{{
description
}}
</span>
</a-form>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:pagination=
"false"
:loading=
"loading"
>
<div
class=
"app-content"
>
<div
class=
"submit-btn"
>
<a-button
type=
"primary"
class=
"search_input"
style=
"margin-right: 10px;"
@
click=
"createBatch"
>
添加
</a-button>
</div>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
rowKey=
"id"
:pagination=
"false"
:loading=
"loading"
bordered
>
<template
slot=
"option"
slot-scope=
"record"
>
<a-button
type=
"
primary"
size=
"small"
@
click=
"editYear(record
)"
>
修改
</a-button>
<a-button
type=
"
danger"
size=
"small"
@
click=
"deleteYear(record
)"
>
删除
</a-button>
<a-button
type=
"
link"
size=
"small"
@
click=
"recordClick(record,'edit'
)"
>
修改
</a-button>
<a-button
type=
"
link"
size=
"small"
@
click=
"recordClick(record,'delete'
)"
>
删除
</a-button>
</
template
>
</a-table>
<a-pagination
v-if=
"pagination.total > 0"
:total=
"pagination.total"
show-size-changer
show-quick-jumper
v-model=
"pagination.pageIndex"
:page-size=
"pagination.pageSize"
:page-size-options=
"pagination.pageSizeOptions"
@
showSizeChange=
"showSizeChange"
@
change=
"change"
:showTotal=
"() => `共 ${pagination.total} 条`"
/>
<a-modal
:visible=
"visibleEdit"
:title=
"'添加/修改'"
@
cancel=
"close"
@
ok=
"submit"
:maskClosable=
"false"
:width=
"800"
destroyOnClose
>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
:label-col=
"{span: 6}"
:wrapper-col=
"{span: 17}"
>
<a-form-model-item
label=
"申报年度"
prop=
"reportYear"
>
<a-input
v-model=
"formData.reportYear"
placeholder=
"申报年度"
:disabled=
"disabled"
style=
"width: 120px"
></a-input>
</a-form-model-item>
<a-form-model-item
label=
"申报时间"
prop=
"startTime"
>
<a-form-model-item
prop=
"startTime"
style=
"flex-basis:30%;"
>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.startTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
<span>
~
</span>
<a-date-picker
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
v-model=
"formData.endTime"
style=
"width: 180px"
@
change=
"dateChange"
/>
</a-form-model-item>
</a-form-model-item>
<a-form-model-item
label=
"备注"
prop=
"remark"
>
<a-textarea
placeholder=
""
v-model=
"formData.remark"
:rows=
"3"
/>
</a-form-model-item>
</a-form-model>
<a-modal
:visible=
"visibleEdit"
v-model=
"visibleEdit"
:title=
"'添加/修改'"
:footer=
"null"
:maskClosable=
"false"
:dialog-style=
"{ top: '15%' }"
:width=
"800"
destroyOnClose
>
<time-edit
v-model=
"id"
@
close=
"closeWindow"
ref=
"childEdit"
/>
</a-modal>
</div>
</template>
<
script
>
import
{
isEmptyParams
}
from
"@/views/utils/common"
;
import
moment
from
'moment'
;
import
{
getType
}
from
'@/views/utils/auth'
import
timeEdit
from
'@/views/timeSet/taskTimeSet/components/timeEdit'
import
moment
from
'moment'
export
default
{
name
:
'projectTimeSet'
,
name
:
'taskTimeSet'
,
components
:
{
timeEdit
},
data
()
{
return
{
formData
:
{
id
:
undefined
,
reportYear
:
moment
().
format
(
'YYYY'
),
unitCode
:
''
,
yearType
:
1
,
//1项目 2任务书 3中期考核
startTime
:
''
,
endTime
:
''
,
remark
:
''
,
checkYear
:
''
,
created
:
''
,
updated
:
''
},
tableData
:
[],
columns
:
[],
pagination
:
{
pageIndex
:
1
,
pageSize
:
this
.
$defaultPageSize
,
total
:
0
,
pageSizeOptions
:
this
.
$defaultPageSizeOptions
,
},
columns
:
[
{
key
:
'1'
,
title
:
'申报年度'
,
dataIndex
:
'year'
,
align
:
'center'
},
{
key
:
'2'
,
title
:
'批次'
,
dataIndex
:
'batch'
,
align
:
'center'
},
{
key
:
'3'
,
title
:
'项目申报时间'
,
dataIndex
:
'reportStart'
,
colSpan
:
2
,
ellipsis
:
true
},
{
key
:
'4'
,
title
:
'项目申报时间'
,
dataIndex
:
'reportEnd'
,
colSpan
:
0
,
ellipsis
:
true
},
{
key
:
'5'
,
title
:
'审核时间'
,
dataIndex
:
'auditStart'
,
colSpan
:
2
,
ellipsis
:
true
},
{
key
:
'6'
,
title
:
'审核时间'
,
dataIndex
:
'auditEnd'
,
colSpan
:
0
,
ellipsis
:
true
},
{
key
:
'13'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
align
:
'center'
,
ellipsis
:
true
},
{
key
:
'14'
,
title
:
'操作'
,
scopedSlots
:
{
customRender
:
'option'
},
align
:
'center'
,
fixed
:
'right'
,
width
:
120
,
},
],
pagination
:
{
pageIndex
:
1
,
pageSize
:
this
.
$defaultPageSize
,
total
:
0
,
pageSizeOptions
:
this
.
$defaultPageSizeOptions
,
},
// 弹窗标志
visibleEdit
:
false
,
id
:
null
,
loading
:
false
,
isButten
:
false
,
disabled
:
true
,
display
:
false
,
description
:
''
,
formRules
:
{
id
:
[{
required
:
false
}],
reportYear
:
[{
required
:
true
,
message
:
'请输入申报年度'
}],
unitCode
:
[{
required
:
true
,
message
:
'请输入单位编码'
}],
yearType
:
[{
required
:
true
,
message
:
'请选择年度类型'
}],
startTime
:
{
required
:
true
,
message
:
'请选择开始时间'
},
endTime
:
{
required
:
true
,
message
:
'请选择结束时间'
},
remark
:
[{
required
:
false
}],
checkYear
:
[{
required
:
true
,
message
:
'请填写中期审核年度'
}],
created
:
[{
required
:
false
}],
updated
:
[{
required
:
false
}]
}
}
},
created
()
{
this
.
InitApplyData
()
this
.
getListByPage
()
},
computed
:
{
},
methods
:
{
moment
,
InitApplyData
()
{
this
.
columns
=
[
{
title
:
'年度'
,
dataIndex
:
'reportYear'
},
{
title
:
'开始时间'
,
dataIndex
:
'startTime'
},
{
title
:
'结束时间'
,
dataIndex
:
'endTime'
},
{
title
:
'备注'
,
dataIndex
:
'remark'
},
]
this
.
getYearInfo
()
},
getYearInfo
()
{
let
len
=
this
.
$defaultLength
let
pars
=
{
type
:
2
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getListByPage
()
this
.
isButten
=
data
.
disabled
this
.
description
=
data
.
description
}
}).
catch
(()
=>
{
})
},
getListByPage
()
{
this
.
loading
=
true
let
pars
=
{
yearType
:
2
}
let
par
=
{
...
pars
,
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
}
this
.
$api
.
batch
.
getListByPage
(
par
).
then
(({
data
=
{}
})
=>
{
let
par
=
{
projType
:
getType
(),
pageIndex
:
this
.
pagination
.
pageIndex
,
pageSize
:
this
.
pagination
.
pageSize
}
this
.
$api
.
batch
.
getBatchListByPage
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
const
{
dataList
=
[],
total
=
0
}
=
data
this
.
tableData
=
dataList
this
.
pagination
.
total
=
total
this
.
loading
=
false
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
searchList
()
{
this
.
pagination
.
pageIndex
=
1
this
.
getListByPage
()
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
change
()
{
this
.
getListByPage
()
...
...
@@ -140,88 +72,43 @@ export default {
this
.
pagination
.
pageSize
=
pageSize
this
.
getListByPage
()
},
// 起止日期选择处理
dateChange
(
value
)
{
let
statr
=
this
.
formData
.
startTime
let
end
=
this
.
formData
.
endTime
if
(
!
statr
||
!
end
)
{
return
}
if
(
statr
>
end
)
{
this
.
formData
.
startTime
=
end
this
.
formData
.
endTime
=
statr
}
},
createYear
()
{
let
pars
=
{
type
:
2
}
this
.
$api
.
year
.
getYearInfo
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
formData
.
reportYear
=
data
.
reportYear
this
.
formData
.
unitCode
=
data
.
unitCode
this
.
formData
.
yearType
=
data
.
yearType
this
.
formData
.
startTime
=
data
.
startTime
this
.
formData
.
endTime
=
data
.
endTime
this
.
formData
.
checkYear
=
''
this
.
formData
.
remark
=
''
}
}).
catch
(()
=>
{
})
createBatch
()
{
this
.
id
=
null
this
.
visibleEdit
=
true
},
editYear
(
record
)
{
Object
.
assign
(
this
.
formData
,
record
);
this
.
visibleEdit
=
true
recordClick
(
record
,
type
)
{
if
(
type
===
'edit'
)
{
this
.
id
=
record
.
id
this
.
visibleEdit
=
true
}
else
if
(
type
===
'delete'
)
{
let
self
=
this
this
.
$confirm
({
title
:
''
,
content
:
'确定要删除该批次?'
,
okText
:
'确定'
,
okType
:
'danger'
,
cancelText
:
'取消'
,
onOk
()
{
let
pars
=
{
id
:
record
.
id
}
self
.
$api
.
batch
.
deleteBatch
(
pars
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
self
.
getListByPage
()
}
})
},
onCancel
()
{
},
})
}
},
close
()
{
close
Window
()
{
this
.
visibleEdit
=
false
},
submit
()
{
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
addOrUpdateYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'成功!'
)
this
.
visibleEdit
=
false
this
.
getYearInfo
()
this
.
getListByPage
()
}
})
}
})
},
deleteYear
(
record
)
{
this
.
$confirm
({
title
:
'删除'
,
content
:
'确定要删除该申报年度?'
,
okText
:
'确定'
,
okType
:
'danger'
,
cancelText
:
'取消'
,
onOk
()
{
let
pars
=
isEmptyParams
(
record
)
let
par
=
{
...
pars
}
this
.
$api
.
batch
.
deleteApplyYearInfo
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
getYearInfo
()
this
.
getListByPage
()
this
.
$message
.
success
(
'删除成功!'
)
}
})
},
onCancel
()
{
},
})
this
.
getListByPage
()
}
},
watch
:
{
$route
()
{
this
.
InitApplyData
()
}
}
}
...
...
src/views/timeSet/taskTimeSet/components/timeEdit.vue
0 → 100644
View file @
05d7e479
<
template
>
<div
class=
"app-content"
style=
"height:330px;overflow:auto;"
>
<a-spin
:spinning=
"loading"
style=
"width: 100%;height: 100%;"
>
<a-form-model
ref=
"formRef"
:model=
"formData"
:rules=
"formRules"
class=
"from-table"
>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div
class=
"required"
>
填报年度
</div>
</a-col>
<a-col
:span=
"6"
>
<a-form-model-item
ref=
"year"
prop=
"year"
>
<base-select
v-model=
"formData.year"
:type=
"8"
:width=
"160"
/>
</a-form-model-item>
</a-col>
<a-col
:span=
"4"
class=
"bg-gray"
>
<div
class=
"required"
>
填报批次
</div>
</a-col>
<a-col
:span=
"8"
>
<a-form-model-item
ref=
"batch"
prop=
"batch"
>
<base-select
v-model=
"formData.batch"
:type=
"10"
:width=
"160"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div
class=
"required"
>
填报时间
</div>
</a-col>
<a-col
:span=
"18"
>
<a-form-model-item
ref=
"reportRange"
prop=
"reportRange"
>
<a-range-picker
v-model=
"formData.reportRange"
show-time
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
@
change=
"reportDateChange"
:placeholder=
"['开始时间', '结束时间']"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div
class=
"required"
>
审核时间
</div>
</a-col>
<a-col
:span=
"18"
>
<a-form-model-item
ref=
"unitRange"
prop=
"unitRange"
>
<a-range-picker
v-model=
"formData.auditRange"
show-time
format=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
@
change=
"auditDateChange"
:placeholder=
"['开始时间', '结束时间']"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
<div>
备注
</div>
</a-col>
<a-col
:span=
"18"
>
<a-form-model-item
ref=
"remark"
prop=
"remark"
>
<a-input
v-model=
"formData.remark"
style=
"width:450px"
/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col
style=
"text-align: center;width:100%;"
>
<a-button
type=
"primary"
style=
"width:68px;"
@
click=
"submit"
>
提交
</a-button>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</div>
</
template
>
<
script
>
import
{
getType
}
from
'@/views/utils/auth'
import
{
isEmptyParams
,
checkDateRange
}
from
'@/views/utils/common'
import
moment
from
'moment'
import
baseSelect
from
'@/views/components/common/baseSelect'
export
default
{
name
:
"batchEdit"
,
components
:
{
baseSelect
},
data
()
{
return
{
formData
:
{
id
:
null
,
year
:
moment
().
format
(
'YYYY'
),
batch
:
'1'
,
reportStart
:
''
,
reportEnd
:
''
,
auditStart
:
''
,
auditEnd
:
''
,
expertStart
:
''
,
expertEnd
:
''
,
remark
:
''
,
reportRange
:
[],
auditRange
:
[],
projType
:
getType
()
},
formRules
:
{
id
:
[{
required
:
false
}],
year
:
{
required
:
true
,
message
:
'请输入申报年度'
},
batch
:
{
required
:
true
,
message
:
'请输入申报批次'
},
reportRange
:
[{
required
:
true
,
validator
:
checkDateRange
,
trigger
:
'blur'
}],
auditRange
:
[{
required
:
true
,
validator
:
checkDateRange
,
trigger
:
'blur'
}],
remark
:
[{
required
:
false
}]
},
loading
:
false
,
}
},
props
:
{
value
:
{
type
:
String
,
default
:
()
=>
{
return
null
}
},
},
created
()
{
if
(
this
.
value
)
{
this
.
loading
=
true
this
.
getBatchById
()
}
},
methods
:
{
moment
,
getBatchById
()
{
this
.
$api
.
batch
.
getBatchById
({
id
:
this
.
value
}).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
formData
.
id
=
data
.
id
this
.
formData
.
year
=
data
.
year
+
''
this
.
formData
.
projType
=
data
.
projType
this
.
formData
.
reportStart
=
data
.
reportStart
this
.
formData
.
reportEnd
=
data
.
reportEnd
this
.
formData
.
auditStart
=
data
.
auditStart
this
.
formData
.
auditEnd
=
data
.
auditEnd
this
.
formData
.
expertStart
=
data
.
expertStart
this
.
formData
.
expertEnd
=
data
.
expertEnd
this
.
formData
.
remark
=
data
.
remark
this
.
formData
.
reportRange
=
[
data
.
reportStart
,
data
.
reportEnd
]
this
.
formData
.
auditRange
=
[
data
.
auditStart
,
data
.
auditEnd
]
}
this
.
loading
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
submit
()
{
this
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
let
pars
=
isEmptyParams
(
this
.
formData
)
if
(
this
.
value
)
{
this
.
$api
.
batch
.
updateBatch
({
...
pars
}).
then
(({
data
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'修改成功!'
)
this
.
$emit
(
'close'
,
'edit'
)
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
}
else
{
this
.
$api
.
batch
.
addBatch
({
...
pars
}).
then
(({
data
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'添加成功!'
)
this
.
$emit
(
'close'
,
'edit'
)
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
}
}
})
},
//起止日期选择处理
reportDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
reportStart
=
dateStrings
[
0
]
this
.
formData
.
reportEnd
=
dateStrings
[
1
]
}
},
auditDateChange
(
dates
,
dateStrings
)
{
if
(
dateStrings
[
0
]
!=
''
&&
dateStrings
[
1
]
!=
''
)
{
this
.
formData
.
auditStart
=
dateStrings
[
0
]
this
.
formData
.
auditEnd
=
dateStrings
[
1
]
}
},
}
}
</
script
>
\ No newline at end of file
src/views/unit/components/unitCount.vue
deleted
100644 → 0
View file @
2b07f15d
<
template
>
<!--
<a-form-model-item
:label=
"uname"
:span=
"6"
>
<a-input-number
v-model=
"value"
:min=
"0"
:max=
"99"
/>
</a-form-model-item>
-->
<div>
<a-col
:span=
"colSpan"
class=
"bg-light_blue"
style=
"text-align: right;"
>
{{
Unit
.
unitName
}}
:
</a-col>
<a-col
:span=
"colSpan"
>
<a-input-number
v-model=
"Unit.projLimit"
:min=
"0"
:max=
"1000"
@
change=
"onChange"
/>
</a-col>
</div>
</
template
>
<
script
>
export
default
{
name
:
"UnitCount"
,
data
()
{
return
{
}
},
props
:
{
Unit
:
{
type
:
Object
,
require
:
true
},
colCount
:
{
type
:
Number
,
require
:
true
}
},
computed
:
{
colSpan
()
{
return
this
.
colCount
/
2
}
},
methods
:
{
onChange
()
{
this
.
$emit
(
'valueChange'
,
this
.
Unit
)
}
}
};
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment