index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <div class="w_1200">
  6. <el-col :span="24" class="info">
  7. <el-col :span="24" class="one">
  8. 成果评价系统-用户申报
  9. </el-col>
  10. <el-col :span="24" class="two">
  11. <el-col :span="24" class="setp">
  12. <el-steps :active="active" align-center>
  13. <el-step title="(一)基本信息"> </el-step>
  14. <el-step title="(二)内容简介"> </el-step>
  15. <el-step title="(三)主研人员名单"></el-step>
  16. <el-step title="(四)评价委托方提供资料清单"></el-step>
  17. </el-steps>
  18. </el-col>
  19. <el-col :span="24" class="twoInfo">
  20. <basic :basicForm="basic" @timeBtn="timeBtn" @basicBtn="basicBtn" v-if="active == '1'"></basic>
  21. <brief :briefForm="brief" @timeBtn="timeBtn" @briefUp="briefUp" @briefBtn="briefBtn" v-else-if="active == '2'"></brief>
  22. <research :researchForm="research" @timeBtn="timeBtn" @researchUp="researchUp" @researchBtn="researchBtn" v-else-if="active == '3'"></research>
  23. <datalists :datalistForm="datalist" @timeBtn="timeBtn" @detailedUp="detailedUp" @onSubmit="onSubmit" v-else-if="active == '4'"></datalists>
  24. </el-col>
  25. </el-col>
  26. </el-col>
  27. </div>
  28. </el-col>
  29. </el-row>
  30. </div>
  31. </template>
  32. <script>
  33. import basic from './parts/basic.vue';
  34. import brief from './parts/brief.vue';
  35. import research from './parts/research.vue';
  36. import datalists from './parts/datalists.vue';
  37. import { mapState, createNamespacedHelpers } from 'vuex';
  38. const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
  39. export default {
  40. name: 'index',
  41. props: {},
  42. components: {
  43. basic,
  44. brief,
  45. research,
  46. datalists,
  47. },
  48. data: function() {
  49. return {
  50. // 步骤
  51. active: 1,
  52. // 基本信息
  53. basic: {
  54. // achieve_date: '2021-05-24 10:13:08',
  55. // achieve_form: '新技术',
  56. // achieve_name: '06-01成果4',
  57. // achieve_num: '123456',
  58. // achieve_type: ['发明专利', '实用新型专利'],
  59. // address: '长春市',
  60. // apply_company: '福瑞',
  61. // apply_nature: '企业',
  62. // apply_personal: '顾红伟',
  63. // apply_phone: '13943018186',
  64. // contacts: '顾红伟',
  65. // email: '123456@163.com',
  66. // fax: '123456',
  67. // objective: '申报奖励',
  68. // output: '1',
  69. // phone: '13943018186',
  70. // profit: '2',
  71. // revenue: '3',
  72. // stage: '实验室',
  73. },
  74. // 内容简介
  75. brief: {
  76. // achieve_brief: '成果简介',
  77. // advanced: '成果的创造性,先进性',
  78. // compare: '与国内外同类技术比较',
  79. // field: '应用领域和技术原理',
  80. // kpi_index: '性能指标',
  81. // opinion: '坐在的问题和改进意见',
  82. // prospect: '推广应用的范围',
  83. // sense: '作用意义',
  84. },
  85. // 研发人员名单
  86. research: [
  87. // {
  88. // name: '姓名',
  89. // gender: '女',
  90. // age: '25',
  91. // birth: '1996-03-25',
  92. // zc: '职称',
  93. // education: '本科',
  94. // degree: '学士',
  95. // major: '计算机',
  96. // abroad: '否',
  97. // company: '工作单位',
  98. // work: '主要工作',
  99. // devote: '创造性意见',
  100. // },
  101. // {
  102. // name: '姓名',
  103. // gender: '女',
  104. // age: '25',
  105. // birth: '1996-03-25',
  106. // zc: '职称',
  107. // education: '本科',
  108. // degree: '学士',
  109. // major: '计算机',
  110. // abroad: '否',
  111. // company: '工作单位',
  112. // work: '主要工作',
  113. // devote: '创造性意见',
  114. // },
  115. // {
  116. // name: '姓名',
  117. // gender: '女',
  118. // age: '25',
  119. // birth: '1996-03-25',
  120. // zc: '职称',
  121. // education: '本科',
  122. // degree: '学士',
  123. // major: '计算机',
  124. // abroad: '否',
  125. // company: '工作单位',
  126. // work: '主要工作',
  127. // devote: '创造性意见',
  128. // },
  129. ],
  130. // 补充材料
  131. datalist: {
  132. // benefit: { name: '科教之旅.txt', url: '/files/live/benefit/20210524101550.txt' },
  133. // compare_report: { name: '05-06.txt', url: '/files/live/compare/report/20210524101548.txt' },
  134. // gf: { name: '科教之旅.txt', url: '/files/live/gf/20210524101611.txt' },
  135. // patent_cert: { name: '科教之旅.txt', url: '/files/live/patent/cert/20210524101601.txt' },
  136. // science_report: { name: '05-06.txt', url: '/files/live/science/report/20210524101553.txt' },
  137. // software_copyright: { name: '05-06.txt', url: '/files/live/software/copyright/20210524101604.txt' },
  138. // techol_detect_report: { name: '科教之旅.txt', url: '/files/live/techol/detect/report/20210524101556.txt' },
  139. // techol_report: { name: '科教之旅.txt', url: '/files/live/techol/report/20210524101545.txt' },
  140. // treatise: { name: '科教之旅.txt', url: '/files/live/treatise/20210524101606.txt' },
  141. // user_prove: { name: '05-06.txt', url: '/files/live/user/prove/20210524101559.txt' },
  142. // work_report: { name: '05-06.txt', url: '/files/live/work/report/20210524101543.txt' },
  143. // company_standard: { name: '05-06.txt', url: '/files/live/company/standard/20210524102319.txt' },
  144. },
  145. };
  146. },
  147. created() {},
  148. methods: {
  149. ...achieveApply(['create']),
  150. //基本信息下一步
  151. basicBtn() {
  152. this.active = 2;
  153. },
  154. // 内容简介上一步
  155. briefUp() {
  156. this.active = 1;
  157. },
  158. // 内容简介下一步
  159. briefBtn() {
  160. this.active = 3;
  161. },
  162. // 研发人员名单上一步
  163. researchUp() {
  164. this.active = 2;
  165. },
  166. // 研发人员名单下一步
  167. researchBtn({ data }) {
  168. this.$set(this, `research`, data);
  169. this.active = 4;
  170. },
  171. // 补充材料上一步
  172. detailedUp() {
  173. this.active = 3;
  174. },
  175. // 临时保存
  176. async timeBtn({ arr, type }) {
  177. if (type == '3') this.$set(this, `research`, arr);
  178. let data = {
  179. basic: this.basic,
  180. brief: this.brief,
  181. research: this.research,
  182. datalist: this.datalist,
  183. status: '10',
  184. };
  185. this.$alert(
  186. '<strong><p>1:用户</p><p>当您进行成果申报时,系统会自动识别您是否为平台用户,未注册用户,系统会自动拾取【申请人】和【申请人电话】进行平台用户注册,您可用【申请人电话】和【初始密码123456】进行登录查看。</p></strong>',
  187. '信息提示',
  188. {
  189. dangerouslyUseHTMLString: true,
  190. showConfirmButton: true,
  191. showCancelButton: true,
  192. confirmButtonText: '确定',
  193. cancelButtonText: '取消',
  194. }
  195. )
  196. .then(async () => {
  197. console.log(data);
  198. let res = await this.create(data);
  199. if (this.$checkRes(res)) {
  200. this.$message({
  201. message: '临时保存申报成功,请登录到管理中心继续编辑!',
  202. type: 'success',
  203. });
  204. this.$router.push({ path: '/login' });
  205. }
  206. })
  207. .catch(() => {});
  208. },
  209. // 提交申报
  210. async onSubmit() {
  211. let data = {
  212. basic: this.basic,
  213. brief: this.brief,
  214. research: this.research,
  215. datalist: this.datalist,
  216. };
  217. this.$alert(
  218. '<strong><p>1:用户</p><p>当您进行成果申报时,系统会自动识别您是否为平台用户,未注册用户,系统会自动拾取【申请人】和【申请人电话】进行平台用户注册,您可用【申请人电话】和【初始密码123456】进行登录查看。</p></strong>',
  219. '信息提示',
  220. {
  221. dangerouslyUseHTMLString: true,
  222. showConfirmButton: true,
  223. showCancelButton: true,
  224. confirmButtonText: '确定',
  225. cancelButtonText: '取消',
  226. }
  227. )
  228. .then(async () => {
  229. let res = await this.create(data);
  230. if (this.$checkRes(res)) {
  231. this.$message({
  232. message: '申报成功,可登录平台进行查看审核状态',
  233. type: 'success',
  234. });
  235. this.$router.push({ path: '/login' });
  236. }
  237. })
  238. .catch(() => {});
  239. },
  240. },
  241. computed: {
  242. ...mapState(['user']),
  243. pageTitle() {
  244. return `${this.$route.meta.title}`;
  245. },
  246. },
  247. metaInfo() {
  248. return { title: this.$route.meta.title };
  249. },
  250. };
  251. </script>
  252. <style lang="less" scoped>
  253. .w_1200 {
  254. width: 1200px;
  255. margin: 0 auto;
  256. }
  257. .main {
  258. height: 100vh;
  259. overflow-y: auto;
  260. .info {
  261. padding: 30px 0;
  262. .one {
  263. font-size: 30px;
  264. text-align: center;
  265. margin: 0 0 40px 0;
  266. font-weight: bold;
  267. }
  268. .two {
  269. .setp {
  270. margin: 0 0 30px 0;
  271. }
  272. .twoInfo {
  273. border: 1px solid #409eff;
  274. padding: 15px 0 15px 15px;
  275. height: 700px;
  276. overflow-y: auto;
  277. border-radius: 10px;
  278. }
  279. }
  280. }
  281. }
  282. </style>