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
532386de
Commit
532386de
authored
Nov 28, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
444444
parent
c3f3973b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
198 deletions
+39
-198
baseSelect.vue
src/views/components/common/baseSelect.vue
+10
-0
managementRuleEdit.vue
src/views/report/project/components/managementRuleEdit.vue
+11
-3
projGroupMember.vue
src/views/report/project/components/projGroupMember.vue
+0
-0
projectEdit.vue
src/views/report/project/components/projectEdit.vue
+7
-192
projectSubEdit.vue
src/views/report/project/components/projectSubEdit.vue
+11
-3
No files found.
src/views/components/common/baseSelect.vue
View file @
532386de
...
...
@@ -97,6 +97,9 @@ export default {
case
15
:
this
.
getAuditResultSelect
()
break
;
case
16
:
this
.
getSexSelect
()
break
;
}
},
getIsSelect
()
{
...
...
@@ -106,6 +109,13 @@ export default {
this
.
selectArray
=
arr
this
.
loadValue
()
},
getSexSelect
()
{
let
arr
=
[]
arr
.
push
({
title
:
'男'
,
key
:
'男'
})
arr
.
push
({
title
:
'女'
,
key
:
'女'
})
this
.
selectArray
=
arr
this
.
loadValue
()
},
getAuditTypeSelect
()
{
let
arr
=
[]
arr
.
push
({
title
:
'项目审核'
,
key
:
'1'
})
...
...
src/views/report/project/components/managementRuleEdit.vue
View file @
532386de
...
...
@@ -77,7 +77,7 @@
</a-col>
<a-col
:span=
"2"
>
<div
class=
"special-middle"
>
<a-popconfirm
title=
"确定要删除吗?"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"delete
ListItem(item,1
)"
>
<a-popconfirm
title=
"确定要删除吗?"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"delete
Arrey(item
)"
>
<a-button
type=
"link"
size=
"small"
>
删除
</a-button>
</a-popconfirm>
</div>
...
...
@@ -86,7 +86,7 @@
<a-row
type=
"flex"
>
<a-col
:span=
"24"
style=
"text-align: center"
>
<div
class=
"special-middle"
>
<a-button
type=
"dashed"
style=
"width: 20%"
@
click=
"add
ListItem(1
)"
>
<a-button
type=
"dashed"
style=
"width: 20%"
@
click=
"add
Arrey(
)"
>
<a-icon
type=
"plus"
/>
添加
<span
style=
"color:red;margin-left:10px"
></span>
</a-button>
</div>
...
...
@@ -127,7 +127,15 @@ export default {
},
methods
:
{
addArrey
()
{
//添加成员
this
.
managementRuleList
.
push
({
...
ManagementRule
})
},
deleteArrey
(
item
)
{
//移除成员
let
index
=
this
.
managementRuleList
.
indexOf
(
item
)
if
(
index
!==
-
1
)
{
this
.
managementRuleList
.
splice
(
index
,
1
)
}
},
},
};
</
script
>
...
...
src/views/report/project/components/projGroupMember.vue
View file @
532386de
This diff is collapsed.
Click to expand it.
src/views/report/project/components/projectEdit.vue
View file @
532386de
...
...
@@ -596,7 +596,7 @@
</a-row>
<!-- 经费预算 -->
<
budget-edit
:budget
.
sync=
"formData.budget"
/
>
<
!--
<budget-edit
:budget
.
sync=
"formData.budget"
/>
--
>
<!-- 项目课题设置 -->
<project-sub-edit
:projectSubList
.
sync=
"formData.projectSubList"
/>
...
...
@@ -627,7 +627,7 @@ import moment from 'moment'
const
ManagementRule
=
{
policyName
:
null
,
releaseDate
:
null
,
documentNumber
:
null
,
validityPeriod
:
null
,
mainContent
:
null
,
fileId
:
null
,
downloadId
:
null
,
fileName
:
null
,
downloadUrl
:
null
}
const
ProjectSub
=
{
projName
:
null
,
undertakingUnit
:
null
,
address
:
null
,
director
:
null
,
totalBudget
:
null
,
govBudget
:
null
,
selfBudget
:
null
,
cooperativeUnits
:
null
,
fileId
:
null
,
downloadId
:
null
,
fileName
:
null
,
downloadUrl
:
null
}
const
Cooperative
=
{
id
:
null
,
unitName
:
null
,
unitCountry
:
null
,
unitAddress
:
null
,
organizationCode
:
null
,
projectWork
:
null
}
const
Members
=
{
showIndex
:
1
,
name
:
null
,
certId
:
null
,
sex
:
null
,
birthday
:
null
,
age
:
null
,
degree
:
null
,
title
:
null
,
duty
:
null
,
spec
:
null
,
workUnit
:
null
,
projWork
:
null
}
const
Members
=
{
name
:
null
,
sex
:
null
,
birthday
:
null
,
certificateType
:
null
,
certId
:
null
,
nation
:
null
,
country
:
null
,
workUnit
:
null
,
title
:
null
,
degree
:
null
,
email
:
null
,
mobile
:
null
,
telephone
:
null
,
fax
:
null
,
projWork
:
null
,
forMonths
:
null
,
spec
:
null
}
const
Equipments
=
{
name
:
null
,
specificationType
:
null
,
quantity
:
null
,
totalBudget
:
null
,
useFrom
:
null
}
const
File
=
{
fileName
:
''
,
downloadUrl
:
''
,
fileExplain
:
''
,
downloadId
:
''
}
...
...
@@ -653,10 +653,10 @@ export default {
formData
:
{
id
:
null
,
organizationCode
:
null
,
address
:
null
,
address
:
null
,
registeredAddress
:
null
,
postCode
:
null
,
legalPerson
:
null
,
legalPerson
:
null
,
workforce
:
null
,
specializedPersonnel
:
null
,
researchPersonnel
:
null
,
...
...
@@ -672,8 +672,8 @@ export default {
leadUnit
:
null
,
recommendUnit
:
null
,
startDate
:
null
,
endDate
:
null
,
technologyInnovationBase
:
null
,
endDate
:
null
,
technologyInnovationBase
:
null
,
knowledgeId
:
null
,
totalFunding
:
null
,
govFunding
:
null
,
...
...
@@ -739,10 +739,6 @@ export default {
achievementTarget
:
[{
required
:
true
,
message
:
'请填写项目实施中形成的示范基地、中试线、生产线及其规模等'
,
trigger
:
'blur'
},],
otherTarget
:
{
required
:
true
,
message
:
'请填写其他应考核的指标'
,
trigger
:
'blur'
},
},
// 富文本字数
tinymceLimit
:
15000
,
tinymceWordCount
:
0
,
flag
:
false
,
}
},
computed
:
{
...
...
@@ -795,15 +791,6 @@ export default {
this
.
formData
.
fileList
=
[]
}
},
addEquipments
()
{
this
.
formData
.
equipments
.
push
({
...
Equipments
})
},
removeEquipments
(
item
)
{
let
index
=
this
.
formData
.
equipments
.
indexOf
(
item
)
if
(
index
!==
-
1
)
{
this
.
formData
.
equipments
.
splice
(
index
,
1
)
}
},
save
()
{
if
(
this
.
checkProjName
())
{
this
.
$emit
(
'load'
,
true
)
...
...
@@ -828,14 +815,10 @@ export default {
}
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
!
this
.
checkApplyMoney
())
{
return
false
}
this
.
$emit
(
'load'
,
true
)
let
state
=
this
.
formData
.
projState
if
(
state
!=
30
)
this
.
formData
.
projState
=
10
// this.formData.projDoc = this.projDoc
let
pars
=
isEmptyParams
(
this
.
formData
)
let
par
=
{
...
pars
}
this
.
$api
.
project
.
save
(
par
).
then
(({
data
=
{}
})
=>
{
...
...
@@ -854,172 +837,6 @@ export default {
}
})
},
tinymceSet
()
{
tinymce
.
remove
(
'#tinymce_dom'
)
tinymce
.
init
({
selector
:
'#tinymce_dom'
,
language
:
'zh_CN'
,
content_style
:
"img {max-width:100%;}"
,
// menubar: false,
// 隐藏底部状态栏
statusbar
:
false
,
height
:
800
,
plugins
:
'code advlist autolink link image lists preview table wordcount'
,
toolbar
:
`undo redo | styleselect | fontsizeselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist | link image
| table tabledelete | tableprops tablerowprops tablecellprops | tableinsertrowbefore tableinsertrowafter tabledeleterow
| tableinsertcolbefore tableinsertcolafter tabledeletecol | wordcount`
,
// 初始化完成回调
init_instance_callback
:
(
editor
)
=>
{
let
wordcount
=
editor
.
plugins
.
wordcount
this
.
tinymceWordCount
=
wordcount
.
body
.
getWordCount
()
},
// 图片上传路径
// images_upload_url: 'http://192.168.1.185:8888/profile',
// 图片上传操作
images_upload_handler
:
(
blobInfo
,
succFun
,
failFun
)
=>
{
this
.
$api
.
base
.
asyncUpload
(
this
.
uploadHandle
(
blobInfo
.
blob
(),
blobInfo
.
filename
())).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
succFun
(
data
.
downloadUrl
)
}
}).
catch
((
err
)
=>
{
failFun
(
err
)
})
}
})
// 设置富文本内容
// tinymce.activeEditor.setContent(htmlText)
// 监听输入计算字数
let
mark
=
1
tinymce
.
activeEditor
.
on
(
'keyup'
,
(
e
)
=>
{
if
(
mark
===
1
)
{
let
wordcount
=
tinymce
.
activeEditor
.
plugins
.
wordcount
this
.
tinymceWordCount
=
wordcount
.
body
.
getWordCount
()
mark
=
0
setTimeout
(()
=>
{
mark
=
1
},
500
)
}
})
},
// 添加附件
addfileList
()
{
this
.
formData
.
fileList
.
push
(
Object
.
assign
({
...
File
},
{
fileExplain
:
''
}))
},
// 删除附件
removefileList
(
item
)
{
let
index
=
this
.
formData
.
fileList
.
indexOf
(
item
)
if
(
index
!==
-
1
)
{
this
.
formData
.
fileList
.
splice
(
index
,
1
)
}
},
downfileList
(
item
)
{
},
fileSelect
(
item
,
index
)
{
let
fileElem
=
this
.
$refs
[
'fileElem'
+
index
][
0
]
if
(
fileElem
)
{
fileElem
.
click
()
}
},
fileCheck
(
file
)
{
//判断是否小于1M
let
isLtSize
=
file
.
size
<
1024
*
1024
*
15
;
if
(
!
isLtSize
)
{
this
.
$message
.
error
(
'文件大小不能超过15M!'
);
return
false
}
// var fileNames = file.name.split('.')
// var fileType = fileNames[fileNames.length - 1].toLocaleLowerCase()
// var extList = ['doc', 'docx', 'pdf']
// if (!extList.find((item) => item == fileType)) {
// this.$message.error('文件格式错误!')
// return false
// }
return
true
},
handleFiles
(
item
,
index
)
{
let
fileElem
=
this
.
$refs
[
'fileElem'
+
index
][
0
]
let
files
=
fileElem
.
files
if
(
files
.
length
<=
0
)
{
this
.
$message
.
error
(
'未选中文件,请尝试重新选择'
)
return
}
if
(
!
this
.
fileCheck
(
files
[
0
]))
return
this
.
$api
.
base
.
asyncUpload
(
this
.
uploadHandle
(
files
[
0
],
files
[
0
].
name
)).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
item
.
fileName
=
files
[
0
].
name
item
.
downloadUrl
=
'/'
+
files
[
0
].
name
item
.
downloadId
=
data
.
id
}
else
this
.
$message
.
error
(
'上传失败'
)
}).
catch
(()
=>
{
this
.
$message
.
error
(
'上传失败'
)
})
},
inCount
()
{
let
govFunding
=
0
let
unitFunding
=
0
let
selfFunding
=
0
let
otherFunding
=
0
if
(
this
.
formData
.
govFunding
)
govFunding
=
this
.
formData
.
govFunding
if
(
this
.
formData
.
unitFunding
)
unitFunding
=
this
.
formData
.
unitFunding
if
(
this
.
formData
.
selfFunding
)
selfFunding
=
this
.
formData
.
selfFunding
if
(
this
.
formData
.
otherFunding
)
otherFunding
=
this
.
formData
.
otherFunding
this
.
formData
.
totalFunding
=
(
govFunding
+
unitFunding
+
selfFunding
+
otherFunding
).
toFixed
(
2
)
return
this
.
formData
.
totalFunding
},
outNumberChange
()
{
let
vartotalBudget
=
0
this
.
formData
.
budget
.
forEach
(
e
=>
{
if
(
e
.
totalBudget
!=
null
)
vartotalBudget
+=
parseFloat
(
e
.
totalBudget
)
})
this
.
formData
.
totalFunding
=
vartotalBudget
.
toFixed
(
2
)
},
deletefile
(
item
,
index
)
{
this
.
$api
.
base
.
deletefile
({
id
:
item
.
downloadId
}).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
item
.
fileName
=
''
item
.
downloadUrl
=
''
item
.
downloadId
=
''
if
(
item
.
fileExplain
!=
'学术委员会审查意见'
&&
item
.
fileExplain
!=
'项目组的人员签字'
)
{
item
.
fileExplain
=
''
}
}
}).
catch
(()
=>
{
this
.
$message
.
error
(
'删除失败'
)
})
},
uploadHandle
(
file
,
fileName
)
{
let
formData
=
new
FormData
()
formData
.
append
(
'file'
,
file
)
formData
.
append
(
'fileName'
,
fileName
)
return
formData
},
// 起止日期选择处理
dateChange
(
value
)
{
let
statr
=
this
.
formData
.
startDate
let
end
=
this
.
formData
.
endDate
if
(
!
statr
||
!
end
)
{
return
}
if
(
statr
>
end
)
{
this
.
formData
.
startDate
=
end
this
.
formData
.
endDate
=
statr
}
},
checkApplyMoney
()
{
var
m
=
parseFloat
(
this
.
formData
.
applyMoney
)
if
(
m
!=
this
.
formData
.
govFunding
)
{
alert
(
'项目经费与申请金额不一致!'
)
return
false
}
return
true
},
checkProjName
()
{
if
(
this
.
formData
.
projName
==
""
||
this
.
formData
.
projName
==
null
)
{
alert
(
'项目名称不能为空'
)
...
...
@@ -1034,8 +851,6 @@ export default {
}
</
script
>
<
style
scoped
lang=
"less"
>
.d-icon {
margin-right: 10px;
}
</
style
>
src/views/report/project/components/projectSubEdit.vue
View file @
532386de
...
...
@@ -107,7 +107,7 @@
</a-col>
<a-col
:span=
"2"
>
<div
class=
"special-middle"
>
<a-popconfirm
title=
"确定要删除吗?"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"delete
ListItem(item,1
)"
>
<a-popconfirm
title=
"确定要删除吗?"
ok-text=
"确定"
cancel-text=
"取消"
@
confirm=
"delete
Arrey(item
)"
>
<a-button
type=
"link"
size=
"small"
>
删除
</a-button>
</a-popconfirm>
</div>
...
...
@@ -116,7 +116,7 @@
<a-row
type=
"flex"
>
<a-col
:span=
"24"
style=
"text-align: center"
>
<div
class=
"special-middle"
>
<a-button
type=
"dashed"
style=
"width: 20%"
@
click=
"add
ListItem(1
)"
>
<a-button
type=
"dashed"
style=
"width: 20%"
@
click=
"add
Arrey(
)"
>
<a-icon
type=
"plus"
/>
添加
<span
style=
"color:red;margin-left:10px"
></span>
</a-button>
</div>
...
...
@@ -157,7 +157,15 @@ export default {
},
methods
:
{
addArrey
()
{
//添加成员
this
.
projectSubList
.
push
({
...
ProjectSub
})
},
deleteArrey
(
item
)
{
//移除成员
let
index
=
this
.
projectSubList
.
indexOf
(
item
)
if
(
index
!==
-
1
)
{
this
.
projectSubList
.
splice
(
index
,
1
)
}
},
},
};
</
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