index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <div id="index">
  3. <el-col :span="24">
  4. <div class="center">
  5. <el-col :span="24" class="ys">
  6. <el-input v-model="company" placeholder="请输入查询产品" class="wid"></el-input>
  7. <el-button type="primary" @click="clic">查询产品</el-button>
  8. </el-col>
  9. <el-table @query="clic" :data="list" :default-sort="{ prop: 'company', order: 'descending' }" border>
  10. <el-table-column prop="company" label="企业名称" sortable></el-table-column>
  11. <el-table-column prop="name" label="标题" sortable></el-table-column>
  12. <el-table-column prop="type" label="产品类型" sortable>
  13. <template slot-scope="{ row: { type } }">
  14. <span v-if="+type === 0">技术</span>
  15. <span v-else-if="+type === 1">产品</span>
  16. <span v-else>商务</span>
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="field" label="所属领域" sortable></el-table-column>
  20. <el-table-column prop="cooperation" label="合作方式" sortable></el-table-column>
  21. <el-table-column prop="contacts" label="联系人" sortable></el-table-column>
  22. <el-table-column prop="phone" label="联系电话" sortable></el-table-column>
  23. <el-table-column prop="status" label="状态" sortable>
  24. <template slot-scope="{ row: { status } }">
  25. <span v-if="+status === 0">待审核</span>
  26. <span v-else-if="+status === 1">审核成功</span>
  27. <span v-else>审核拒绝</span>
  28. </template>
  29. </el-table-column>
  30. <el-table-column label="操作" class="page">
  31. <el-button type="text" icon="el-icon-delete" @delete="delDelete"></el-button>
  32. </el-table-column>
  33. </el-table>
  34. <el-pagination background layout="prev, pager, next" :total="100"> </el-pagination>
  35. <el-tabs class="tab" v-model="activeName" type="card" @tab-click="handleClick">
  36. <el-tab-pane label="技术需求" name="first">
  37. <el-col :span="24" class="pad">
  38. <el-col :span="24" class="con">
  39. <h2>企业信息</h2>
  40. </el-col>
  41. <el-col :span="24" class="di">
  42. <el-col :span="2">
  43. <span>企业名称:</span>
  44. </el-col>
  45. <el-col :span="20" class="sr">
  46. <el-input v-model="form.company" placeholder="请输入企业名称"></el-input>
  47. </el-col>
  48. </el-col>
  49. <el-col :span="24" class="di">
  50. <el-col :span="2">
  51. <span>注册类型:</span>
  52. </el-col>
  53. <el-col :span="6" class="sr">
  54. <el-input v-model="form.type" placeholder="请输入注册类型"></el-input>
  55. </el-col>
  56. <el-col :span="3" class="lrf">
  57. <span>组织机构代码:</span>
  58. </el-col>
  59. <el-col :span="6">
  60. <el-input v-model="form.zzjgdm" placeholder="请输入组织机构代码"></el-input>
  61. </el-col>
  62. </el-col>
  63. <el-col :span="24" class="di">
  64. <el-col :span="2">
  65. <span>注册时间:</span>
  66. </el-col>
  67. <el-col :span="6" class="sr">
  68. <el-date-picker v-model="form.companydate" type="date" placeholder="请选择时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
  69. </el-date-picker>
  70. </el-col>
  71. <el-col :span="3" class="lrf">
  72. <span>注册资金:</span>
  73. </el-col>
  74. <el-col :span="6">
  75. <el-input v-model="form.companycapit" placeholder="请输入注册资金"></el-input>
  76. </el-col>
  77. </el-col>
  78. <el-col :span="24" class="di">
  79. <el-col :span="2">
  80. <span>企业法人:</span>
  81. </el-col>
  82. <el-col :span="6" class="sr">
  83. <el-input v-model="form.companyperson" placeholder="请输入企业法人"></el-input>
  84. </el-col>
  85. <el-col :span="3" class="lrf">
  86. <span>企业网址:</span>
  87. </el-col>
  88. <el-col :span="6">
  89. <el-input v-model="form.companyweb" placeholder="请输入企业网址"></el-input>
  90. </el-col>
  91. </el-col>
  92. <el-col :span="24" class="di">
  93. <el-col :span="2">
  94. <span>联系人:</span>
  95. </el-col>
  96. <el-col :span="6" class="sr">
  97. <el-input v-model="form.contacts" placeholder="请输入联系人"></el-input>
  98. </el-col>
  99. <el-col :span="3" class="lrf">
  100. <span>联系电话:</span>
  101. </el-col>
  102. <el-col :span="6">
  103. <el-input v-model="form.phone" placeholder="请输入联系电话"></el-input>
  104. </el-col>
  105. </el-col>
  106. <el-col :span="24" class="di">
  107. <el-col :span="2">
  108. <span>QQ&微信</span>
  109. </el-col>
  110. <el-col :span="6" class="sr">
  111. <el-input v-model="form.qqwx" placeholder="请输入QQ&微信"></el-input>
  112. </el-col>
  113. <el-col :span="3" class="lrf">
  114. <span>电子邮箱:</span>
  115. </el-col>
  116. <el-col :span="6">
  117. <el-input v-model="form.email" placeholder="请输入电子邮箱"></el-input>
  118. </el-col>
  119. </el-col>
  120. <el-col :span="24" class="di">
  121. <el-col :span="2">
  122. <span>上年度企业总收入:</span>
  123. </el-col>
  124. <el-col :span="6" class="sr">
  125. <el-input v-model="form.sndqyzsr" placeholder="请输入上年度企业总收入"></el-input>
  126. </el-col>
  127. <el-col :span="3" class="lrf">
  128. <span>上年度研发费用:</span>
  129. </el-col>
  130. <el-col :span="6">
  131. <el-input v-model="form.sndyffy" placeholder="请输入上年度研发费用"></el-input>
  132. </el-col>
  133. </el-col>
  134. <el-col :span="24" class="di">
  135. <el-col :span="2">
  136. <span>企业总人数:</span>
  137. </el-col>
  138. <el-col :span="6" class="sr">
  139. <el-input v-model="form.companytotal" placeholder="请输入企业总人数"></el-input>
  140. </el-col>
  141. <el-col :span="3" class="lrf">
  142. <span>专&兼职研发人数:</span>
  143. </el-col>
  144. <el-col :span="6">
  145. <el-input v-model="form.zjzyfrs" placeholder="请输入专&兼职研发人数"></el-input>
  146. </el-col>
  147. </el-col>
  148. <el-col :span="24" class="dir">
  149. <span>企业简介:</span>
  150. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.companybrief" placeholder="请输入企业简介"></el-input>
  151. </el-col>
  152. <el-col :span="24" class="dir">
  153. <span>主要产品:</span>
  154. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.mainproduct" placeholder="请输入主要产品"></el-input>
  155. </el-col>
  156. <el-col :span="24" class="cc">
  157. <span>企业资质&荣誉:</span>
  158. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.qualifications" placeholder="请输入主要产品"></el-input>
  159. </el-col>
  160. </el-col>
  161. <el-col :span="24" class="pad">
  162. <el-col :span="24" class="ccn">
  163. <h2>技术需求</h2>
  164. </el-col>
  165. <el-col :span="24" class="di">
  166. <el-col :span="4">
  167. <span>技术难题&需求名称:</span>
  168. </el-col>
  169. <el-col :span="19" class="sr">
  170. <el-input v-model="form.name" placeholder="请输入技术难题&需求名称"></el-input>
  171. </el-col>
  172. </el-col>
  173. <el-col :span="24" class="di">
  174. <el-col :span="3">
  175. <span>需求紧急程度:</span>
  176. </el-col>
  177. <el-col :span="6" class="sr">
  178. <el-select v-model="form.degreeurgency">
  179. <el-option label="特急" value="特急"></el-option>
  180. <el-option label="一般" value="一般"></el-option>
  181. <el-option label="储备" value="储备"></el-option>
  182. </el-select>
  183. </el-col>
  184. <el-col :span="3" class="lrf">
  185. <span>所属领域:</span>
  186. </el-col>
  187. <el-col :span="6">
  188. <el-select v-model="form.field">
  189. <el-option v-for="(item, index) in fieldList" :key="index" :value="item.name" :label="item.name"></el-option>
  190. </el-select>
  191. </el-col>
  192. </el-col>
  193. <el-col :span="24" class="di">
  194. <el-col :span="2">
  195. <span>投资预算:</span>
  196. </el-col>
  197. <el-col :span="6" class="sr">
  198. <el-input v-model="form.budget" placeholder="请输入投资预算"></el-input>
  199. </el-col>
  200. <el-col :span="3" class="lrf">
  201. <span> 合作方式:</span>
  202. </el-col>
  203. <el-col :span="6">
  204. <el-select v-model="form.cooperation">
  205. <el-option v-for="(item, index) in cooperationList" :key="index" :value="item.name" :label="item.name"></el-option>
  206. </el-select>
  207. </el-col>
  208. </el-col>
  209. <el-col :span="24">
  210. <span>技术难题&需求说明:</span>
  211. </el-col>
  212. <el-col :span="24" class="dir">
  213. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.requirementdesc" placeholder="请输入技术难题&需求说明"></el-input>
  214. </el-col>
  215. <el-col :span="24" class="dir">
  216. <span>预期技术目标描述:</span>
  217. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.expect" placeholder="请输入预期技术目标描述"></el-input>
  218. </el-col>
  219. <el-col :span="24" class="dir">
  220. <span>需求现状及应对措施:</span>
  221. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.present" placeholder="请输入需求现状及应对措施"></el-input>
  222. </el-col>
  223. <el-col :span="24" class="cc">
  224. <span>合作条件及要求:</span>
  225. <el-input type="textarea" maxlength="300" show-word-limit v-model="form.condition" placeholder="请输入合作条件及要求"></el-input>
  226. </el-col>
  227. </el-col>
  228. </el-tab-pane>
  229. <el-tab-pane label="科技成果" name="second">
  230. <el-col :span="24">
  231. <h2>技术</h2>
  232. </el-col>
  233. </el-tab-pane>
  234. </el-tabs>
  235. <el-col :span="24">
  236. <el-button type="primary" @click="technologyBtn">提交</el-button>
  237. </el-col>
  238. </div>
  239. </el-col>
  240. </div>
  241. </template>
  242. <script>
  243. import { mapState, createNamespacedHelpers } from 'vuex';
  244. const { mapActions: markettype } = createNamespacedHelpers('markettype');
  245. const { mapActions: collectproduct } = createNamespacedHelpers('collectproduct');
  246. export default {
  247. name: 'index',
  248. props: {},
  249. components: {},
  250. data: function() {
  251. return {
  252. types: '',
  253. sta: '',
  254. type: '',
  255. company: '',
  256. form: {},
  257. total: '',
  258. activeName: 'first',
  259. list: [
  260. // {
  261. // company: '1',
  262. // },
  263. // {
  264. // company: '2',
  265. // },
  266. ],
  267. fieldList: [],
  268. cooperationList: [],
  269. achievestatusList: [],
  270. };
  271. },
  272. created() {
  273. this.searchtype();
  274. },
  275. methods: {
  276. ...markettype({ markettypeList: 'query' }),
  277. ...collectproduct(['query', 'fetch', 'create', 'delete']),
  278. async clic({ skip = 0, limit = 10, ...info } = {}) {
  279. if (this.company) {
  280. let res = await this.query({ skip, limit, company: this.company, ...info });
  281. if (this.$checkRes(res)) {
  282. this.$set(this, `list`, res.data);
  283. }
  284. }
  285. },
  286. async delDelete({ data }) {
  287. let res = await this.delete(data.id);
  288. if (this.$checkRes(res)) {
  289. this.$message({
  290. message: '信息删除成功',
  291. type: 'success',
  292. });
  293. this.search();
  294. }
  295. },
  296. async searchtype() {
  297. // 所属领域;
  298. let res = await this.markettypeList({ category: '01' });
  299. if (this.$checkRes(res)) {
  300. this.$set(this, `fieldList`, res.data);
  301. }
  302. // 成果状态;
  303. res = await this.markettypeList({ category: '02' });
  304. if (this.$checkRes(res)) {
  305. this.$set(this, `achievestatusList`, res.data);
  306. }
  307. // 合作方式;
  308. res = await this.markettypeList({ category: '03' });
  309. if (this.$checkRes(res)) {
  310. this.$set(this, `cooperationList`, res.data);
  311. }
  312. },
  313. //提交
  314. async technologyBtn() {
  315. let data = this.form;
  316. if (data.company != null) {
  317. data.noticeid = this.noticeid;
  318. data.type = '0';
  319. data.status = '0';
  320. let res = await this.create(data);
  321. if (this.$checkRes(res)) {
  322. this.$message({
  323. message: '信息添加成功',
  324. type: 'success',
  325. });
  326. this.form = {};
  327. }
  328. } else {
  329. this.$message({
  330. message: '企业名称&需求名称不能为空哦',
  331. type: 'warning',
  332. });
  333. }
  334. },
  335. handleClick(tab, event) {
  336. console.log(tab, event);
  337. },
  338. click() {},
  339. },
  340. computed: {
  341. ...mapState(['user']),
  342. pageTitle() {
  343. return `${this.$route.meta.title}`;
  344. },
  345. },
  346. metaInfo() {
  347. return { title: this.$route.meta.title };
  348. },
  349. };
  350. </script>
  351. <style lang="less" scoped>
  352. .center {
  353. width: 60%;
  354. margin: 0 auto;
  355. }
  356. .ys {
  357. margin: 20px 0 20px 0;
  358. }
  359. .wid {
  360. width: 40%;
  361. margin-left: 300px;
  362. }
  363. .tab {
  364. margin: 20px 0 20px 0;
  365. border: 1px solid black;
  366. }
  367. .con {
  368. text-align: center;
  369. }
  370. .ccn {
  371. text-align: center;
  372. border-top: 1px solid black;
  373. }
  374. .hz {
  375. margin-left: 200px;
  376. }
  377. .lrf {
  378. margin-left: 100px;
  379. }
  380. .di {
  381. border-bottom: 1px dashed #ccc;
  382. margin: 0 0 10px 0;
  383. }
  384. .sr {
  385. margin-bottom: 10px;
  386. }
  387. .dir {
  388. border-bottom: 1px dashed #ccc;
  389. padding: 10px 0;
  390. }
  391. .cc {
  392. margin-bottom: 10px;
  393. }
  394. .pad {
  395. padding: 0 5px 0 5px;
  396. }
  397. </style>