Browse Source

实验室/设备对接口

master
lucky 5 years ago
parent
commit
9a93a3da28
  1. 10
      src/components/Activity/ActivityAdd.vue
  2. 10
      src/components/Activity/ActivityEdit.vue
  3. 10
      src/components/Banner/BannerAdd.vue
  4. 81
      src/components/Banner/BannerEdit.vue
  5. 14
      src/components/CVideo/VideoAdd.vue
  6. 33
      src/components/CVideo/VideoDate.vue
  7. 14
      src/components/CVideo/VideoEdit.vue
  8. 18
      src/components/Challenge/ChallengeAdd.vue
  9. 18
      src/components/Challenge/ChallengeEdit.vue
  10. 14
      src/components/Course/CourseAdd.vue
  11. 9
      src/components/Course/CourseDate.vue
  12. 14
      src/components/Course/CourseEdit.vue
  13. 169
      src/components/Development/Detail.vue
  14. 14
      src/components/Development/DevelopmentAdd.vue
  15. 159
      src/components/Development/DevelopmentDate.vue
  16. 14
      src/components/Development/DevelopmentEdit.vue
  17. 36
      src/components/Development/DevelopmentSearch.vue
  18. 10
      src/components/EntityApply/EntityApplyAdd.vue
  19. 10
      src/components/IndustryInfo/ActivityAdd.vue
  20. 10
      src/components/IndustryInfo/ActivityEdit.vue
  21. 235
      src/components/Institute/InstituteAdd.vue
  22. 110
      src/components/Institute/InstituteDate.vue
  23. 244
      src/components/Institute/InstituteEdit.vue
  24. 16
      src/components/Institute/InstituteSearch.vue
  25. 10
      src/components/Manage/ManageAdd.vue
  26. 10
      src/components/Manage/ManageEdit.vue
  27. 14
      src/components/Mentor/MentorAdd.vue
  28. 9
      src/components/Mentor/MentorDate.vue
  29. 14
      src/components/Mentor/MentorEdit.vue
  30. 10
      src/components/Page/PageAdd.vue
  31. 10
      src/components/Page/PageEdit.vue
  32. 2
      src/components/Partner/PartnerAdd.vue
  33. 2
      src/components/Partner/PartnerEdit.vue
  34. 10
      src/components/Policy/PolicyAdd.vue
  35. 10
      src/components/Policy/PolicyEdit.vue
  36. 18
      src/components/RD/RDAdd.vue
  37. 16
      src/components/RD/RDEdit.vue
  38. 14
      src/components/SpinOff/SpinOffAdd.vue
  39. 9
      src/components/SpinOff/SpinOffDate.vue
  40. 14
      src/components/SpinOff/SpinOffEdit.vue
  41. 276
      src/components/Transfer/TransferAdd.vue
  42. 221
      src/components/Transfer/TransferDate.vue
  43. 305
      src/components/Transfer/TransferEdit.vue
  44. 37
      src/components/Transfer/TransferSearch.vue
  45. 14
      src/components/innovativeService/innovativeServiceAdd.vue
  46. 9
      src/components/innovativeService/innovativeServiceDate.vue
  47. 14
      src/components/innovativeService/innovativeServiceEdit.vue
  48. 24
      src/config/api.js
  49. 62
      src/views/InnovativeAchievements/InnovativeAchievements.vue
  50. 51
      src/views/InnovativeEquipment/InnovativeEquipment.vue
  51. 5
      src/views/InnovativeLab/InnovativeLab.vue

10
src/components/Activity/ActivityAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加活动公告" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加活动公告"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题 -->
<a-form-item

10
src/components/Activity/ActivityEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改活动公告" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改活动公告"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 标题 -->
<a-form-item

10
src/components/Banner/BannerAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加轮播图" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加轮播图"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 跳转类型 -->
<a-form-item

81
src/components/Banner/BannerEdit.vue

@ -1,7 +1,16 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改轮播图" v-model="editVisible" width="700px" @cancel="$emit('closeModal')">
<a-modal
:closable="false"
:maskClosable="false"
@cancel="$emit('closeModal')"
destroyOnClose
footer
title="修改轮播图"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editItem">
<!-- 页面路径 -->
<!-- <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="页面路径">
@ -18,38 +27,82 @@
},
]"
/>
</a-form-item> -->
</a-form-item>-->
<!-- 跳转类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="跳转类型">
<a-select @change="getUse($event, 'jumpType')" class="ml-3" :default-value="enable1[editItem.jumpType]" style="width: 150px">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="跳转类型"
>
<a-select
:default-value="enable1[editItem.jumpType]"
@change="getUse($event, 'jumpType')"
class="ml-3"
style="width: 150px"
>
<a-select-option :key="item" :value="index" v-for="(item, index) in enable1">{{ item }}</a-select-option>
</a-select>
</a-form-item>
<!-- 跳转路径 -->
<a-form-item
v-if="editItem.jumpType === 1"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片跳转路径"
v-if="editItem.jumpType === 1"
>
<a-input v-model="editItem.jumpUrl" placeholder="图片跳转路径" class="ml-3" />
<a-input class="ml-3" placeholder="图片跳转路径" v-model="editItem.jumpUrl" />
</a-form-item>
<!-- 状态 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="状态">
<a-select @change="getUse($event, 'recStatus')" class="ml-3" :default-value="enable[editItem.recStatus]" style="width: 150px">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="状态"
>
<a-select
:default-value="enable[editItem.recStatus]"
@change="getUse($event, 'recStatus')"
class="ml-3"
style="width: 150px"
>
<a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option>
</a-select>
</a-form-item>
<!-- 页面显示位置 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="页面显示位置">
<a-select @change="getUse($event, 'showPage')" class="ml-3" :default-value="editItem.showPage" style="width: 100%">
<a-select-option :key="item.page" :value="item.page" v-for="item in enable2">{{ item.name }}</a-select-option>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="页面显示位置"
>
<a-select
:default-value="editItem.showPage"
@change="getUse($event, 'showPage')"
class="ml-3"
style="width: 100%"
>
<a-select-option
:key="item.page"
:value="item.page"
v-for="item in enable2"
>{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 图片 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片">
<a-upload :before-upload="beforeUpload" class="ml-3" :action="upload" list-type="picture" name="files" @change="handleChange">
<a-button v-show="fileList.length - 0 === 0"> <a-icon type="upload" /> 选择图片 </a-button>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片"
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
class="ml-3"
list-type="picture"
name="files"
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">

14
src/components/CVideo/VideoAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加课程" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加课程"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 课程 -->
<a-form-item
@ -128,7 +136,7 @@ function getBase64(img, callback) {
}
export default {
name: "VideoAdd",
name: 'VideoAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -137,7 +145,7 @@ export default {
form: this.$form.createForm(this, { name: 'video-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

33
src/components/CVideo/VideoDate.vue

@ -16,7 +16,14 @@
<!-- 封面 -->
<template slot="cover" slot-scope="text, record">
<img :src="record.cover" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
@ -47,7 +54,7 @@
</template>
<script>
import VideoEdit from "components/CVideo/VideoEdit.vue";
import VideoEdit from 'components/CVideo/VideoEdit.vue';
const columns = [
{
@ -117,27 +124,27 @@ const columns = [
const lists = [
{
id:'001',
course:'传控科技',
id: '001',
course: '传控科技',
videoName: '传控科技宣传片',
cover:'assets/logo.png',
cover: 'assets/logo.png',
setNumber: 5,
speaker: '张三',
auditStatus: '通过',
},
{
id:'002',
course:'中绿环保',
id: '002',
course: '中绿环保',
videoName: '传控科技宣传片',
cover:'assets/logo.png',
cover: 'assets/logo.png',
setNumber: 6,
speaker: '张三',
auditStatus: '未通过',
}
},
];
export default {
name: "VideoDate",
name: 'VideoDate',
components: {
VideoEdit,
},
@ -150,7 +157,7 @@ export default {
height: '',
editVisible: false,
imgVisible: false,
}
};
},
mounted() {
@ -158,11 +165,11 @@ export default {
},
methods: {
showEditModal(){
showEditModal() {
this.editVisible = true;
},
closeModal(){
closeModal() {
this.editVisible = false;
},

14
src/components/CVideo/VideoEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改课程" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改课程"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 课程 -->
<a-form-item
@ -128,7 +136,7 @@ function getBase64(img, callback) {
}
export default {
name: "VideoEdit",
name: 'VideoEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -137,7 +145,7 @@ export default {
form: this.$form.createForm(this, { name: 'video-edit' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

18
src/components/Challenge/ChallengeAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加创新挑战" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加创新挑战"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 来源 -->
<a-form-item
@ -99,7 +107,7 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ChallengeAdd",
name: 'ChallengeAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -108,13 +116,13 @@ export default {
form: this.$form.createForm(this, { name: 'challenge-add' }),
source: 1,
releaseTime: '', //
}
};
},
methods: {
//
getSource(value){
this.source = value
getSource(value) {
this.source = value;
},
//

18
src/components/Challenge/ChallengeEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改创新挑战" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改创新挑战"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 来源 -->
<a-form-item
@ -99,7 +107,7 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ChallengeEdit",
name: 'ChallengeEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -108,13 +116,13 @@ export default {
form: this.$form.createForm(this, { name: 'challeng-edit' }),
source: 1,
releaseTime: '', //
}
};
},
methods: {
//
getSource(value){
this.source = value
getSource(value) {
this.source = value;
},
//

14
src/components/Course/CourseAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加课程" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加课程"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 课程名称 -->
<a-form-item
@ -81,7 +89,7 @@ function getBase64(img, callback) {
}
export default {
name: "CourseAdd",
name: 'CourseAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -90,7 +98,7 @@ export default {
form: this.$form.createForm(this, { name: 'course-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

9
src/components/Course/CourseDate.vue

@ -16,7 +16,14 @@
<!-- 头像 -->
<template slot="introductionPicture" slot-scope="text, record">
<img :src="record.introductionPicture" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>

14
src/components/Course/CourseEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改课程" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改课程"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 课程名称 -->
<a-form-item
@ -81,7 +89,7 @@ function getBase64(img, callback) {
}
export default {
name: "CourseEdit",
name: 'CourseEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -90,7 +98,7 @@ export default {
form: this.$form.createForm(this, { name: 'course-edit' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

169
src/components/Development/Detail.vue

@ -0,0 +1,169 @@
<template>
<div class="d-flex flex-column">
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">申请人</span>
{{ record.info.applicant }}
</div>
<div class="flex-1">
<span class="font-bold-14">已转让企业数</span>
{{ record.info.assignment }}
</div>
<div class="flex-1">
<span class="font-bold-14">学科分类</span>
{{ record.info.classification }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">所属领域1</span>
{{ record.info.domainone }}
</div>
<div class="flex-1">
<span class="font-bold-14">所属领域2</span>
{{ record.info.domaintwo }}
</div>
<div class="flex-1">
<span class="font-bold-14">知识产权</span>
{{ record.info.finance }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">转让收入</span>
{{ record.info.money }}万元
</div>
<div class="flex-1">
<span class="font-bold-14">分类类型</span>
<span :key="a" v-for="(type,a) in record.info.names">
{{ type }}
<span v-if="a < record.info.names.length-1">/</span>
</span>
</div>
<div class="flex-1">
<span class="font-bold-14">成果水平</span>
{{ record.info.keywordthree }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">关键词1</span>
{{ record.info.keywordone }}
</div>
<div class="flex-1">
<span class="font-bold-14">关键词2</span>
{{ record.info.keywordtwo }}
</div>
<div class="flex-1">
<span class="font-bold-14">关键词3</span>
{{ record.info.keywordthree }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">转让形式</span>
{{ record.info.keywordthree }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利数</span>
{{ record.info.keywordthree }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利情况</span>
{{ record.info.patent }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">成果表现形式</span>
{{ record.info.performance }}
</div>
<div class="flex-1">
<span class="font-bold-14">成果范围</span>
{{ record.info.ranges }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利名称</span>
{{ record.info.registerName }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">未应用原因1</span>
{{ record.info.reansonone }}
</div>
<div class="flex-1">
<span class="font-bold-14">未应用原因2</span>
{{ record.info.reansontwo }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利号</span>
{{ record.info.registerNum }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">实验室名字</span>
{{ record.info.research }}
</div>
<div class="flex-1">
<span class="font-bold-14">研究形式</span>
{{ record.info.shape }}
</div>
<div class="flex-1">
<span class="font-bold-14">应用状态</span>
{{ record.info.situation }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">成果阶段</span>
{{ record.info.stage }}
</div>
<div class="flex-1">
<span class="font-bold-14">成果标准</span>
{{ record.info.standard }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利类型</span>
{{ record.info.style }}
</div>
</div>
<div class="flex-1 mb-3">
<span class="font-bold-14">发明人</span>
{{ record.info.inventor }}
</div>
<div class="d-flex flex-column mb-3">
<span class="font-bold-14">简介</span>
<span v-dompurify-html="record.info.content" v-if="record.info.content"></span>
</div>
</div>
</template>
<script>
export default {
name: 'Detail',
props: {
record: { type: Object, default: () => {} },
},
data() {
return {};
},
methods: {},
};
</script>
<style lang="stylus" scoped></style>

14
src/components/Development/DevelopmentAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加研发团队"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 名录 -->
<a-form-item
@ -68,7 +76,7 @@ function getBase64(img, callback) {
}
export default {
name: "DevelopmentAdd",
name: 'DevelopmentAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -77,7 +85,7 @@ export default {
form: this.$form.createForm(this, { name: 'development-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

159
src/components/Development/DevelopmentDate.vue

@ -1,50 +1,80 @@
<template>
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" height="50" width="50" />
</template>
<!-- 说明图片 -->
<template slot="introductionPicture" slot-scope="text, record">
<img :src="record.introductionPicture" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<development-edit :editVisible="editVisible" @closeModal="closeModal" />
<a-spin :spinning="showEdit">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
@change="handleTableChange"
@expand="getDetail"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" height="50" width="50" />
</template>
<!-- 说明图片 -->
<template slot="introductionPicture" slot-scope="text, record">
<img :src="record.introductionPicture" class="img" />
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm
@confirm="() => onDelete(record.id)"
title="确定要删除这一条?"
v-if="lists.length"
>
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<a-spin :spinning="spinning" tip="详情加载中...">
<div v-if="record.info">
<detail :record="record" />
</div>
</a-spin>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<development-edit
:editItem="editItem"
:editVisible="editVisible"
:typeLists="typeLists"
@closeModal="closeModal"
/>
</a-spin>
</div>
</template>
<script>
import DevelopmentEdit from 'components/Development/DevelopmentEdit.vue';
import { selResDelete } from 'config/api';
import Detail from './Detail.vue';
import { selResDelete, selResMesH } from 'config/api';
const columns = [
{
@ -87,9 +117,14 @@ export default {
name: 'DevelopmentDate',
components: {
DevelopmentEdit,
Detail,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
props: {
lists: { type: Array, default: () => [] },
pagination: { type: Object, default: () => {} },
typeLists: { type: Array, default: () => [] },
},
data() {
return {
@ -98,6 +133,9 @@ export default {
height: '',
editVisible: false,
imgVisible: false,
spinning: false,
editItem: null, //
showEdit: false,
};
},
@ -114,11 +152,44 @@ export default {
},
methods: {
showEditModal() {
async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editVisible = true;
this.editItem = record;
},
async closeModal() {
this.editVisible = false;
await this.$emit('selResSearch');
},
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('selResSearch', condition);
},
async closeModal() {},
//
async getDetail(expanded, record) {
if (!expanded) return;
try {
this.spinning = true;
const params = { param: { id: record.id } };
const res = await selResMesH(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.id === record.id);
item.info = data;
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '查询失败');
}
},
//
async onDelete(id) {
@ -130,8 +201,6 @@ export default {
if (code === 200) {
this.$message.success('删除成功');
this.$emit('selResSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
} else {
throw msg;
}

14
src/components/Development/DevelopmentEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改研发团队"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 名录 -->
<a-form-item
@ -68,7 +76,7 @@ function getBase64(img, callback) {
}
export default {
name: "DevelopmentEdit",
name: 'DevelopmentEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -77,7 +85,7 @@ export default {
form: this.$form.createForm(this, { name: 'development-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

36
src/components/Development/DevelopmentSearch.vue

@ -2,12 +2,10 @@
<div class="d-flex flex-wrap pb-3">
<!-- 中文名称 -->
<div>
<a-input
@change="handleChangeDirectory"
placeholder="内容"
style="width: 150px"
v-model="directory"
/>
<a-input placeholder="搜索内容" style="width: 150px" v-model="content" />
<a-checkbox-group @change="onChange" class="ml-3">
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
@ -16,7 +14,12 @@
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<development-add :visible="visible" @closeModal="closeModal" />
<development-add
:typeLists="typeLists"
:visible="visible"
@closeModal="closeModal"
@handleTableChange="handleTableChange"
/>
</div>
</template>
@ -28,10 +31,12 @@ export default {
components: {
DevelopmentAdd,
},
props: { typeLists: { type: Array, default: () => [] } },
data() {
return {
visible: false,
directory: '',
content: '',
modelIds: [],
};
},
methods: {
@ -43,13 +48,18 @@ export default {
this.visible = false;
},
handleChangeDirectory(value) {
console.log('value: ', value);
this.directory = value;
onChange(checkedValues) {
this.modelIds = checkedValues;
},
handleTableChange() {
console.log('搜索');
async handleTableChange() {
const { content, modelIds } = this;
//
const condition = {
content,
modelIds,
};
await this.$emit('selResSearch', condition);
},
},
};

10
src/components/EntityApply/EntityApplyAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="入驻申请添加" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="入驻申请添加"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题 -->
<a-form-item

10
src/components/IndustryInfo/ActivityAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加行业资讯" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加行业资讯"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题 -->
<a-form-item

10
src/components/IndustryInfo/ActivityEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改行业资讯" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改行业资讯"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题 -->
<a-form-item

235
src/components/Institute/InstituteAdd.vue

@ -1,124 +1,141 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加实验室"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 中文名称 -->
<!-- 名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="中文名称"
label="名称"
>
<a-input
placeholder="中文名称"
placeholder="名称"
v-decorator="[
'chineseName',
'name',
{
rules: [
{ required: true, message: '团队名称不能为空' },
{ whitespace: true, message: '团队名称不能为空' },
{ max: 140, massage: '团队名称最多140个字符' },
{ required: true, message: '名称不能为空' },
{ whitespace: true, message: '名称不能为空' },
{ max: 140, massage: '名称最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- 英文名称 -->
<!-- 可做实验 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="英文名称"
label="可做实验"
>
<a-input
placeholder="英文名称"
placeholder="可做实验"
v-decorator="[
'englishName',
{
rules: [
{ required: true, message: '英文名称不能为空' },
{ whitespace: true, message: '英文名称不能为空' },
{ max: 140, massage: '英文名称最多140个字符' },
],
},
'experiments',
]"
/>
</a-form-item>
<!-- 主要性能指标及功能用途 -->
<!-- 研究院类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主要性能指标及功能用途"
label="研究院类型"
>
<a-input
placeholder="主要性能指标及功能用途"
<a-checkbox-group
@change="onChange"
v-decorator="[
'performance',
'moldIds',
{
rules: [
{ required: true, message: '主要性能指标及功能用途不能为空' },
{ whitespace: true, message: '主要性能指标及功能用途不能为空' },
{ max: 140, massage: '主要性能指标及功能用途最多140个字符' },
{ required: true, message: '研究院类型不能为空' },
],
},
]"
>
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 项目分类 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="项目分类"
>
<a-input
placeholder="项目分类"
v-decorator="[
'projectKind',
]"
/>
</a-form-item>
<!-- 说明图片 -->
<!-- 图片 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="说明图片"
label="图片"
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
:show-upload-list="false"
@change="handleChange"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
class="avatar-uploader"
list-type="picture-card"
name="avatar"
list-type="picture"
name="files"
v-decorator="[
'picId',
{
rules: [
{ required: true, message: '图片不能为空' },
],
},
]"
>
<img :src="imageUrl" alt="avatar" v-if="imageUrl" />
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 设备所属 -->
<!-- 校验 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
label="校验"
>
<a-input
placeholder="设备所属"
placeholder="校验"
v-decorator="[
'equipmentOwnership',
'vertify'
]"
/>
</a-form-item>
<!-- 分类 -->
<!-- 研究方向 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="分类"
label="研究方向"
>
<a-select class="ml-3" placeholder="分类" style="width: 200px">
<a-select-option
:key="index"
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
</a-select>
<quill-editor
:max-size="directionMaxSize"
:placeholder="directionPlaceholder"
@changeInput="changeDirection"
/>
</a-form-item>
<!-- 备注 -->
<!-- 简介 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="备注"
label="简介"
required
>
<a-textarea placeholder="备注" v-decorator="['remark']" />
<quill-editor :max-size="maxSize" :placeholder="placeholder" @changeInput="changeInput" />
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -131,56 +148,67 @@
</template>
<script>
import { upload, addInstitute } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 8 },
wrapperCol: { span: 14 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.readAsDataURL(img);
}
export default {
name: "SharingAdd",
props: { visible: { type: Boolean, default: false } },
name: 'InstituteAdd',
components: { QuillEditor },
props: { visible: { type: Boolean, default: false }, typeLists: { type: Array, default: () => [] } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'sharing-add' }),
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}],
loading: false,
imageUrl: ''
}
form: this.$form.createForm(this, { name: 'institute-add' }),
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
moldIds: [], //
maxSize: 2048,
description: '',
placeholder: '请输入...',
directionMaxSize: 500,
direction: '',
directionPlaceholder: '请输入...',
};
},
methods: {
//
handleChange(info) {
if (info.file.status === 'uploading') {
this.loading = true;
return;
}
if (info.file.status === 'done') {
// Get this url from response in real world.
getBase64(info.file.originFileObj, imageUrl => {
this.imageUrl = imageUrl;
this.loading = false;
});
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
beforeUpload(file) {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('You can only upload JPG file!');
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error('Image must smaller than 2MB!');
}
return isJpgOrPng && isLt2M;
//
changeInput(value) {
this.description = value;
},
//
changeDirection(value) {
this.direction = value;
},
//
onChange(checkedValues) {
this.moldIds = checkedValues;
},
//
@ -189,20 +217,29 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
// const params = this.generateParams(values);
// const res = await createTask(params);
// const { data, msg, code } = res.data;
// //
// this.clearCreateTask();
// this.$emit('closeDialog');
// if (code === 200) {
// this.handleCreateSuccess(params.executorId);
// } else {
// throw msg;
// }
const { moldIds, fileList, description, direction } = this;
if (description === '') {
this.$message.error('请填写简介');
return;
}
const params = { param: values };
params.param.moldIds = moldIds;
params.param.picId = fileList[0];
params.param.direction = direction;
params.param.description = description;
const res = await addInstitute(params);
const { data, msg, code } = res.data;
//
if (code === 200) {
this.$message.success('添加成功');
this.$emit('handleTableChange');
} else {
throw msg;
}
this.$emit('closeModal');
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$emit('closeModal');
this.$message.error(error || '添加实验室失败');
}
}
});

110
src/components/Institute/InstituteDate.vue

@ -5,6 +5,7 @@
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
@change="handleTableChange"
@ -18,16 +19,18 @@
<!-- 说明图片 -->
<template slot="researchDirection" slot-scope="text, record">
<img :src="record.researchDirection" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
<!-- 分类管理 -->
<!-- <template slot="categoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button>
</template>-->
<!-- 研究院类型 -->
<template slot="serviceType" slot-scope="text, record">
<span v-if=" record.serviceType === 1">创新平台</span>
@ -36,39 +39,38 @@
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<!-- <div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>研究方向
<span v-dompurify-html="record.direction"></span></div>
</div>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>简介
<span v-dompurify-html="record.description"></span></div>
</div>-->
<div
class="d-flex flex-nowrap justify-space-between"
class="d-flex flex-column"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div class="ml-3">
分类
<div class="mb-3">
<span class="font-bold-14">研究方向</span>
<span v-dompurify-html="record.direction"></span>
</div>
<div class="ml-3">备注{{ record.description }}</div>
<div>
<span class="font-bold-14">简介</span>
<span v-dompurify-html="record.description" v-if="record.description"></span>
</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<institute-edit :editVisible="editVisible" @closeModal="closeModal" />
<institute-edit
:editItem="editItem"
:editVisible="editVisible"
:typeLists="typeLists"
@closeModal="closeModal"
/>
</div>
</template>
@ -86,7 +88,7 @@ const columns = [
scopedSlots: { customRender: 'id' },
},
{
title: '名',
title: '名',
align: 'center',
dataIndex: 'name',
key: 'name',
@ -97,18 +99,6 @@ const columns = [
dataIndex: 'phone',
key: 'phone',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'description',
// key: 'description',
// },
// {
// title: '',
// align: 'center',
// dataIndex: 'direction',
// key: 'direction',
// },
{
title: '可做实验',
align: 'center',
@ -130,8 +120,8 @@ const columns = [
{
title: '研究院类型',
align: 'center',
dataIndex: 'type',
key: 'type',
dataIndex: 'mold',
key: 'mold',
},
{
title: '校验',
@ -148,36 +138,17 @@ const columns = [
},
];
// const lists = [
// {
// id:'001',
// chineseName:'',
// englishName: 'zhou',
// performance:'',
// researchDirection:'assets/logo.png',
// equipmentOwnership: '',
// category:'A',
// remark: ''
// },
// {
// id:'002',
// chineseName:'绿',
// englishName: 'lili',
// performance:'绿',
// researchDirection:'assets/logo.png',
// equipmentOwnership:'',
// category:'B',
// remark: ''
// }
// ];
export default {
name: 'InstituteDate',
components: {
InstituteEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
props: {
lists: { type: Array, default: () => [] },
pagination: { type: Object, default: () => {} },
typeLists: { type: Array, default: () => [] },
},
data() {
return {
@ -187,6 +158,7 @@ export default {
height: '',
editVisible: false,
imgVisible: false,
editItem: null, //
};
},
@ -203,8 +175,9 @@ export default {
},
methods: {
showEditModal() {
showEditModal(record) {
this.editVisible = true;
this.editItem = record;
},
async closeModal() {
@ -212,18 +185,6 @@ export default {
await this.$emit('getInstituteSearchBack');
},
//
openTeamMember() {
const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query });
},
//
openCategoryManage() {
const { query } = this.$route;
this.$router.push({ path: '/category-manage', query });
},
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
@ -239,9 +200,6 @@ export default {
if (code === 200) {
this.$message.success('删除成功');
this.$emit('getInstituteSearchBack');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== id);
// TODO:
} else {
throw msg;
}

244
src/components/Institute/InstituteEdit.vue

@ -1,124 +1,145 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-form :form="form" @submit="handleSubmit">
<!-- 中文名称 -->
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改实验室"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="中文名称"
label="名称"
>
<a-input
placeholder="中文名称"
placeholder="名称"
v-decorator="[
'chineseName',
'name',
{
initialValue: editItem.name,
rules: [
{ required: true, message: '团队名称不能为空' },
{ whitespace: true, message: '团队名称不能为空' },
{ max: 140, massage: '团队名称最多140个字符' },
{ required: true, message: '名称不能为空' },
{ whitespace: true, message: '名称不能为空' },
{ max: 140, massage: '名称最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- 英文名称 -->
<!-- 可做实验 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="英文名称"
label="可做实验"
>
<a-input
placeholder="英文名称"
placeholder="可做实验"
v-decorator="[
'englishName',
{
rules: [
{ required: true, message: '英文名称不能为空' },
{ whitespace: true, message: '英文名称不能为空' },
{ max: 140, massage: '英文名称最多140个字符' },
],
},
'experiments',
{initialValue: editItem.experiments,}
]"
/>
</a-form-item>
<!-- 主要性能指标及功能用途 -->
<!-- 研究院类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主要性能指标及功能用途"
label="研究院类型"
>
<a-input
placeholder="主要性能指标及功能用途"
<a-checkbox-group
@change="onChange"
v-decorator="[
'performance',
'moldIds',
{
initialValue: editItem.moldIds,
rules: [
{ required: true, message: '主要性能指标及功能用途不能为空' },
{ whitespace: true, message: '主要性能指标及功能用途不能为空' },
{ max: 140, massage: '主要性能指标及功能用途最多140个字符' },
{ required: true, message: '研究院类型不能为空' },
],
},
]"
>
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 项目分类 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="项目分类"
>
<a-input
placeholder="项目分类"
v-decorator="[
'projectKind',
{initialValue: editItem.projectKind}
]"
/>
</a-form-item>
<!-- 说明图片 -->
<!-- 图片 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="说明图片"
label="图片"
required
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
:show-upload-list="false"
@change="handleChange"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
class="avatar-uploader"
list-type="picture-card"
name="avatar"
list-type="picture"
name="files"
>
<img :src="imageUrl" alt="avatar" v-if="imageUrl" />
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 设备所属 -->
<!-- 校验 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
label="校验"
>
<a-input
placeholder="设备所属"
placeholder="校验"
v-decorator="[
'equipmentOwnership',
'vertify',
{initialValue: editItem.vertify}
]"
/>
</a-form-item>
<!-- 分类 -->
<!-- 研究方向 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="分类"
label="研究方向"
>
<a-select class="ml-3" placeholder="分类" style="width: 200px">
<a-select-option
:key="index"
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
</a-select>
<quill-editor
:max-size="directionMaxSize"
:placeholder="directionPlaceholder"
:value="(editItem && editItem.direction) ? editItem.direction : ''"
@changeInput="changeDirection"
/>
</a-form-item>
<!-- 备注 -->
<!-- 简介 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="备注"
label="简介"
required
>
<a-textarea placeholder="备注" v-decorator="['remark']" />
<quill-editor
:max-size="maxSize"
:placeholder="placeholder"
:value="(editItem && editItem.description) ? editItem.description : ''"
@changeInput="changeInput"
/>
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -131,56 +152,71 @@
</template>
<script>
import { upload, addInstitute } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 8 },
wrapperCol: { span: 14 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.readAsDataURL(img);
}
export default {
name: "SharingEdit",
props: { editVisible: { type: Boolean, default: false } },
name: 'InstituteEdit',
components: { QuillEditor },
props: {
editVisible: { type: Boolean, default: false },
typeLists: { type: Array, default: () => [] },
editItem: { type: Object, default: () => {} },
},
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'sharing-add' }),
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}],
loading: false,
imageUrl: '',
}
form: this.$form.createForm(this, { name: 'institute-add' }),
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
moldIds: [], //
maxSize: 2048,
description: '',
placeholder: '请输入...',
directionMaxSize: 500,
direction: '',
directionPlaceholder: '请输入...',
};
},
methods: {
//
handleChange(info) {
if (info.file.status === 'uploading') {
this.loading = true;
return;
}
if (info.file.status === 'done') {
// Get this url from response in real world.
getBase64(info.file.originFileObj, imageUrl => {
this.imageUrl = imageUrl;
this.loading = false;
});
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
beforeUpload(file) {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('You can only upload JPG file!');
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error('Image must smaller than 2MB!');
}
return isJpgOrPng && isLt2M;
//
changeInput(value) {
this.description = value;
},
//
changeDirection(value) {
this.direction = value;
},
//
onChange(checkedValues) {
this.moldIds = checkedValues;
},
//
@ -189,20 +225,28 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
// const params = this.generateParams(values);
// const res = await createTask(params);
// const { data, msg, code } = res.data;
// //
// this.clearCreateTask();
// this.$emit('closeDialog');
// if (code === 200) {
// this.handleCreateSuccess(params.executorId);
// } else {
// throw msg;
// }
const { moldIds, fileList, direction, description, editItem } = this;
const params = { param: values };
params.param.id = editItem.id;
params.param.moldIds = moldIds || editItem.moldIds;
params.param.picId = fileList[0] || editItem.picId;
params.param.direction = direction || editItem.direction;
params.param.description = description || editItem.description;
const res = await addInstitute(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('修改成功');
this.$emit('closeModal');
this.fileList = [];
this.direction = '';
this.description = '';
this.moldIds = [];
} else {
throw msg;
this.$message.error('修改失败');
}
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$message.error(error || '修改失败');
}
}
});

16
src/components/Institute/InstituteSearch.vue

@ -1,8 +1,8 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 中文名称 -->
<!-- 名称 -->
<div>
<a-input placeholder="名" style="width: 150px" v-model="name" />
<a-input placeholder="名" style="width: 150px" v-model="name" />
<a-checkbox-group @change="onChange" class="ml-3">
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
@ -14,7 +14,12 @@
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<institute-add :visible="visible" @closeModal="closeModal" />
<institute-add
:typeLists="typeLists"
:visible="visible"
@closeModal="closeModal"
@handleTableChange="handleTableChange"
/>
</div>
</template>
@ -35,9 +40,6 @@ export default {
};
},
created() {
console.log(this.typeLists);
},
methods: {
showModal() {
this.visible = true;
@ -53,11 +55,11 @@ export default {
},
async handleTableChange() {
console.log('搜索');
const { name, moldIds } = this;
//
const condition = {
name,
moldIds,
};
await this.$emit('getInstituteSearchBack', condition);
},

10
src/components/Manage/ManageAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加分类管理" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加分类管理"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 类型 -->
<a-form-item

10
src/components/Manage/ManageEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改分类管理" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改分类管理"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 类型 -->
<a-form-item

14
src/components/Mentor/MentorAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加创业导师" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加创业导师"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 导师名称 -->
<a-form-item
@ -81,7 +89,7 @@ function getBase64(img, callback) {
}
export default {
name: "MentorAdd",
name: 'MentorAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -90,7 +98,7 @@ export default {
form: this.$form.createForm(this, { name: 'mentor-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

9
src/components/Mentor/MentorDate.vue

@ -16,7 +16,14 @@
<!-- 头像 -->
<template slot="headPortrait" slot-scope="text, record">
<img :src="record.headPortrait" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>

14
src/components/Mentor/MentorEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改创业导师" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改创业导师"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 导师名称 -->
<a-form-item
@ -81,7 +89,7 @@ function getBase64(img, callback) {
}
export default {
name: "MentorEdit",
name: 'MentorEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -90,7 +98,7 @@ export default {
form: this.$form.createForm(this, { name: 'mentor-edit' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

10
src/components/Page/PageAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加页面" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加页面"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题code -->
<a-form-item

10
src/components/Page/PageEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改页面" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改页面"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题code -->
<a-form-item

2
src/components/Partner/PartnerAdd.vue

@ -3,7 +3,9 @@
<!-- 添加 -->
<a-modal
:closable="false"
:maskClosable="false"
:title="`添加${partnerOptions.type === 1 ? '合作伙伴' : '衍生企业'} `"
destroyOnClose
footer
v-model="visible"
width="700px"

2
src/components/Partner/PartnerEdit.vue

@ -3,7 +3,9 @@
<!-- 编辑 -->
<a-modal
:closable="false"
:maskClosable="false"
:title="`修改${partnerOptions.type === 1 ? '合作伙伴' : '衍生企业'} `"
destroyOnClose
footer
v-model="editVisible"
width="700px"

10
src/components/Policy/PolicyAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加创新政策" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加创新政策"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 标题 -->
<a-form-item

10
src/components/Policy/PolicyEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改创新政策" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改创新政策"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 标题 -->
<a-form-item

18
src/components/RD/RDAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加研发团队"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 团队名称 -->
<a-form-item
@ -107,7 +115,7 @@
</template>
<script>
import { addTeam } from 'config/api'
import { addTeam } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
@ -115,14 +123,14 @@ const formItemLayout = {
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "RDAdd",
name: 'RDAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }),
}
};
},
methods: {
@ -137,7 +145,7 @@ export default {
const { data, msg, code } = res.data;
this.$emit('closeModal');
if (code === 200) {
this.$message.success('添加成功')
this.$message.success('添加成功');
// TODO:
} else {
throw msg;

16
src/components/RD/RDEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改研发团队"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 团队名称 -->
<a-form-item
@ -123,14 +131,14 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "RDEdit",
props: { editVisible: { type: Boolean, default: false },editItem: { type: Object, default: null } },
name: 'RDEdit',
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: null } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }),
}
};
},
methods: {

14
src/components/SpinOff/SpinOffAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加衍生企业" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加衍生企业"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- logo -->
<a-form-item
@ -97,7 +105,7 @@ function getBase64(img, callback) {
}
export default {
name: "SpinOffAdd",
name: 'SpinOffAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
@ -106,7 +114,7 @@ export default {
form: this.$form.createForm(this, { name: 'r-d-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

9
src/components/SpinOff/SpinOffDate.vue

@ -43,7 +43,14 @@
<!-- 说明图片 -->
<template slot="logo" slot-scope="text, record">
<img :src="record.logo" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<a-modal
:imgVisible="imgVisible"
:maskClosable="false"
@cancel="imgVisible = false"
destroyOnClose
footer
title="身份证明"
>
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>

14
src/components/SpinOff/SpinOffEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改衍生企业" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改衍生企业"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- logo -->
<a-form-item
@ -97,7 +105,7 @@ function getBase64(img, callback) {
}
export default {
name: "SpinOffEdit",
name: 'SpinOffEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
@ -106,7 +114,7 @@ export default {
form: this.$form.createForm(this, { name: 'r-d-add' }),
loading: false,
imageUrl: '',
}
};
},
methods: {

276
src/components/Transfer/TransferAdd.vue

@ -1,122 +1,232 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加仪器"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 中文名称 -->
<!-- 仪器中文名 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="中文名称"
label="仪器中文名"
>
<a-input
placeholder="中文名"
placeholder="仪器中文名"
v-decorator="[
'chineseName',
'name',
{
rules: [
{ required: true, message: '团队名称不能为空' },
{ whitespace: true, message: '团队名称不能为空' },
{ max: 140, massage: '团队名称最多140个字符' },
{ required: true, message: '仪器中文名不能为空' },
{ whitespace: true, message: '仪器中文名不能为空' },
{ max: 140, massage: '仪器中文名最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- 英文名 -->
<!-- 仪器英文名 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="英文名"
label="仪器英文名"
>
<a-input
placeholder="英文名"
placeholder="仪器英文名"
v-decorator="[
'englishName',
{
rules: [
{ required: true, message: '英文名称不能为空' },
{ whitespace: true, message: '英文名称不能为空' },
{ max: 140, massage: '英文名称最多140个字符' },
],
},
'englishname'
]"
/>
</a-form-item>
<!-- 国别 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="国别"
>
<a-input
placeholder="国别"
v-decorator="[
'countries'
]"
/>
</a-form-item>
<!-- 设备所属 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
>
<a-input
placeholder="设备所属"
v-decorator="[
'belonging'
]"
/>
</a-form-item>
<!-- 编号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="编号"
>
<a-input
placeholder="编号"
v-decorator="[
'identifier'
]"
/>
</a-form-item>
<!-- 制造商 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="制造商"
>
<a-input
placeholder="制造商"
v-decorator="[
'manufactor'
]"
/>
</a-form-item>
<!-- 主要性能指标及功能用途 -->
<!-- 型号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主要性能指标及功能用途"
label="型号"
>
<a-input
placeholder="主要性能指标及功能用途"
placeholder="型号"
v-decorator="[
'performance',
'model'
]"
/>
</a-form-item>
<!-- 类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="类型"
>
<a-checkbox-group
v-decorator="[
'modelIds',
{
rules: [
{ required: true, message: '主要性能指标及功能用途不能为空' },
{ whitespace: true, message: '主要性能指标及功能用途不能为空' },
{ max: 140, massage: '主要性能指标及功能用途最多140个字符' },
{ required: true, message: '类型不能为空' },
],
},
]"
>
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 价格 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="价格(万元)"
>
<a-input
placeholder="价格(万元)"
v-decorator="[
'money'
]"
/>
</a-form-item>
<!-- 说明图片 -->
<!-- 性能指标 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="说明图片"
label="性能指标"
>
<a-input
placeholder="说明图片"
placeholder="性能指标"
v-decorator="[
'performance'
]"
/>
</a-form-item>
<!-- 图片 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片"
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
list-type="picture"
name="files"
v-decorator="[
'researchDirection',
'picId',
{
rules: [
{ required: true, message: '说明图片不能为空' },
{ whitespace: true, message: '说明图片不能为空' },
{ max: 140, massage: '说明图片最多140个字符' },
{ required: true, message: '图片不能为空' },
],
},
]"
/>
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 设备所属 -->
<!-- 规格 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
label="规格"
>
<a-input
placeholder="设备所属"
placeholder="规格"
v-decorator="[
'equipmentOwnership',
'specifications'
]"
/>
</a-form-item>
<!-- 分类 -->
<!-- 所属单位 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="分类"
label="所属单位"
>
<a-select class="ml-3" placeholder="分类" style="width: 200px">
<a-select
placeholder="所属单位"
style="width:100%"
v-decorator="[
'research'
]"
>
<a-select-option
:key="index"
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
:value="type.id"
v-for="(type, index) in types"
>{{ type.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 备注 -->
<!-- 用途 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="备注"
label="用途"
>
<a-textarea placeholder="备注" v-decorator="['remark']" />
<a-textarea
placeholder="用途"
v-decorator="['purpose',{
rules: [
{ required: true, message: '用途不能为空' },
],
},]"
/>
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -129,46 +239,82 @@
</template>
<script>
import { upload, selInstrumentAdd } from 'config/api';
import { mapActions } from 'vuex';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "TransferAdd",
props: { visible: { type: Boolean, default: false } },
name: 'TransferAdd',
props: { visible: { type: Boolean, default: false }, typeLists: { type: Array, default: () => [] } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'transfer-add' }),
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}]
}
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
types: [],
};
},
async created() {
const params = {
param: {
pageNum: 1,
pageSize: 10,
model: 2,
},
};
this.types = await this.getSelModelSearch(params);
},
methods: {
...mapActions(['getSelModelSearch']),
//
handleChange(info) {
if (info.file.status === 'done') {
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
// const params = this.generateParams(values);
// const res = await createTask(params);
// const { data, msg, code } = res.data;
// //
// this.clearCreateTask();
// this.$emit('closeDialog');
// if (code === 200) {
// this.handleCreateSuccess(params.executorId);
// } else {
// throw msg;
// }
const { fileList } = this;
const params = { param: values };
params.param.picId = fileList[0];
const res = await selInstrumentAdd(params);
const { data, msg, code } = res.data;
//
if (code === 200) {
this.$message.success('添加成功');
this.$emit('handleTableChange');
} else {
throw msg;
}
this.$emit('closeModal');
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$emit('closeModal');
this.$message.error(error || '添加仪器失败');
}
}
});

221
src/components/Transfer/TransferDate.vue

@ -1,72 +1,117 @@
<template>
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 学科分类 -->
<template slot="subjectClassification" slot-scope="text, record">
<a-tag color="green">{{ record.subjectClassification }}</a-tag>
</template>
<!-- 成果分类管理 -->
<template slot="achievementCategoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">成果分类管理</a-button>
</template>
<!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" height="50" width="50" />
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<!-- <div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div class="d-flex flex-nowrap justify-space-between">
<div>关键词{{ record.keyWord }}</div>
<div class="ml-3">转让形式{{ record.formOfTransfer }}</div>
<div class="ml-3">转让范围{{ record.scopeOfTransfer }}</div>
<div class="ml-3">研究形式{{ record.researchForm }}</div>
</div>
<div class="d-flex flex-nowrap justify-space-between">
<div class="ml-3">所属高科技技术领域最多两项{{ record.field }}</div>
<div class="ml-3">知识产权形式{{ record.intellectualProperty }}</div>
<div class="ml-3">专利状况{{ record.patentStatus }}</div>
</div>
<div class="d-flex flex-nowrap justify-space-between">
<div class="ml-3">已授权专利数{{ record.field }}</div>
<div class="ml-3">软件著作权登记号{{ record.intellectualProperty }}</div>
<div class="ml-3">软件著作权名称{{ record.patentStatus }}</div>
<div class="ml-3">成果关键性能指标简介{{ record.researchForm }}</div>
<a-spin :spinning="showEdit">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
@change="handleTableChange"
@expand="getDetail"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" height="50" width="50" />
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm
@confirm="() => onDelete(record.id)"
title="确定要删除这一条?"
v-if="lists.length"
>
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<a-spin :spinning="spinning" tip="详情加载中...">
<div v-if="record.info">
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">制造商</span>
{{ record.info.manufactor }}
</div>
<div class="flex-1">
<span class="font-bold-14">型号</span>
{{ record.info.model }}
</div>
<div class="flex-1">
<span class="font-bold-14">性能指标</span>
{{ record.info.performance }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">规格</span>
{{ record.info.specifications }}
</div>
<div class="flex-1">
<span class="font-bold-14">设备所属</span>
{{ record.info.belonging }}
</div>
<div class="flex-1">
<span class="font-bold-14">国别</span>
{{ record.info.countries }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">价格</span>
{{ record.info.money }}万元
</div>
<div class="flex-2">
<span class="font-bold-14">分类类型</span>
<span :key="a" v-for="(type,a) in record.info.names">
{{ type }}
<span v-if="a < record.info.names.length-1">/</span>
</span>
</div>
</div>
<div class="d-flex flex-column mb-3">
<div class="flex-2">
<span class="font-bold-14">用途</span>
{{ record.info.purpose }}
</div>
</div>
<div class="d-flex flex-row mb-3">
<span class="font-bold-14">联系人</span>
<div :key="index" class="flex-1" v-for="(pro,index) in record.info.selPeoList">
<span class="mr-3">{{ pro.contactsName }}</span>
{{ pro.contactsPhone }}
</div>
</div>
</div>
</a-spin>
</div>
</div>-->
</a-table>
</div>
<a-empty v-else />
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<transfer-edit :editVisible="editVisible" @closeModal="closeModal" />
<!-- 编辑 -->
<transfer-edit
:editItem="editItem"
:editVisible="editVisible"
:typeLists="typeLists"
@closeModal="closeModal"
/>
</a-spin>
</div>
</template>
<script>
import TransferEdit from 'components/Transfer/TransferEdit.vue';
import { selInstrumentDelete } from 'config/api';
import { selInstrumentDelete, selInstrumentMes } from 'config/api';
const columns = [
{
@ -102,13 +147,6 @@ const columns = [
key: 'visitLocation',
scopedSlots: { customRender: 'visitLocation' },
},
// {
// title: '',
// align: 'center',
// dataIndex: 'achievementCategoryManage',
// key: 'achievementCategoryManage',
// scopedSlots: { customRender: 'achievementCategoryManage' },
// },
{
title: '编辑',
align: 'center',
@ -124,16 +162,22 @@ export default {
TransferEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
props: {
lists: { type: Array, default: () => [] },
pagination: { type: Object, default: () => {} },
typeLists: { type: Array, default: () => [] },
},
data() {
return {
columns,
loading: false,
editingKey: '',
height: '',
editVisible: false,
imgVisible: false,
spinning: false,
editItem: null, //
showEdit: false,
};
},
@ -150,8 +194,12 @@ export default {
},
methods: {
showEditModal() {
async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editVisible = true;
this.editItem = record;
},
async closeModal() {
@ -159,16 +207,30 @@ export default {
await this.$emit('selInstrumentSearch');
},
//
openTeamMember() {
const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query });
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('selInstrumentSearch', condition);
},
//
openCategoryManage() {
const { query } = this.$route;
this.$router.push({ path: '/category-manage', query });
//
async getDetail(expanded, record) {
if (!expanded) return;
try {
this.spinning = true;
const params = { param: { id: record.id } };
const res = await selInstrumentMes(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.id === record.id);
item.info = data;
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '查询失败');
}
},
//
@ -180,9 +242,6 @@ export default {
if (code === 200) {
this.$message.success('删除成功');
this.$emit('selInstrumentSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// TODO:
} else {
throw msg;
}

305
src/components/Transfer/TransferEdit.vue

@ -1,118 +1,229 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-form :form="form" @submit="handleSubmit">
<!-- 中文名称 -->
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改仪器"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem && editItem.info">
<!-- 仪器中文名 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="中文名称"
label="仪器中文名"
>
<a-input
placeholder="中文名称"
placeholder="仪器中文名"
v-decorator="[
'chineseName',
'name',
{
initialValue: editItem.name,
rules: [
{ required: true, message: '团队名称不能为空' },
{ whitespace: true, message: '团队名称不能为空' },
{ max: 140, massage: '团队名称最多140个字符' },
{ required: true, message: '仪器中文名不能为空' },
{ whitespace: true, message: '仪器中文名不能为空' },
{ max: 140, massage: '仪器中文名最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- 英文名 -->
<!-- 仪器英文名 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="英文名"
label="仪器英文名"
>
<a-input
placeholder="英文名"
placeholder="仪器英文名"
v-decorator="[
'englishName',
{
rules: [
{ required: true, message: '英文名称不能为空' },
{ whitespace: true, message: '英文名称不能为空' },
{ max: 140, massage: '英文名称最多140个字符' },
],
},
'englishname',{initialValue: editItem.englishname}
]"
/>
</a-form-item>
<!-- 主要性能指标及功能用途 -->
<a-form-item label="主要性能指标及功能用途">
<!-- 国别 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="国别"
>
<a-input
placeholder="主要性能指标及功能用途"
placeholder="国别"
v-decorator="[
'performance',
{
rules: [
{ required: true, message: '主要性能指标及功能用途不能为空' },
{ whitespace: true, message: '主要性能指标及功能用途不能为空' },
{ max: 140, massage: '主要性能指标及功能用途最多140个字符' },
],
},
'countries',{initialValue: editItem.info.countries}
]"
/>
</a-form-item>
<!-- 设备所属 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
>
<a-input
placeholder="设备所属"
v-decorator="[
'belonging',{initialValue: editItem.info.belonging}
]"
/>
</a-form-item>
<!-- 说明图片 -->
<!-- 编号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="说明图片"
label="编号"
>
<a-input
placeholder="说明图片"
placeholder="编号"
v-decorator="[
'researchDirection',
'identifier',{initialValue: editItem.info.identifier}
]"
/>
</a-form-item>
<!-- 制造商 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="制造商"
>
<a-input
placeholder="制造商"
v-decorator="[
'manufactor',{initialValue: editItem.info.manufactor}
]"
/>
</a-form-item>
<!-- 型号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="型号"
>
<a-input
placeholder="型号"
v-decorator="[
'model',{initialValue: editItem.info.model}
]"
/>
</a-form-item>
<!-- 类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="类型"
>
<a-checkbox-group
v-decorator="[
'modelIds',
{
initialValue: oldTypes ? oldTypes : [],
rules: [
{ required: true, message: '说明图片不能为空' },
{ whitespace: true, message: '说明图片不能为空' },
{ max: 140, massage: '说明图片最多140个字符' },
{ required: true, message: '类型不能为空' },
],
},
]"
>
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 价格 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="价格(万元)"
>
<a-input
placeholder="价格(万元)"
v-decorator="[
'money',{initialValue: editItem.info.money}
]"
/>
</a-form-item>
<!-- 设备所属 -->
<!-- 性能指标 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="设备所属"
label="性能指标"
>
<a-input
placeholder="设备所属"
placeholder="性能指标"
v-decorator="[
'performance',{initialValue: editItem.info.performance}
]"
/>
</a-form-item>
<!-- 图片 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片"
required
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
list-type="picture"
name="files"
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 规格 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="规格"
>
<a-input
placeholder="规格"
v-decorator="[
'equipmentOwnership',
'specifications',{initialValue: editItem.info.specifications}
]"
/>
</a-form-item>
<!-- 分类 -->
<!-- 所属单位 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="分类"
label="所属单位"
>
<a-select class="ml-3" placeholder="分类" style="width: 200px">
<a-select
placeholder="所属单位"
style="width:100%"
v-decorator="[
'research',{initialValue: editItem.info.research}
]"
>
<a-select-option
:key="index"
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
:value="type.id"
v-for="(type, index) in types"
>{{ type.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 备注 -->
<!-- 用途 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="备注"
label="用途"
>
<a-textarea placeholder="备注" v-decorator="['remark']" />
<a-textarea
placeholder="用途"
v-decorator="['purpose',
{
initialValue: editItem.info.purpose,
rules: [
{ required: true, message: '用途不能为空' },
],
},]"
/>
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -125,6 +236,9 @@
</template>
<script>
import { upload, selInstrumentUpdate } from 'config/api';
import { mapActions } from 'vuex';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
@ -133,38 +247,93 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "TransferEdit",
props: { editVisible: { type: Boolean, default: false } },
name: 'TransferEdit',
props: {
editVisible: { type: Boolean, default: false },
typeLists: { type: Array, default: () => [] },
editItem: { type: Object, default: () => {} },
},
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'transfer-add' }),
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}]
}
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
types: [],
};
},
computed: {
oldTypes() {
const { typeLists, editItem } = this;
let arr = [];
for (let i = 0; i < typeLists.length; i++) {
const item = typeLists[i];
const a = editItem.info.names.findIndex(a => a === item.name);
const index = arr.findIndex(c => c === a);
if (a !== -1 && index === -1) {
arr.push(item.id);
}
}
return arr;
},
},
async created() {
const params = {
param: {
pageNum: 1,
pageSize: 10,
model: 2,
},
};
this.types = await this.getSelModelSearch(params);
},
methods: {
...mapActions(['getSelModelSearch']),
//
handleChange(info) {
if (info.file.status === 'done') {
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
// const params = this.generateParams(values);
// const res = await createTask(params);
// const { data, msg, code } = res.data;
// //
// this.clearCreateTask();
// this.$emit('closeDialog');
// if (code === 200) {
// this.handleCreateSuccess(params.executorId);
// } else {
// throw msg;
// }
const { fileList, editItem } = this;
const params = { param: values };
params.param.id = editItem.id;
params.param.picId = fileList[0];
const res = await selInstrumentUpdate(params);
const { data, msg, code } = res.data;
//
if (code === 200) {
this.$message.success('修改成功');
this.$emit('handleTableChange');
} else {
throw msg;
this.$message.error('修改失败');
}
this.$emit('closeModal');
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$message.error(error || '修改失败');
}
}
});

37
src/components/Transfer/TransferSearch.vue

@ -2,12 +2,10 @@
<div class="d-flex flex-wrap pb-3">
<!-- 中文名称 -->
<div>
<a-input
@change="handleChangeAchievementName"
placeholder="分类"
style="width: 150px"
v-model="achievementName"
/>
<a-input placeholder="搜索内容" style="width: 150px" v-model="content" />
<a-checkbox-group @change="onChange" class="ml-3">
<a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
</a-checkbox-group>
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
@ -16,7 +14,12 @@
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<transfer-add :visible="visible" @closeModal="closeModal" />
<transfer-add
:typeLists="typeLists"
:visible="visible"
@closeModal="closeModal"
@handleTableChange="handleTableChange"
/>
</div>
</template>
@ -28,10 +31,12 @@ export default {
components: {
TransferAdd,
},
props: { typeLists: { type: Array, default: () => [] } },
data() {
return {
visible: false,
achievementName: '',
content: '',
modelIds: [],
};
},
methods: {
@ -43,17 +48,21 @@ export default {
this.visible = false;
},
handleChangeAchievementName(value) {
console.log('value: ', value);
this.achievementName = value;
onChange(checkedValues) {
this.modelIds = checkedValues;
},
handleTableChange() {
console.log('搜索');
async handleTableChange() {
const { content, modelIds } = this;
//
const condition = {
content,
modelIds,
};
await this.$emit('selInstrumentSearch', condition);
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

14
src/components/innovativeService/innovativeServiceAdd.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="添加研发团队"
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 团队名称 -->
<a-form-item
@ -115,14 +123,14 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "RDMemberAdd",
name: 'RDMemberAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-member-add' }),
}
};
},
methods: {

9
src/components/innovativeService/innovativeServiceDate.vue

@ -5,8 +5,10 @@
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
@change="handleTableChange"
bordered
class="white"
>
@ -143,6 +145,13 @@ export default {
this.editVisible = false;
},
//
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getSelectTeam', condition);
},
//
async onDelete(teamId) {
try {

14
src/components/innovativeService/innovativeServiceEdit.vue

@ -1,7 +1,15 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-modal
:closable="false"
:maskClosable="false"
destroyOnClose
footer
title="修改研发团队"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 团队名称 -->
<a-form-item
@ -116,14 +124,14 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "RDMemberEdit",
name: 'RDMemberEdit',
props: { editVisible: { type: Boolean, default: false } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-member-add' }),
}
};
},
methods: {

24
src/config/api.js

@ -124,6 +124,12 @@ export const getInstituteSearchBack = params => axios.post(`${institute}/searchB
// 实验室[研究院]删除
export const deleteInstitute = params => axios.post(`${institute}/instituteDelete`, params);
// 实验室[研究院]新增
export const addInstitute = params => axios.post(`${institute}/instituteAdd`, params);
// 实验室[研究院]修改
export const updateInstitute = params => axios.post(`${institute}/instituteUpdate`, params);
// 创新部类型列表查询
export const selModelSearch = params => axios.post(`${achInstr}/selModel`, params);
@ -139,15 +145,33 @@ export const selModelUpdate = params => axios.post(`${achInstr}/updateModel`, pa
// 创新部仪器列表查询
export const selInstrumentSearch = params => axios.post(`${achInstr}/selInstrument`, params);
// 创新部仪器列表详情查询
export const selInstrumentMes = params => axios.post(`${achInstr}/selInstrumentMesH`, params);
// 创新部仪器删除
export const selInstrumentDelete = params => axios.post(`${achInstr}/deleteInstrument`, params);
// 创新部仪器添加
export const selInstrumentAdd = params => axios.post(`${achInstr}/addInstrument`, params);
// 创新部仪器修改
export const selInstrumentUpdate = params => axios.post(`${achInstr}/updateInstrument`, params);
// 创新部成果列表查询
export const selResSearch = params => axios.post(`${achInstr}/selRes`, params);
// 创新部成果列表详情查询
export const selResMesH = params => axios.post(`${achInstr}/selResMesH`, params);
// 创新部成果删除
export const selResDelete = params => axios.post(`${achInstr}/deleteRes`, params);
// 创新部成果添加
export const selResAdd = params => axios.post(`${achInstr}/addRes`, params);
// 创新部成果修改
export const selResUpdate = params => axios.post(`${achInstr}/updateRes`, params);
// 孵化部入驻实体列表查询
export const entityApplicationSearch = params => axios.post(`${place}/search`, params);

62
src/views/InnovativeAchievements/InnovativeAchievements.vue

@ -1,34 +1,71 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<development-search @selResSearch="selResSearch" />
<development-date :lists="lists" :pagination="pagination" @selResSearch="selResSearch" />
<development-search :typeLists="typeLists" @selResSearch="selResSearch" />
<development-date
:lists="lists"
:pagination="pagination"
:typeLists="typeLists"
@selResSearch="selResSearch"
/>
</div>
</template>
<script>
import DevelopmentSearch from "components/Development/DevelopmentSearch.vue";
import DevelopmentDate from "components/Development/DevelopmentDate.vue";
import DevelopmentSearch from 'components/Development/DevelopmentSearch.vue';
import DevelopmentDate from 'components/Development/DevelopmentDate.vue';
import { selResSearch } from 'config/api';
import { mapActions } from 'vuex';
export default {
name: "ResourceDevelopment",
name: 'InnovativeAchievements',
components: {
DevelopmentSearch,
DevelopmentDate,
},
data(){
return {
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
typeLists: [],
};
},
},
async created() {
await this.selModelSearch();
await this.selResSearch();
},
methods: {
...mapActions(['getSelModelSearch']),
created() {
this.selResSearch();
},
/**
* 获取分类管理列表
* @param { Number } model 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
async selModelSearch(condition) {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
model: 0,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
}
const data = await this.getSelModelSearch(params);
this.typeLists = data;
},
methods: {
/**
* 获取成果
* @param { Array } modelIds 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
async selResSearch(condition) {
try {
const params = {
@ -62,6 +99,5 @@ methods: {
}
},
},
};
</script>

51
src/views/InnovativeEquipment/InnovativeEquipment.vue

@ -1,17 +1,23 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<transfer-search @selInstrumentSearch="selInstrumentSearch" />
<transfer-date :lists="lists" :pagination="pagination" @selInstrumentSearch="selInstrumentSearch" />
<transfer-search :typeLists="typeLists" @selInstrumentSearch="selInstrumentSearch" />
<transfer-date
:lists="lists"
:pagination="pagination"
:typeLists="typeLists"
@selInstrumentSearch="selInstrumentSearch"
/>
</div>
</template>
<script>
import TransferSearch from "components/Transfer/TransferSearch.vue";
import TransferDate from "components/Transfer/TransferDate.vue";
import TransferSearch from 'components/Transfer/TransferSearch.vue';
import TransferDate from 'components/Transfer/TransferDate.vue';
import { selInstrumentSearch } from 'config/api';
import { mapActions } from 'vuex';
export default {
name: "TechnologyTransfer",
name: 'InnovativeEquipment',
components: {
TransferSearch,
TransferDate,
@ -21,14 +27,44 @@ export default {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
typeLists: [],
};
},
created() {
this.selInstrumentSearch();
async created() {
await this.selModelSearch();
await this.selInstrumentSearch();
},
methods: {
...mapActions(['getSelModelSearch']),
/**
* 获取分类管理列表
* @param { Number } model 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
async selModelSearch(condition) {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
model: 1,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
}
const data = await this.getSelModelSearch(params);
this.typeLists = data;
},
/**
* 获取仪器
* @param { Array } modelIds 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
async selInstrumentSearch(condition) {
try {
const params = {
@ -62,6 +98,5 @@ export default {
}
},
},
};
</script>

5
src/views/InnovativeLab/InnovativeLab.vue

@ -4,6 +4,7 @@
<institute-date
:lists="lists"
:pagination="pagination"
:typeLists="typeLists"
@getInstituteSearchBack="getInstituteSearchBack"
/>
</div>
@ -65,6 +66,7 @@ export default {
* @param { String } name 分类名称
*/
async getInstituteSearchBack(condition) {
console.log('condition: ', condition);
try {
const params = {
param: {
@ -76,6 +78,9 @@ export default {
if (condition.name) {
params.param.name = condition.name;
}
if (condition.moldIds) {
params.param.moldIds = condition.moldIds;
}
}
const res = await getInstituteSearchBack(params);
const { code, msg, data } = res.data;

Loading…
Cancel
Save