Browse Source

创新部服务查询删除,研究院查询删除,类型查询删除

master
ma 4 years ago
parent
commit
9d7a7afdbd
  1. 0
      src/components/Institute/InstituteAdd.vue
  2. 263
      src/components/Institute/InstituteDate.vue
  3. 0
      src/components/Institute/InstituteEdit.vue
  4. 30
      src/components/Institute/InstituteSearch.vue
  5. 78
      src/components/Manage/ManageDate.vue
  6. 38
      src/components/Manage/ManageSearch.vue
  7. 59
      src/components/RDMember/RDMemberSearch.vue
  8. 204
      src/components/Sharing/SharingDate.vue
  9. 0
      src/components/innovativeService/innovativeServiceAdd.vue
  10. 94
      src/components/innovativeService/innovativeServiceDate.vue
  11. 0
      src/components/innovativeService/innovativeServiceEdit.vue
  12. 91
      src/components/innovativeService/innovativeServiceSearch.vue
  13. 18
      src/config/api.js
  14. 60
      src/views/CategoryManage/CategoryManage.vue
  15. 61
      src/views/InnovativeLab/InnovativeLab.vue
  16. 70
      src/views/InnovativeService/InnovativeService.vue

0
src/components/Sharing/SharingAdd.vue → src/components/Institute/InstituteAdd.vue

263
src/components/Institute/InstituteDate.vue

@ -0,0 +1,263 @@
<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"
@change="handleTableChange"
:scroll="{ y: height }"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 说明图片 -->
<template slot="researchDirection" slot-scope="text, record">
<img :src="record.researchDirection" 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="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>
<span v-if=" record.serviceType === 2">孵化平台</span>
<span v-if=" record.serviceType === 3">产业平台</span>
</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>研究方向
<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"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div class="ml-3">分类<span v-dompurify-html="record.direction"></span></div>
<div class="ml-3">备注{{ record.description }}</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<institute-edit :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import InstituteEdit from "components/Institute/InstituteEdit.vue";
import { deleteInstitute } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
width: '7%',
scopedSlots: { customRender: 'id' },
},
{
title: '姓名',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '电话',
align: 'center',
dataIndex: 'phone',
key: 'phone',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'description',
// key: 'description',
// },
// {
// title: '',
// align: 'center',
// dataIndex: 'direction',
// key: 'direction',
// },
{
title: '可做实验',
align: 'center',
dataIndex: 'experiments',
key: 'experiments',
},
{
title: '图片',
align: 'center',
dataIndex: 'picId',
key: 'picId',
},
{
title: '项目分类',
align: 'center',
dataIndex: 'projectKind',
key: 'projectKind',
},
{
title: '研究院类型',
align: 'center',
dataIndex: 'type',
key: 'type',
},
{
title: '校验',
align: 'center',
dataIndex: 'vertify',
key: 'vertify',
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
scopedSlots: { customRender: 'edit' },
},
];
// 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: () => {} } },
data() {
return {
columns,
loading: false,
editingKey: '',
height: '',
editVisible: false,
imgVisible: false,
}
},
mounted() {
let th = 250;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {
showEditModal(){
this.editVisible = true;
},
async closeModal(){
this.editVisible = false;
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 };
this.$emit('getInstituteSearchBack', condition);
},
//
async onDelete(id) {
try {
const params = { param:{id}};
const res = await deleteInstitute(params);
const { data, msg, code } = res.data;
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;
}
} catch (error) {
this.$message.error(error || '删除失败');
}
},
},
};
</script>
<style lang="stylus" scoped>
.main .img {
width: 100%;
}
.main .big_img {
width: 200px;
}
</style>

0
src/components/Sharing/SharingEdit.vue → src/components/Institute/InstituteEdit.vue

30
src/components/Sharing/SharingSearch.vue → src/components/Institute/InstituteSearch.vue

@ -4,11 +4,11 @@
<div>
<a-input
@change="handleChangeChineseName"
placeholder="中文名称"
placeholder="姓名"
style="width: 150px"
v-model="chineseName"
v-model="name"
/>
<a-input
<!-- <a-input
@change="handleChangeEnglishName"
class="ml-3"
placeholder="英文名称"
@ -21,7 +21,7 @@
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
</a-select>
</a-select> -->
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
@ -30,26 +30,22 @@
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<!-- 添加 -->
<sharing-add :visible="visible" @closeModal="closeModal" />
<institute-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import SharingAdd from "components/Sharing/SharingAdd.vue";
import InstituteAdd from "components/Institute/InstituteAdd.vue";
export default {
name: "SharingSearch",
name: "InstituteSearch",
components: {
SharingAdd,
InstituteAdd,
},
data() {
return {
visible: false,
chineseName: '',
englishName: '',
performance: '',
category: '',
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}]
name: "",
}
},
methods: {
@ -76,8 +72,14 @@ export default {
this.category = value;
},
handleTableChange() {
async handleTableChange() {
console.log('搜索');
const { name} = this;
//
const condition = {
name
}
await this.$emit('getInstituteSearchBack',condition)
},
},
};

78
src/components/Manage/ManageDate.vue

@ -5,7 +5,9 @@
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
@ -13,6 +15,11 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="model" slot-scope="text, record">
<span v-if=" record.model === 0">成果</span>
<span v-if=" record.model === 1">仪器</span>
</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">
@ -30,6 +37,7 @@
<script>
import ManageEdit from "components/Manage/ManageEdit.vue";
import { selModelDelete } from 'config/api';
const columns = [
{
@ -43,14 +51,15 @@ const columns = [
{
title: '类型',
align: 'center',
dataIndex: 'type',
key: 'type',
dataIndex: 'model',
key: 'model',
scopedSlots: { customRender: 'model' },
},
{
title: '上级类型',
title: '分类名称',
align: 'center',
dataIndex: 'superiorType',
key: 'superiorType',
dataIndex: 'name',
key: 'name',
},
{
title: '编辑',
@ -61,29 +70,32 @@ const columns = [
},
];
const lists = [
{
id:'001',
type:'传控科技',
superiorType: '博士',
},
{
id:'002',
type:'中绿环保',
superiorType: '博士',
}
];
// const lists = [
// {
// id:'001',
// type:'',
// superiorType: '',
// },
// {
// id:'002',
// type:'绿',
// superiorType: '',
// }
// ];
export default {
name: "ManageDate",
components: {
ManageEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
editingKey: '',
height: '',
@ -100,24 +112,26 @@ export default {
this.editVisible = true;
},
closeModal(){
async closeModal(){
this.editVisible = false;
await this.$emit('selModelSearch');
},
//
async onDelete(teamId) {
async onDelete(id) {
try {
const params = { param: { teamId } };
// const res = await delTeam(params);
// const { data, msg, code } = res.data;
// if (code === 200) {
// this.$message.success('');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// // TODO:
// } else {
// throw msg;
// }
const params = { param: { id } };
const res = await selModelDelete(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('删除成功');
this.$emit('selModelSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== id);
// TODO:
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
}

38
src/components/Manage/ManageSearch.vue

@ -4,10 +4,25 @@
<div>
<a-input
@change="handleChangeName"
placeholder="团队名称"
placeholder="分类名称"
style="width: 150px"
v-model="teamName"
v-model="name"
/>
类型:
<a-select
@change="handleChangeSelect('model',$event)"
class="ml-3"
style="width: 150px"
allow-clear
>
<a-select-option
:key="model.id"
:value="model.id"
v-for="model in models"
>{{ model.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
@ -31,7 +46,11 @@ export default {
data() {
return {
visible: false,
teamName: '',
name: '',
models: [
{ id:0, value:'成果' },
{ id:1, value:'仪器' },
],
}
},
methods: {
@ -43,13 +62,24 @@ export default {
this.visible = false;
},
handleChangeSelect(type, value) {
this[type] = value;
},
handleChangeName(value) {
console.log('value: ', value);
this.teamName = value;
},
handleTableChange() {
async handleTableChange() {
console.log('搜索');
const { name,model} = this;
//
const condition = {
name,model
}
console.log(condition)
await this.$emit('selModelSearch',condition)
},
},
};

59
src/components/RDMember/RDMemberSearch.vue

@ -1,59 +0,0 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 团队名称 -->
<div>
<a-input
@change="handleChangeName"
placeholder="团队名称"
style="width: 150px"
v-model="teamName"
/>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<!-- 添加 -->
<r-d-member-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import RDMemberAdd from "components/RDMember/RDMemberAdd.vue";
export default {
name: "RDMemberSearch",
components: {
RDMemberAdd,
},
data() {
return {
visible: false,
teamName: '',
}
},
methods: {
showModal(){
this.visible = true;
},
closeModal(){
this.visible = false;
},
handleChangeName(value) {
console.log('value: ', value);
this.teamName = value;
},
handleTableChange() {
console.log('搜索');
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

204
src/components/Sharing/SharingDate.vue

@ -1,204 +0,0 @@
<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"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 说明图片 -->
<template slot="researchDirection" slot-scope="text, record">
<img :src="record.researchDirection" 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="categoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button>
</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
class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div>设备所属{{ record.equipmentOwnership }}</div>
<div class="ml-3">分类{{ record.category }}</div>
<div class="ml-3">备注{{ record.remark }}</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<sharing-edit :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import SharingEdit from "components/Sharing/SharingEdit.vue";
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
width: '7%',
scopedSlots: { customRender: 'id' },
},
{
title: '中文名称',
align: 'center',
dataIndex: 'chineseName',
key: 'chineseName',
},
{
title: '英文名称',
align: 'center',
dataIndex: 'englishName',
key: 'englishName',
},
{
title: '主要性能指标及功能用途',
align: 'center',
dataIndex: 'performance',
key: 'performance',
},
{
title: '说明图片',
align: 'center',
dataIndex: 'researchDirection',
key: 'researchDirection',
scopedSlots: { customRender: 'researchDirection' },
},
{
title: '分类管理',
align: 'center',
dataIndex: 'categoryManage',
key: 'categoryManage',
scopedSlots: { customRender: 'categoryManage' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
scopedSlots: { customRender: 'edit' },
},
];
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: "SharingDate",
components: {
SharingEdit,
},
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
editingKey: '',
height: '',
editVisible: false,
imgVisible: false,
}
},
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
},
methods: {
showEditModal(){
this.editVisible = true;
},
closeModal(){
this.editVisible = false;
},
//
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 });
},
//
async onDelete(teamId) {
try {
const params = { param: { teamId } };
// const res = await delTeam(params);
// const { data, msg, code } = res.data;
// if (code === 200) {
// this.$message.success('');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// // TODO:
// } else {
// throw msg;
// }
} catch (error) {
this.$message.error(error || '删除失败');
}
},
},
};
</script>
<style lang="stylus" scoped>
.main .img {
width: 100%;
}
.main .big_img {
width: 200px;
}
</style>

0
src/components/RDMember/RDMemberAdd.vue → src/components/innovativeService/innovativeServiceAdd.vue

94
src/components/RDMember/RDMemberDate.vue → src/components/innovativeService/innovativeServiceDate.vue

@ -6,6 +6,7 @@
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
@ -13,6 +14,16 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="picUrl" slot-scope="text, record">
<img :src="record.picUrl" width="50" height="50">
</template>
<template slot="serviceType" slot-scope="text, record">
<span v-if=" record.serviceType === 1">创新平台</span>
<span v-if=" record.serviceType === 2">孵化平台</span>
<span v-if=" record.serviceType === 3">产业平台</span>
</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">
@ -29,7 +40,7 @@
</template>
<script>
import RDMemberEdit from "components/RDMember/RDMemberEdit.vue";
import RDMemberEdit from "components/innovativeService/innovativeServiceEdit.vue";
const columns = [
{
@ -41,54 +52,52 @@ const columns = [
scopedSlots: { customRender: 'id' },
},
{
title: '姓名',
title: '服务名称',
align: 'center',
dataIndex: 'name',
key: 'name',
scopedSlots: { customRender: 'name' },
},
{
title: '性别',
title: '服务简介',
align: 'center',
dataIndex: 'sex',
key: 'sex',
scopedSlots: { customRender: 'sex' },
dataIndex: 'orders',
key: 'orders',
},
{
title: '所在单位',
title: '服务图片',
align: 'center',
dataIndex: 'supportUnit',
key: 'supportUnit',
scopedSlots: { customRender: 'supportUnit' },
dataIndex: 'picUrl',
key: 'picUrl',
    scopedSlots: { customRender: 'picUrl' },
},
{
title: '出生年月',
title: '服务状态',
align: 'center',
dataIndex: 'birth',
key: 'birth',
scopedSlots: { customRender: 'birth' },
dataIndex: 'recStatus',
key: 'recStatus',
},
{
title: '学历/学位',
title: '服务类型',
align: 'center',
dataIndex: 'education',
key: 'education',
scopedSlots: { customRender: 'education' },
},
{
title: '职称/职务',
align: 'center',
dataIndex: 'jobTitle',
key: 'jobTitle',
scopedSlots: { customRender: 'jobTitle' },
},
{
title: '研究方向',
align: 'center',
dataIndex: 'researchDirection',
key: 'researchDirection',
scopedSlots: { customRender: 'researchDirection' },
dataIndex: 'serviceType',
key: 'serviceType',
scopedSlots: { customRender: 'serviceType' },
},
// {
// title: '/',
// align: 'center',
// dataIndex: 'jobTitle',
// key: 'jobTitle',
// scopedSlots: { customRender: 'jobTitle' },
// },
// {
// title: '',
// align: 'center',
// dataIndex: 'researchDirection',
// key: 'researchDirection',
// scopedSlots: { customRender: 'researchDirection' },
// },
{
title: '编辑',
align: 'center',
@ -98,7 +107,7 @@ const columns = [
},
];
// const lists = [
// const columns = [
// {
// id:'001',
// name:'',
@ -122,11 +131,13 @@ const columns = [
// ];
export default {
name: "RDMemberDate",
name: "innovativeServiceDate",
components: {
RDMemberEdit,
},
props: { lists: { type: Array, default: () => {} } },
// props: { lists: { type: Array, default: () => {} } },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
return {
columns,
@ -138,8 +149,15 @@ export default {
},
mounted() {
console.log('lists',this.lists);
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
let th = 250;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {

0
src/components/RDMember/RDMemberEdit.vue → src/components/innovativeService/innovativeServiceEdit.vue

91
src/components/innovativeService/innovativeServiceSearch.vue

@ -0,0 +1,91 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 团队名称 -->
<div>
<a-input
placeholder="服务名称"
style="width: 150px"
v-model="name"
/>
服务类型:
<a-select
@change="handleChangeSelect('serviceType',$event)"
class="ml-3"
style="width: 150px"
allow-clear
>
<a-select-option
:key="serviceType.id"
:value="serviceType.id"
v-for="serviceType in serviceTypes"
>{{ serviceType.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<!-- 添加 -->
<r-d-member-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import RDMemberAdd from "components/innovativeService/innovativeServiceAdd.vue";
export default {
name: "innovativeServiceSearch",
components: {
RDMemberAdd,
},
data() {
return {
visible: false,
name: '',
serviceTypes: [
{ id:1, value:'创新平台' },
{ id:2, value:'孵化平台' },
{ id:3, value:'产业平台' },
],
}
},
methods: {
showModal(){
this.visible = true;
},
closeModal(){
this.visible = false;
},
handleChangeSelect(type, value) {
this[type] = value;
},
handleChangeName(value) {
console.log('value: ', value);
this.name = value;
},
async handleTableChange() {
console.log('搜索');
const { name,serviceType} = this;
console.log(name,serviceType)
//
const condition = {
name,serviceType
}
await this.$emit('getInnovativeServiceSearch',condition)
this.activityType = [];
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

18
src/config/api.js

@ -12,6 +12,9 @@ const page = `${greenvalley}/page`; // 页面管理相关操作
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
const activity = `${greenvalley}/activity`; // 活动公告相关操作
const creatingPlatform = `${greenvalley}/creatingPlatform`; // 合作意向相关操作
const serviceProject = `${greenvalley}/serviceProject`; // 创新部服务相关操作
const institute = `${greenvalley}/institute`; // 实验室(研究院)相关操作
const achInstr = `${greenvalley}/achInstr`; // 创新部类型相关操作
// websocket基础地址
export const WS_BASE_URL = msgUrl;
@ -49,6 +52,21 @@ export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatfor
// 合作意向删除
export const getCreatingPlatformDelete = params => axios.post(`${creatingPlatform}/delete`, params);
// 创新部服务列表查询
export const getInnovativeServiceSearch = params => axios.post(`${serviceProject}/selServiceH`, params);
// 实验室[研究院]列表查询
export const getInstituteSearchBack = params => axios.post(`${institute}/searchBack`, params);
// 实验室[研究院]删除
export const deleteInstitute = params => axios.post(`${institute}/instituteDelete`, params);
// 创新部类型列表查询
export const selModelSearch = params => axios.post(`${achInstr}/selModel`, params);
// 创新部类型列表查询
export const selModelDelete = params => axios.post(`${achInstr}/deleteModel`, params);
// 查询所有的研发团队相关信息
export const getAllTeam = () => axios.post(`${researchTeam}/selectAllTeam`);

60
src/views/CategoryManage/CategoryManage.vue

@ -1,7 +1,7 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<manage-search />
<manage-date />
<manage-search @selModelSearch="selModelSearch" />
<manage-date :pagination="pagination" :lists="lists" @selModelSearch="selModelSearch" />
</div>
</template>
@ -9,12 +9,66 @@
// @ is an alias to /src
import ManageSearch from "components/Manage/ManageSearch.vue";
import ManageDate from "components/Manage/ManageDate.vue";
import {selModelSearch} from 'config/api';
export default {
name: "CategoryManage",
components: {
ManageSearch,
ManageDate,
}
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.selModelSearch()
},
methods: {
/**
* 根据团队id查看研发团队相关信息
* @param { String } competeTimeId 第几届信息的id
*/
async selModelSearch(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.model !== ''){
params.param.model = condition.model
}
if(condition.name){
params.param.name = condition.name
}
}
console.log('params',params)
const res = await selModelSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data)
this.lists = data;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

61
src/views/InnovativeLab/InnovativeLab.vue

@ -1,19 +1,66 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<sharing-search />
<sharing-date />
<institute-search @getInstituteSearchBack="getInstituteSearchBack" />
<institute-date :pagination="pagination" :lists="lists" @getInstituteSearchBack="getInstituteSearchBack" />
</div>
</template>
<script>
import SharingSearch from "components/Sharing/SharingSearch.vue";
import SharingDate from "components/Sharing/SharingDate.vue";
import InstituteSearch from "components/Institute/InstituteSearch.vue";
import InstituteDate from "components/Institute/InstituteDate.vue";
import { getInstituteSearchBack } from "config/api";
export default {
name: "ResourceSharing",
components: {
SharingSearch,
SharingDate,
}
InstituteSearch,
InstituteDate,
},
data(){
return{
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.getInstituteSearchBack()
},
methods: {
async getInstituteSearchBack(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.name){
params.param.name = condition.name
}
}
console.log('params',params)
const res = await getInstituteSearchBack(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data)
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

70
src/views/InnovativeService/InnovativeService.vue

@ -1,20 +1,78 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<r-d-member-search />
<r-d-member-date />
<!-- <r-d-member-search />
<r-d-member-date /> -->
<innovative-service-search @getInnovativeServiceSearch="getInnovativeServiceSearch" />
<innovative-service-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" />
</div>
</template>
<script>
// @ is an alias to /src
import RDMemberSearch from "components/RDMember/RDMemberSearch.vue";
import RDMemberDate from "components/RDMember/RDMemberDate.vue";
import innovativeServiceSearch from "components/innovativeService/innovativeServiceSearch.vue";
import innovativeServiceDate from "components/innovativeService/innovativeServiceDate.vue";
import { getInnovativeServiceSearch } from 'config/api';
export default {
name: "RDTeamMember",
components: {
RDMemberSearch,
RDMemberDate,
innovativeServiceSearch,
innovativeServiceDate,
},
data(){
return{
lists: [],
pagination:{ current: 1,pageSize: 10},
};
},
created() {
this.getInnovativeServiceSearch()
},
methods: {
async getInnovativeServiceSearch(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.id){
params.param.id = condition.id
}
if(condition.name){
params.param.name = condition.name
}
if(condition.recStatus){
params.param.recStatus = condition.recStatus
}
if(condition.serviceType){
params.param.serviceType = condition.serviceType
}
}
console.log('params',params)
const res = await getInnovativeServiceSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data;
console.log(this.lists);
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
}
};
</script>

Loading…
Cancel
Save