product.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  1. <template>
  2. <div id="product">
  3. <el-row>
  4. <el-col :span="24">
  5. <div class="w_1200">
  6. <el-col :span="24" class="top">
  7. toubu
  8. </el-col>
  9. <el-col :span="24" class="down">
  10. <el-tabs v-model="activeName" type="card">
  11. <el-tab-pane label="技术需求" name="first">
  12. <el-col :span="24" class="first">
  13. <el-col :span="24" class="company">
  14. <h1>企业信息</h1>
  15. <el-col :span="24" class="compnayInfo">
  16. <el-col :span="24" class="txt">
  17. <el-col :span="2" class="left">
  18. 企业名称:
  19. </el-col>
  20. <el-col :span="22" class="right">
  21. <el-input v-model="technologyForm.company" placeholder="请输入企业名称" disabled></el-input>
  22. </el-col>
  23. </el-col>
  24. <el-col :span="12" class="txt">
  25. <el-col :span="4" class="left">
  26. 联系电话:
  27. </el-col>
  28. <el-col :span="20" class="right">
  29. <el-input v-model="technologyForm.phone" placeholder="请输入联系电话" disabled></el-input>
  30. </el-col>
  31. </el-col>
  32. <el-col :span="12" class="txt">
  33. <el-col :span="4" class="left">
  34. 电子邮箱:
  35. </el-col>
  36. <el-col :span="20" class="right">
  37. <el-input v-model="technologyForm.email" placeholder="请输入电子邮箱" disabled></el-input>
  38. </el-col>
  39. </el-col>
  40. <el-col :span="12" class="txt">
  41. <el-col :span="4" class="left">
  42. 联系人:
  43. </el-col>
  44. <el-col :span="20" class="right">
  45. <el-input v-model="technologyForm.contacts" placeholder="请输入联系人"></el-input>
  46. </el-col>
  47. </el-col>
  48. <el-col :span="12" class="txt">
  49. <el-col :span="4" class="left">
  50. QQ/微信:
  51. </el-col>
  52. <el-col :span="20" class="right">
  53. <el-input v-model="technologyForm.qqwx" placeholder="请输入QQ/微信"></el-input>
  54. </el-col>
  55. </el-col>
  56. <el-col :span="12" class="txt">
  57. <el-col :span="4" class="left">
  58. 信用代码:
  59. </el-col>
  60. <el-col :span="20" class="right">
  61. <el-input v-model="technologyForm.institution_code" placeholder="请输入统一社会信用代码" disabled></el-input>
  62. </el-col>
  63. </el-col>
  64. <el-col :span="12" class="txt">
  65. <el-col :span="4" class="left">
  66. 注册资金:
  67. </el-col>
  68. <el-col :span="20" class="right">
  69. <el-input v-model="technologyForm.companycapital" placeholder="请输入注册资金"></el-input>
  70. </el-col>
  71. </el-col>
  72. <el-col :span="12" class="txt">
  73. <el-col :span="4" class="left">
  74. 注册类型:
  75. </el-col>
  76. <el-col :span="20" class="right">
  77. <el-input v-model="technologyForm.companytype" placeholder="请输入注册类型"></el-input>
  78. </el-col>
  79. </el-col>
  80. <el-col :span="12" class="txt">
  81. <el-col :span="4" class="left">
  82. 注册时间:
  83. </el-col>
  84. <el-col :span="20" class="right">
  85. <el-date-picker
  86. v-model="technologyForm.companydate"
  87. type="date"
  88. placeholder="请选择时间"
  89. format="yyyy-MM-dd"
  90. value-format="yyyy-MM-dd"
  91. >
  92. </el-date-picker>
  93. </el-col>
  94. </el-col>
  95. <el-col :span="24" class="txtTwo">
  96. <p>企业简介:</p>
  97. <el-input
  98. v-model="technologyForm.companybrief"
  99. type="textarea"
  100. maxlength="300"
  101. show-word-limit
  102. :autosize="{ minRows: 4, maxRows: 5 }"
  103. placeholder="请输入企业简介"
  104. ></el-input>
  105. </el-col>
  106. </el-col>
  107. </el-col>
  108. <el-col :span="24" class="product">
  109. <h1>科技需求</h1>
  110. <el-col :span="24" class="productInfo">
  111. <el-col :span="24" class="txt">
  112. <el-col :span="2" class="left">
  113. 需求名称:
  114. </el-col>
  115. <el-col :span="22" class="right">
  116. <el-input v-model="technologyForm.name" placeholder="请输入需求名称"></el-input>
  117. </el-col>
  118. </el-col>
  119. <el-col :span="12" class="txt">
  120. <el-col :span="5" class="left">
  121. 需求紧急程度:
  122. </el-col>
  123. <el-col :span="19" class="right">
  124. <el-select v-model="technologyForm.degreeurgency" placeholder="请选择需求紧急程度">
  125. <el-option label="特急" value="特急"></el-option>
  126. <el-option label="一般" value="一般"></el-option>
  127. <el-option label="储备" value="储备"></el-option>
  128. </el-select>
  129. </el-col>
  130. </el-col>
  131. <el-col :span="12" class="txt">
  132. <el-col :span="4" class="left">
  133. 所属领域:
  134. </el-col>
  135. <el-col :span="20" class="right">
  136. <el-select v-model="technologyForm.field" filterable>
  137. <el-option v-for="(item, index) in fieldList" :key="index" :value="item.name" :label="item.name"></el-option>
  138. </el-select>
  139. </el-col>
  140. </el-col>
  141. <el-col :span="12" class="txt">
  142. <el-col :span="4" class="left">
  143. 投资预算:
  144. </el-col>
  145. <el-col :span="20" class="right">
  146. <el-input v-model="technologyForm.budget" placeholder="请输入投资预算"></el-input>
  147. </el-col>
  148. </el-col>
  149. <el-col :span="12" class="txt">
  150. <el-col :span="4" class="left">
  151. 合作方式:
  152. </el-col>
  153. <el-col :span="20" class="right">
  154. <el-select v-model="technologyForm.cooperation" filterable>
  155. <el-option v-for="(item, index) in cooperationList" :key="index" :value="item.name" :label="item.name"></el-option>
  156. </el-select>
  157. </el-col>
  158. </el-col>
  159. <el-col :span="24" class="txtTwo">
  160. <p>技术说明:</p>
  161. <el-input
  162. v-model="technologyForm.requirementdesc"
  163. type="textarea"
  164. maxlength="300"
  165. show-word-limit
  166. :autosize="{ minRows: 4, maxRows: 5 }"
  167. placeholder="请输入技术说明"
  168. ></el-input>
  169. </el-col>
  170. <el-col :span="24" class="txtTwo">
  171. <p>预期目标:</p>
  172. <el-input
  173. v-model="technologyForm.expect"
  174. type="textarea"
  175. maxlength="300"
  176. show-word-limit
  177. :autosize="{ minRows: 4, maxRows: 5 }"
  178. placeholder="请输入预期目标"
  179. ></el-input>
  180. </el-col>
  181. <el-col :span="24" class="txtTwo">
  182. <p>需求现状:</p>
  183. <el-input
  184. v-model="technologyForm.present"
  185. type="textarea"
  186. maxlength="300"
  187. show-word-limit
  188. :autosize="{ minRows: 4, maxRows: 5 }"
  189. placeholder="请输入需求现状"
  190. ></el-input>
  191. </el-col>
  192. <el-col :span="24" class="txtTwo">
  193. <p>合作条件及要求:</p>
  194. <el-input
  195. v-model="technologyForm.condition"
  196. type="textarea"
  197. maxlength="300"
  198. show-word-limit
  199. :autosize="{ minRows: 4, maxRows: 5 }"
  200. placeholder="请输入合作条件及要求"
  201. ></el-input>
  202. </el-col>
  203. <el-col :span="24" class="txtTwo">
  204. <p>图片:</p>
  205. <upload
  206. :limit="6"
  207. :data="technologyForm.image"
  208. :uploadBtn="true"
  209. type="image"
  210. :url="`/files/image/upload`"
  211. @upload="uploadSuccess"
  212. @delete="uploadDelete"
  213. ></upload>
  214. </el-col>
  215. </el-col>
  216. </el-col>
  217. <el-col :span="24" class="btn">
  218. <el-button type="primary" size="mini" @click="technologyBtn()">保存</el-button>
  219. </el-col>
  220. </el-col>
  221. </el-tab-pane>
  222. <el-tab-pane label="科技成果" name="second">
  223. <el-col :span="24" class="first">
  224. <el-col :span="24" class="company">
  225. <h1>企业信息</h1>
  226. <el-col :span="24" class="compnayInfo">
  227. <el-col :span="24" class="txt">
  228. <el-col :span="2" class="left">
  229. 企业名称:
  230. </el-col>
  231. <el-col :span="22" class="right">
  232. <el-input v-model="achieveForm.company" placeholder="请输入企业名称" disabled></el-input>
  233. </el-col>
  234. </el-col>
  235. <el-col :span="12" class="txt">
  236. <el-col :span="4" class="left">
  237. 联系电话:
  238. </el-col>
  239. <el-col :span="20" class="right">
  240. <el-input v-model="achieveForm.phone" placeholder="请输入联系电话" disabled></el-input>
  241. </el-col>
  242. </el-col>
  243. <el-col :span="12" class="txt">
  244. <el-col :span="4" class="left">
  245. 电子邮箱:
  246. </el-col>
  247. <el-col :span="20" class="right">
  248. <el-input v-model="achieveForm.email" placeholder="请输入电子邮箱" disabled></el-input>
  249. </el-col>
  250. </el-col>
  251. <el-col :span="12" class="txt">
  252. <el-col :span="4" class="left">
  253. 联系人:
  254. </el-col>
  255. <el-col :span="20" class="right">
  256. <el-input v-model="achieveForm.contacts" placeholder="请输入联系人"></el-input>
  257. </el-col>
  258. </el-col>
  259. <el-col :span="12" class="txt">
  260. <el-col :span="4" class="left">
  261. QQ/微信:
  262. </el-col>
  263. <el-col :span="20" class="right">
  264. <el-input v-model="achieveForm.qqwx" placeholder="请输入QQ/微信"></el-input>
  265. </el-col>
  266. </el-col>
  267. <el-col :span="24" class="txtTwo">
  268. <p>企业简介:</p>
  269. <el-input
  270. v-model="achieveForm.companybrief"
  271. type="textarea"
  272. maxlength="300"
  273. show-word-limit
  274. :autosize="{ minRows: 4, maxRows: 5 }"
  275. placeholder="请输入企业简介"
  276. ></el-input>
  277. </el-col>
  278. </el-col>
  279. </el-col>
  280. <el-col :span="24" class="product">
  281. <h1>科技成果</h1>
  282. <el-col :span="24" class="productInfo">
  283. <el-col :span="24" class="txt">
  284. <el-col :span="2" class="left">
  285. 成果名称:
  286. </el-col>
  287. <el-col :span="22" class="right">
  288. <el-input v-model="achieveForm.name" placeholder="请输入成果名称"></el-input>
  289. </el-col>
  290. </el-col>
  291. <el-col :span="12" class="txt">
  292. <el-col :span="4" class="left">
  293. 所属领域:
  294. </el-col>
  295. <el-col :span="20" class="right">
  296. <el-select v-model="achieveForm.field" filterable>
  297. <el-option v-for="(item, index) in fieldList" :key="index" :value="item.name" :label="item.name"></el-option>
  298. </el-select>
  299. </el-col>
  300. </el-col>
  301. <el-col :span="12" class="txt">
  302. <el-col :span="4" class="left">
  303. 合作方式:
  304. </el-col>
  305. <el-col :span="20" class="right">
  306. <el-select v-model="achieveForm.cooperation" filterable>
  307. <el-option v-for="(item, index) in cooperationList" :key="index" :value="item.name" :label="item.name"></el-option>
  308. </el-select>
  309. </el-col>
  310. </el-col>
  311. <el-col :span="12" class="txt">
  312. <el-col :span="4" class="left">
  313. 成果状态:
  314. </el-col>
  315. <el-col :span="20" class="right">
  316. <el-select v-model="achieveForm.achievestatus" filterable>
  317. <el-option v-for="(item, index) in achievestatusList" :key="index" :value="item.name" :label="item.name"></el-option>
  318. </el-select>
  319. </el-col>
  320. </el-col>
  321. <el-col :span="12" class="txt">
  322. <el-col :span="4" class="left">
  323. 成果权属:
  324. </el-col>
  325. <el-col :span="20" class="right">
  326. <el-input v-model="achieveForm.achieveown" placeholder="请输入成果权属"></el-input>
  327. </el-col>
  328. </el-col>
  329. <el-col :span="12" class="txt">
  330. <el-col :span="4" class="left">
  331. 成果来源:
  332. </el-col>
  333. <el-col :span="20" class="right">
  334. <el-select v-model="achieveForm.achievesource" placeholder="请选择成果来源">
  335. <el-option label="国家项目" value="国家项目"></el-option>
  336. <el-option label="省级项目" value="省级项目"></el-option>
  337. <el-option label="市级项目" value="市级项目"></el-option>
  338. <el-option label="自选项目" value="自选项目"></el-option>
  339. </el-select>
  340. </el-col>
  341. </el-col>
  342. <el-col :span="12" class="txt">
  343. <el-col :span="4" class="left">
  344. 意向价格:
  345. </el-col>
  346. <el-col :span="20" class="right">
  347. <el-input v-model="achieveForm.intentionprice" placeholder="请输入意向价格"></el-input>
  348. </el-col>
  349. </el-col>
  350. <el-col :span="12" class="txt">
  351. <el-col :span="4" class="left">
  352. 专利信息:
  353. </el-col>
  354. <el-col :span="20" class="right">
  355. <el-button type="primary" size="mini" @click="addpatent()">添加信息</el-button>
  356. <el-button type="primary" size="mini" @click="viewpatent()">查看信息</el-button>
  357. </el-col>
  358. </el-col>
  359. <el-col :span="12" class="txt">
  360. <el-col :span="4" class="left">
  361. 项目路演:
  362. </el-col>
  363. <el-col :span="20" class="right">
  364. <uploadraw
  365. :limit="1"
  366. :data="achieveForm.roadshow"
  367. type="roadshow"
  368. listType=""
  369. :url="'/files/roadshow/upload'"
  370. @upload="uploadroadshow"
  371. @delete="uploaddelroadshow"
  372. ></uploadraw>
  373. </el-col>
  374. </el-col>
  375. <el-col :span="24" class="txtTwo">
  376. <p>成果简介:</p>
  377. <el-input
  378. v-model="achieveForm.achievebrief"
  379. type="textarea"
  380. maxlength="200"
  381. show-word-limit
  382. :autosize="{ minRows: 4, maxRows: 5 }"
  383. placeholder="请输入成果简介"
  384. ></el-input>
  385. </el-col>
  386. <el-col :span="24" class="txtTwo">
  387. <p>技术特点:</p>
  388. <el-input
  389. v-model="achieveForm.features"
  390. type="textarea"
  391. maxlength="200"
  392. show-word-limit
  393. :autosize="{ minRows: 4, maxRows: 5 }"
  394. placeholder="请输入技术特点"
  395. ></el-input>
  396. </el-col>
  397. <el-col :span="24" class="txtTwo">
  398. <p>技术团队:</p>
  399. <el-input
  400. v-model="achieveForm.team"
  401. type="textarea"
  402. maxlength="300"
  403. show-word-limit
  404. :autosize="{ minRows: 4, maxRows: 5 }"
  405. placeholder="请输入技术团队"
  406. ></el-input>
  407. </el-col>
  408. <el-col :span="24" class="txtTwo">
  409. <p>商业预期:</p>
  410. <el-input
  411. v-model="achieveForm.expectations"
  412. type="textarea"
  413. maxlength="300"
  414. show-word-limit
  415. :autosize="{ minRows: 4, maxRows: 5 }"
  416. placeholder="请输入商业预期"
  417. ></el-input>
  418. </el-col>
  419. <el-col :span="24" class="txtTwo">
  420. <p>合作条件及要求:</p>
  421. <el-input
  422. v-model="achieveForm.condition"
  423. type="textarea"
  424. maxlength="300"
  425. show-word-limit
  426. :autosize="{ minRows: 4, maxRows: 5 }"
  427. placeholder="请输入合作条件及要求"
  428. ></el-input>
  429. </el-col>
  430. <el-col :span="24" class="txtTwo">
  431. <p>图片:</p>
  432. <upload
  433. :limit="6"
  434. :data="achieveForm.image"
  435. :uploadBtn="true"
  436. type="image"
  437. :url="`/files/image/upload`"
  438. @upload="achieveuploadSuccess"
  439. @delete="achieveuploadDelete"
  440. ></upload>
  441. </el-col>
  442. </el-col>
  443. </el-col>
  444. <el-col :span="24" class="btn">
  445. <el-button type="primary" size="mini" @click="achieveBtn()">保存</el-button>
  446. </el-col>
  447. </el-col>
  448. </el-tab-pane>
  449. </el-tabs>
  450. </el-col>
  451. </div>
  452. </el-col>
  453. </el-row>
  454. <el-dialog title="添加信息" :visible.sync="addpatentdialog" width="40%" :before-close="patentdialogclose">
  455. <el-form ref="addpatentform" :model="addpatentform" label-width="80px" class="addpatentform">
  456. <el-form-item label="专利名称">
  457. <el-input v-model="addpatentform.patentinfo" placeholder="请输入专利名称"></el-input>
  458. </el-form-item>
  459. <el-form-item label="专利状态">
  460. <el-select v-model="addpatentform.patentstatus" placeholder="请选择">
  461. <el-option label="已申请" value="已申请"></el-option>
  462. <el-option label="已授权" value="已授权"></el-option>
  463. </el-select>
  464. </el-form-item>
  465. <el-form-item>
  466. <el-button type="primary" @click="patentonSubmit">保存</el-button>
  467. </el-form-item>
  468. </el-form>
  469. </el-dialog>
  470. <el-dialog title="查看专利信息" :visible.sync="viewpatentdialog" width="40%" :before-close="viewpatentdialogclose">
  471. <el-table :data="diapatentList" style="width: 100%" border>
  472. <el-table-column prop="patentinfo" label="专利信息" align="center"> </el-table-column>
  473. <el-table-column prop="patentstatus" label="专利状态" align="center"> </el-table-column>
  474. <el-table-column label="操作" align="center">
  475. <template v-slot="scoped">
  476. <el-button type="text" @click="delAttend(scoped.$index, scoped.row)" size="small">删除</el-button>
  477. </template>
  478. </el-table-column>
  479. </el-table>
  480. </el-dialog>
  481. </div>
  482. </template>
  483. <script>
  484. import uploadraw from '@/components/uploadraw.vue';
  485. import upload from '@/components/upload.vue';
  486. import { mapState, createNamespacedHelpers } from 'vuex';
  487. const { mapActions: markettype } = createNamespacedHelpers('markettype');
  488. const { mapActions: mapMarketproduct } = createNamespacedHelpers('marketproduct');
  489. const { mapActions: market } = createNamespacedHelpers('market');
  490. const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
  491. export default {
  492. metaInfo() {
  493. return { title: this.$route.meta.title };
  494. },
  495. name: 'product',
  496. props: {},
  497. components: {
  498. upload,
  499. uploadraw,
  500. },
  501. data: function() {
  502. return {
  503. activeName: 'first',
  504. // 所属领域
  505. fieldList: [],
  506. // 成果状态
  507. achievestatusList: [],
  508. // 合作方式
  509. cooperationList: [],
  510. // 技术需求
  511. technologyForm: {},
  512. // 科技成果
  513. achieveForm: {},
  514. // 专利信息
  515. addpatentform: {},
  516. diapatentList: [],
  517. addpatentdialog: false,
  518. viewpatentdialog: false,
  519. };
  520. },
  521. created() {
  522. this.searchtype();
  523. this.searchInfo();
  524. },
  525. methods: {
  526. ...markettype({ markettypeList: 'query' }),
  527. ...market(['fetch', 'update']),
  528. ...mapMarketproduct({ productFetch: 'fetch', productCreate: 'create', productUpdate: 'update' }),
  529. ...expertsuser({ expertsuserFetch: 'fetch', expertsuserUpdate: 'update', expertsuserUpgrade: 'upgrade' }),
  530. // 查询字典表
  531. async searchtype() {
  532. // 所属领域;
  533. let res = await this.markettypeList({ category: '01' });
  534. if (this.$checkRes(res)) {
  535. this.$set(this, `fieldList`, res.data);
  536. }
  537. // 成果状态;
  538. res = await this.markettypeList({ category: '02' });
  539. if (this.$checkRes(res)) {
  540. this.$set(this, `achievestatusList`, res.data);
  541. }
  542. // 合作方式;
  543. res = await this.markettypeList({ category: '03' });
  544. if (this.$checkRes(res)) {
  545. this.$set(this, `cooperationList`, res.data);
  546. }
  547. },
  548. async searchInfo() {
  549. if (this.user.role == '4' || this.user.role == '5') {
  550. let res = await this.fetch(this.user.userid);
  551. if (res.errcode === 0) {
  552. let message = {
  553. company: res.data.name,
  554. phone: res.data.phone,
  555. email: res.data.email,
  556. companytype: res.data.companytype,
  557. companydate: res.data.companydate,
  558. companycapital: res.data.companycapital,
  559. institution_code: res.data.institution_code,
  560. companyperson: res.data.companyperson,
  561. sndqyzsr: res.data.sndqyzsr,
  562. sndyffy: res.data.sndyffy,
  563. companytotal: res.data.companytotal,
  564. sndyffy: res.data.sndyffy,
  565. companybrief: res.data.sndyffy,
  566. mainproduct: res.data.mainproduct,
  567. qualifications: res.data.qualifications,
  568. qqwx: res.data.qqwx,
  569. companyweb: res.data.companyweb,
  570. contacts: res.data.contacts,
  571. };
  572. this.$set(this, `technologyForm`, message);
  573. this.$set(this, `achieveForm`, message);
  574. }
  575. } else if (this.user.role == '6') {
  576. let res = await this.expertsuserFetch(this.user.userid);
  577. if (res.errcode === 0) {
  578. let message = {
  579. company: res.data.company,
  580. phone: res.data.phone,
  581. email: res.data.email,
  582. qqwx: res.data.qqwx,
  583. companyweb: res.data.companyweb,
  584. contacts: res.data.contacts,
  585. };
  586. this.$set(this, `technologyForm`, message);
  587. this.$set(this, `achieveForm`, message);
  588. }
  589. }
  590. },
  591. // 科技成果提交
  592. async achieveBtn() {
  593. let data = this.achieveForm;
  594. data.userid = this.user.uid;
  595. data.type = '1';
  596. data.status = '0';
  597. data.patent = this.diapatentList;
  598. let res = await this.productCreate(data);
  599. if (this.$checkRes(res)) {
  600. this.$message({
  601. message: '信息发布成功',
  602. type: 'success',
  603. });
  604. window.location.reload();
  605. } else {
  606. this.$message.error('信息发布失败');
  607. }
  608. },
  609. // 技术需求提交
  610. async technologyBtn() {
  611. const data = this.technologyForm;
  612. data.userid = this.user.uid;
  613. data.type = '0';
  614. data.status = '0';
  615. let res = await this.productCreate(data);
  616. if (this.$checkRes(res)) {
  617. this.$message({
  618. message: '信息发布成功',
  619. type: 'success',
  620. });
  621. window.location.reload();
  622. } else {
  623. this.$message({
  624. message: '信息发布失败',
  625. type: 'success',
  626. });
  627. }
  628. },
  629. // 添加专利信息
  630. addpatent() {
  631. this.addpatentdialog = true;
  632. },
  633. patentonSubmit() {
  634. let data = this.addpatentform;
  635. this.diapatentList.push(data);
  636. this.addpatentform = {};
  637. this.patentdialogclose();
  638. },
  639. // 取消添加
  640. patentdialogclose() {
  641. this.addpatentdialog = false;
  642. },
  643. // 查看专利信息
  644. viewpatent() {
  645. this.viewpatentdialog = true;
  646. },
  647. // 取消查看专利信息
  648. viewpatentdialogclose() {
  649. this.viewpatentdialog = false;
  650. },
  651. // 删除
  652. delAttend(index, val) {
  653. this.diapatentList.splice(index, 1);
  654. this.$message({
  655. message: '删除专利信息成功',
  656. type: 'success',
  657. });
  658. this.viewpatentdialogclose();
  659. },
  660. // 图片
  661. uploadSuccess({ type, data }) {
  662. let arr = _.get(this.technologyForm, type);
  663. if (_.isArray(arr)) {
  664. let datas = { name: data.name, url: data.uri };
  665. this.technologyForm[type].push({ name: data.name, url: data.uri });
  666. } else {
  667. let newArr = [{ name: data.name, url: data.uri }];
  668. this.$set(this.technologyForm, `${type}`, newArr);
  669. }
  670. },
  671. // 删除图片
  672. uploadDelete(index) {
  673. this.technologyForm.image.splice(index, 1);
  674. },
  675. // 项目路演
  676. uploadroadshow({ type, filetype, data }) {
  677. this.$set(this.achieveForm, `${type}`, data.uri);
  678. },
  679. uploaddelroadshow(index) {},
  680. // 成果图片
  681. achieveuploadSuccess({ type, data }) {
  682. let arr = _.get(this.achieveForm, type);
  683. if (_.isArray(arr)) {
  684. let datas = { name: data.name, url: data.uri };
  685. this.achieveForm[type].push({ name: data.name, url: data.uri });
  686. } else {
  687. let newArr = [{ name: data.name, url: data.uri }];
  688. this.$set(this.achieveForm, `${type}`, newArr);
  689. }
  690. },
  691. // 删除图片
  692. achieveuploadDelete(index) {
  693. this.achieveForm.image.splice(index, 1);
  694. },
  695. },
  696. computed: {
  697. ...mapState(['user']),
  698. },
  699. };
  700. </script>
  701. <style lang="less" scoped>
  702. .down {
  703. margin: 15px 0;
  704. .first {
  705. .company {
  706. border: 1px solid #ccc;
  707. padding: 0 15px 15px 15px;
  708. h1 {
  709. margin: 10px 10px;
  710. border-bottom: 1px solid red;
  711. height: 40px;
  712. line-height: 40px;
  713. }
  714. .compnayInfo {
  715. .txt {
  716. margin: 0 0 5px 0;
  717. border-bottom: 1px dashed #ccc;
  718. padding: 10px 0;
  719. .left {
  720. text-align: center;
  721. height: 40px;
  722. line-height: 40px;
  723. font-size: 15px;
  724. }
  725. }
  726. .txtTwo {
  727. p {
  728. font-size: 15px;
  729. padding: 10px;
  730. }
  731. }
  732. }
  733. }
  734. .product {
  735. border: 1px solid #ccc;
  736. padding: 0 15px 15px 15px;
  737. h1 {
  738. margin: 10px 10px;
  739. border-bottom: 1px solid red;
  740. height: 40px;
  741. line-height: 40px;
  742. }
  743. .productInfo {
  744. .txt {
  745. margin: 0 0 5px 0;
  746. border-bottom: 1px dashed #ccc;
  747. padding: 10px 0;
  748. .left {
  749. text-align: center;
  750. height: 40px;
  751. line-height: 40px;
  752. font-size: 15px;
  753. }
  754. }
  755. .txtTwo {
  756. p {
  757. font-size: 15px;
  758. padding: 10px;
  759. }
  760. }
  761. }
  762. }
  763. .btn {
  764. text-align: center;
  765. margin: 15px 0;
  766. }
  767. }
  768. }
  769. </style>