projectApplication2.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <!-- 项目立项申请查看详细项目详细 -->
  3. <div class="projectApplication2">
  4. <div class="vfpHeader">
  5. <div class="titleOne">项目立项申请</div>
  6. <div class="smallTitle">项目进展详情</div>
  7. <el-button type="primary" @click="$router.back()">返回</el-button>
  8. </div>
  9. <hr>
  10. <!-- 跳转导航开始 -->
  11. <div class="AppBar">
  12. <div @click="content">项目基本内容</div>
  13. <div class="AppBarActive">项目详情</div>
  14. </div>
  15. <!-- 跳转导航结束 -->
  16. <div class="PA2textArea">
  17. <div class="PA2textAreaTit">项目创新点</div>
  18. <vue-editor :editorToolbar="customToolbar" v-model="data[0][0]"></vue-editor>
  19. </div>
  20. <div class="PA2mid">
  21. 预期取得成果
  22. </div>
  23. <div class="PA2textArea">
  24. <div class="PA2textAreaTit PA2textAreaTit2">一、项目预期成果、数量及形式</div>
  25. <vue-editor :editorToolbar="customToolbar" v-model="data[0][1]"></vue-editor>
  26. </div>
  27. <div class="PA2textArea">
  28. <div class="PA2textAreaTit PA2textAreaTit2">二、创客人才培养预期成果、数量</div>
  29. <vue-editor :editorToolbar="customToolbar" v-model="data[0][2]"></vue-editor>
  30. </div>
  31. <div class="PA2textArea">
  32. <div class="PA2textAreaTit PA2textAreaTit2">三、项目预期孵化、转化创业项目情况</div>
  33. <vue-editor :editorToolbar="customToolbar" v-model="data[0][3]"></vue-editor>
  34. </div>
  35. <div class="PA2textArea">
  36. <div class="PA2textAreaTit">项目实施计划</div>
  37. <vue-editor :editorToolbar="customToolbar" v-model="data[0][4]"></vue-editor>
  38. </div>
  39. <div class="baseBtn">
  40. <div class="blockWidth">
  41. <el-button type="primary" @click="audit">立即修改</el-button>
  42. </div>
  43. </div>
  44. <!-- 修改对话框开始 -->
  45. <el-dialog
  46. title="提示"
  47. :visible.sync="submitHint"
  48. width="600px"
  49. class="projectApplicationfundAddDialog"
  50. :before-close="init">
  51. <div class="addDialogLogo">LOGO</div>
  52. <div class="deleteContent">确定修改项目基本信息?</div>
  53. <span slot="footer" class="dialog-footer">
  54. <el-button type="primary" @click="submitAll" class="btn5">确认提交</el-button>
  55. <el-button @click="init" class="btn5" style="background:#cccccc" size="small">取消</el-button>
  56. </span>
  57. </el-dialog>
  58. <!-- 修改对话框结束 -->
  59. </div>
  60. </template>
  61. <script>
  62. import { VueEditor } from "vue2-editor";
  63. export default {
  64. components:{
  65. VueEditor
  66. },
  67. data() {
  68. return {
  69. data:[["","","","",""],[]],
  70. submitHint:false,
  71. customToolbar: [
  72. ["bold", "italic", "underline"], [{ list: "ordered" }, { list: "bullet" }],
  73. [{ align: "" }, { align: "center" }, { align: "right"}, { align: "justify"}],
  74. [{header:[false,1,2,3,4]}]
  75. ],
  76. }
  77. },
  78. methods:{
  79. content(){ //导航栏项目详情跳转
  80. this.$router.push('/projectApplicationDetails')
  81. },
  82. backBtn(){
  83. this.$router.push('/projectApplicationApply2')
  84. },
  85. audit(){ //立即修改按钮
  86. this.submitHint=true
  87. },
  88. submitAll(){
  89. let param={
  90. uid:this.$store.state.userInfo.userid,
  91. pid:JSON.parse(localStorage.getItem('pid')),
  92. message:JSON.stringify(this.data)
  93. }
  94. this.ajax
  95. .post(this.$store.state.api+'/UpdateProjectDetail',param)
  96. .then(res=>{
  97. // console.log(res);
  98. this.$message.success('修改成功')
  99. this.init()
  100. },err=>{
  101. console.log(err);
  102. })
  103. },
  104. init(){
  105. this.submitHint=false
  106. },
  107. getData(){ //初始化完成获取基本数据进行填充
  108. let param={
  109. uid:this.$store.state.userInfo.userid,
  110. pid:JSON.parse(localStorage.getItem('pid'))
  111. }
  112. this.ajax
  113. .get(this.$store.state.api+'/GetProjectDetailMessage',param)
  114. .then(res=>{
  115. // console.log(res);
  116. let GetData=JSON.parse(res.data[0][0].chapters)
  117. console.log(GetData);
  118. this.data=GetData
  119. },err=>{
  120. console.log(err);
  121. })
  122. },
  123. },
  124. mounted(){
  125. this.getData();
  126. }
  127. }
  128. </script>
  129. <style lang="less">
  130. .projectApplication2{
  131. .projectApplicationfundAddDialog{ //项目修改对话框开始
  132. .el-dialog{
  133. border-radius:5px ;
  134. overflow: hidden;
  135. }
  136. .deleteContent{
  137. width: 100%;
  138. text-align: center;
  139. font-size: 22px;
  140. color: #000;
  141. }
  142. .addDialogLogo{
  143. width: 60px;
  144. height: 30px;
  145. display: flex;
  146. justify-content: center;
  147. line-height: 30px;
  148. border-radius: 5px;
  149. background: #f2f2f2;
  150. position: absolute;
  151. left: 20px; top: 15px;
  152. }
  153. .el-dialog__header{
  154. background: #32455b;
  155. }
  156. .el-dialog__title{
  157. color:#fff;
  158. display: flex;
  159. justify-content: center;
  160. font-size: 18px;
  161. position: relative;
  162. top: -2px;
  163. }
  164. .addDialogMid{
  165. box-sizing: border-box;
  166. padding:0 60px 0 10px;
  167. .addDialogTit{
  168. display: flex;
  169. span{
  170. width: 80px;
  171. line-height: 40px;
  172. text-align: left;
  173. }
  174. }
  175. .addDialogTit1{
  176. display: flex;
  177. justify-content: space-between;
  178. margin-bottom: 15px;
  179. }
  180. .addDialogTit2{
  181. margin-top: 10px;
  182. font-size: 18px;
  183. color: #000;
  184. text-indent: 2em;
  185. }
  186. .addDialogCon{
  187. margin-top: 20px;
  188. }
  189. }
  190. .dialog-footer{
  191. display: flex;
  192. justify-content: center;
  193. .btn5{
  194. height: 40px;
  195. font-size: 16px;
  196. background: #0e72e6;
  197. width: 200px;
  198. }
  199. }
  200. }
  201. //项目修改对话框结束
  202. .PA2textArea{ //标题栏
  203. margin: 15px 0;
  204. .PA2textAreaTit{
  205. width: 80%;
  206. text-align: left;
  207. font-size: 18px;
  208. font-weight: 550;
  209. margin-bottom: 15px;
  210. color: #2387ff;
  211. }
  212. .ql-toolbar.ql-snow{
  213. display: flex;
  214. }
  215. .PA2textAreaTit2{
  216. font-size: 16px;
  217. }
  218. .el-textarea__inner{
  219. background: #f2f2f2;
  220. }
  221. }
  222. .PA2mid{ //预期取得成果单独一栏
  223. width: 100%;
  224. text-align: left;
  225. font-size: 18px;
  226. font-weight: 550;
  227. margin-bottom: 10px;
  228. color: #2387ff;
  229. }
  230. }
  231. </style>