|
@@ -1,6 +1,6 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<TopHeader :menu="-1"></TopHeader> |
|
|
|
|
|
|
|
|
<TopHeader :menu="''"></TopHeader> |
|
|
<div class="ui container"> |
|
|
<div class="ui container"> |
|
|
<div class="title">您申请的项目将在2030科技项目页面展示</div> |
|
|
<div class="title">您申请的项目将在2030科技项目页面展示</div> |
|
|
<div class="form-c" v-show="!selectTechPrj"> |
|
|
<div class="form-c" v-show="!selectTechPrj"> |
|
@@ -56,22 +56,22 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-row"> |
|
|
|
|
|
<div class="row-label">关键词</div> |
|
|
|
|
|
|
|
|
<div class="form-row" :class="form.topic_err ? 'form-row-err' : ''"> |
|
|
|
|
|
<div class="row-label required">关键词</div> |
|
|
<div class="row-content"> |
|
|
<div class="row-content"> |
|
|
<el-select style="width:100%" size="medium" v-model="form.topics" multiple filterable remote |
|
|
<el-select style="width:100%" size="medium" v-model="form.topics" multiple filterable remote |
|
|
allow-create default-first-option placeholder="请选择标签" :remote-method="searchTopics" |
|
|
allow-create default-first-option placeholder="请选择标签" :remote-method="searchTopics" |
|
|
:loading="form.topicLoading"> |
|
|
|
|
|
|
|
|
:loading="form.topicLoading" class="can-err"> |
|
|
<el-option v-for="item in topicsList" :key="item.value" :label="item.label" :value="item.value"> |
|
|
<el-option v-for="item in topicsList" :key="item.value" :label="item.label" :value="item.value"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="form-row"> |
|
|
|
|
|
<div class="row-label baseline">项目简介</div> |
|
|
|
|
|
|
|
|
<div class="form-row" :class="form.descr_err ? 'form-row-err' : ''"> |
|
|
|
|
|
<div class="row-label required baseline">项目简介</div> |
|
|
<div class="row-content"> |
|
|
<div class="row-content"> |
|
|
<el-input size="medium" type="textarea" :rows="3" placeholder="请输入项目简介(长度不超过255)" :maxLength="255" |
|
|
|
|
|
v-model="form.description"></el-input> |
|
|
|
|
|
|
|
|
<el-input size="medium" type="textarea" :rows="4" placeholder="请输入项目简介(长度不超过255)" :maxlength="255" |
|
|
|
|
|
show-word-limit v-model="form.description" class="can-err"></el-input> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@@ -168,8 +168,11 @@ export default { |
|
|
name_err: false, |
|
|
name_err: false, |
|
|
repo_url: '', |
|
|
repo_url: '', |
|
|
topics: [], |
|
|
topics: [], |
|
|
|
|
|
topic_err: false, |
|
|
topicLoading: false, |
|
|
topicLoading: false, |
|
|
|
|
|
|
|
|
description: '', |
|
|
description: '', |
|
|
|
|
|
descr_err: false, |
|
|
|
|
|
|
|
|
tech_search_sel: '0', |
|
|
tech_search_sel: '0', |
|
|
tech_search_keyword: '', |
|
|
tech_search_keyword: '', |
|
@@ -206,8 +209,10 @@ export default { |
|
|
this.form.repo_url = ''; |
|
|
this.form.repo_url = ''; |
|
|
this.form.name_err = false; |
|
|
this.form.name_err = false; |
|
|
this.form.topics = []; |
|
|
this.form.topics = []; |
|
|
|
|
|
this.form.topic_err = false; |
|
|
this.form.topicLoading = false; |
|
|
this.form.topicLoading = false; |
|
|
this.form.description = ''; |
|
|
this.form.description = ''; |
|
|
|
|
|
this.form.descr_err = false; |
|
|
this.form.tech_search_sel = '0'; |
|
|
this.form.tech_search_sel = '0'; |
|
|
this.form.tech_search_keyword = ''; |
|
|
this.form.tech_search_keyword = ''; |
|
|
this.form.tech_obj = null; |
|
|
this.form.tech_obj = null; |
|
@@ -239,6 +244,14 @@ export default { |
|
|
this.form.name_err = !res; |
|
|
this.form.name_err = !res; |
|
|
return res; |
|
|
return res; |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkTopic() { |
|
|
|
|
|
this.form.topic_err = this.form.topics.length == 0; |
|
|
|
|
|
return !this.form.topic_err; |
|
|
|
|
|
}, |
|
|
|
|
|
checkDescr() { |
|
|
|
|
|
this.form.descr_err = !this.form.description; |
|
|
|
|
|
return !this.form.descr_err; |
|
|
|
|
|
}, |
|
|
checkTech() { |
|
|
checkTech() { |
|
|
this.form.tech_err = !this.form.tech_obj; |
|
|
this.form.tech_err = !this.form.tech_obj; |
|
|
return !this.form.tech_err; |
|
|
return !this.form.tech_err; |
|
@@ -385,13 +398,15 @@ export default { |
|
|
const r3 = this.checkinstitution(); |
|
|
const r3 = this.checkinstitution(); |
|
|
const r4 = this.checkRepoAlias(); |
|
|
const r4 = this.checkRepoAlias(); |
|
|
const r5 = this.checkRepoName(); |
|
|
const r5 = this.checkRepoName(); |
|
|
if (r1 && r2 && r3 && r4 && r5) { |
|
|
|
|
|
|
|
|
const r6 = this.checkTopic(); |
|
|
|
|
|
const r7 = this.checkDescr(); |
|
|
|
|
|
if (r1 && r2 && r3 && r4 && r5 && r6 && r7) { |
|
|
subData.url = this.form.url; |
|
|
subData.url = this.form.url; |
|
|
subData.uid = this.form.uid; |
|
|
subData.uid = this.form.uid; |
|
|
subData.repo_alias = this.form.repo_alias; |
|
|
|
|
|
|
|
|
subData.alias = this.form.repo_alias; |
|
|
subData.repo_name = this.form.repo_name; |
|
|
subData.repo_name = this.form.repo_name; |
|
|
subData.topics = [...this.form.topics]; |
|
|
|
|
|
subData.description = this.form.description; |
|
|
|
|
|
|
|
|
// subData.topics = [...this.form.topics]; |
|
|
|
|
|
subData.description = this.form.description.trim(); |
|
|
subData.no = this.form.tech_obj.no; |
|
|
subData.no = this.form.tech_obj.no; |
|
|
subData.institution = this.form.institution.join(','); |
|
|
subData.institution = this.form.institution.join(','); |
|
|
} else { |
|
|
} else { |
|
@@ -409,7 +424,7 @@ export default { |
|
|
}); |
|
|
}); |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
window.location.href = '/tech/tech_view'; |
|
|
window.location.href = '/tech/tech_view'; |
|
|
}, 2000); |
|
|
|
|
|
|
|
|
}, 1000); |
|
|
} else { |
|
|
} else { |
|
|
this.submitLoading = false; |
|
|
this.submitLoading = false; |
|
|
this.$message({ |
|
|
this.$message({ |
|
@@ -544,7 +559,8 @@ export default { |
|
|
color: #9f3a38; |
|
|
color: #9f3a38; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/deep/ .can-err .el-input__inner { |
|
|
|
|
|
|
|
|
/deep/ .can-err .el-input__inner, |
|
|
|
|
|
/deep/ .can-err .el-textarea__inner { |
|
|
color: #9f3a38; |
|
|
color: #9f3a38; |
|
|
background: #fff6f6; |
|
|
background: #fff6f6; |
|
|
border-color: #e0b4b4; |
|
|
border-color: #e0b4b4; |
|
|