Browse Source

分类管理接口对接

master
lucky 4 years ago
parent
commit
9f306f570a
  1. 16285
      package-lock.json
  2. 5
      package.json
  3. 140
      src/components/EntityApply/Detail.vue
  4. 284
      src/components/EntityApply/EntityApplyAdd.vue
  5. 85
      src/components/EntityApply/EntityApplyDate.vue
  6. 70
      src/components/EntityApply/EntityApplySearch.vue
  7. 63
      src/components/Institute/InstituteSearch.vue
  8. 66
      src/components/Manage/ManageAdd.vue
  9. 49
      src/components/Manage/ManageDate.vue
  10. 73
      src/components/Manage/ManageEdit.vue
  11. 40
      src/components/Manage/ManageSearch.vue
  12. 5
      src/components/innovativeService/innovativeServiceSearch.vue
  13. 12
      src/config/api.js
  14. 2
      src/router/index.js
  15. 20
      src/store/actions.js
  16. 9
      src/store/mutations.js
  17. 1
      src/store/state.js
  18. 50
      src/views/CategoryManage/CategoryManage.vue
  19. 32
      src/views/EntityApplication/EntityApplication.vue
  20. 86
      src/views/EntityApplication/VirtualApplication.vue
  21. 64
      src/views/InnovativeLab/InnovativeLab.vue

16285
package-lock.json

File diff suppressed because it is too large

5
package.json

@ -18,6 +18,7 @@
"vue-dompurify-html": "^2.3.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.2.0",
"vuetify": "^2.4.6",
"vuex": "^3.4.0"
},
"devDependencies": {
@ -32,13 +33,15 @@
"babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.11.0",
"css-loader": "^5.0.1",
"deepmerge": "^4.2.2",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"less": "^2.7.3",
"less-loader": "^4.1.0",
"material-design-icons-iconfont": "^6.1.0",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass": "^1.32.8",
"sass-loader": "^8.0.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",

140
src/components/EntityApply/Detail.vue

@ -0,0 +1,140 @@
<template>
<div style="width:100%" v-if="record">
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">成立时间</span>
{{ record.buildTime }}
</div>
<div class="flex-1">
<span class="font-bold-14">营业收入</span>
{{ record.businessIncome }}
</div>
<div class="flex-1">
<span class="font-bold-14">集成电路布图设计</span>
{{ record.electricDesign }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">电子邮箱</span>
{{ record.email }}
</div>
<div class="flex-1">
<span class="font-bold-14">合作单位</span>
{{ record.friendCompany }}
</div>
<div class="flex-1">
<span class="font-bold-14">性别</span>
{{ record.gender }}
</div>
<!--性别0-1--->
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">身份证号</span>
{{ record.idCard }}
</div>
<div class="flex-1">
<span class="font-bold-14">大专以上人员</span>
{{ record.juniorCollege }}
</div>
<div class="flex-1">
<span class="font-bold-14">法人代码</span>
{{ record.legalPerson }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">主营业务</span>
{{ record.mainBusiness }}
</div>
<div class="flex-1">
<span class="font-bold-14">申请专利数</span>
{{ record.patentApply }}
</div>
<div class="flex-1">
<span class="font-bold-14">专利授权数</span>
{{ record.patentGrented }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">发明专利数</span>
{{ record.patentInvent }}
</div>
<div class="flex-1">
<span class="font-bold-14">申请入驻场地类型</span>
{{ record.placeType }}
</div>
<!--申请入驻场地类型 0-虚拟1-实体-->
<div class="flex-1">
<span class="font-bold-14">动植物新品种</span>
{{ record.plantKind }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">职务</span>
{{ record.position }}
</div>
<div class="flex-1">
<span class="font-bold-14">产品阶段</span>
{{ record.productTech }}
</div>
<!--产品阶段 0-创意阶段 1-研发阶段 2-转化阶段 3-原型样品 4-产业化开发-->
<div class="flex-1">
<span class="font-bold-14">注册资金</span>
{{ record.registerMoney }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">现注册地址</span>
{{ record.registerSite }}
</div>
<div class="flex-1">
<span class="font-bold-14">研发人员</span>
{{ record.resarchStaff }}
</div>
<div class="flex-1">
<span class="font-bold-14">软件著作权</span>
{{ record.softwareRegister }}
</div>
</div>
<div class="d-flex flex-nowrap mb-3">
<div class="flex-1">
<span class="font-bold-14">员工人数</span>
{{ record.staffCount }}
</div>
<div class="flex-2">
<span class="font-bold-14">文件</span>
<span v-if="record.list && record.list.length>0">{{ record.list }}</span>
<span v-else>暂无</span>
</div>
</div>
<div>
<span class="font-bold-14">公司介绍</span>
<span v-dompurify-html="record.introduce"></span>
</div>
</div>
</template>
<script>
export default {
name: 'Detail',
props: { record: { type: Object, default: () => {} } },
data() {
return {};
},
methods: {},
};
</script>
<style scoped lang="stylus"></style>

284
src/components/EntityApply/EntityApplyAdd.vue

@ -0,0 +1,284 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" 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="标题"
>
<a-input
placeholder="标题"
v-decorator="[
'title',
{
rules: [
{ 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="地点"
>
<a-input
placeholder="地点"
v-decorator="[
'address',
{
rules: [
{ 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="时间"
required
>
<a-range-picker
@change="onChange"
format="YYYY-MM-DD HH:mm:ss"
show-time
style="width:100%"
/>
</a-form-item>
<!-- 活动类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="活动类型"
>
<a-select @change="changeType" placeholder="活动类型" style="width:100%">
<a-select-option
:key="index"
:value="category.id"
v-for="(category, index) in types"
>{{ category.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 主讲人 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主讲人"
>
<a-input
placeholder="主讲人"
v-decorator="[
'name',
{
rules: [
{ 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="组织单位"
>
<a-input
placeholder="组织单位"
v-decorator="[
'organization'
]"
/>
</a-form-item>
<!-- 其他事宜 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="其他事宜"
>
<a-input
placeholder="其他事宜"
v-decorator="[
'other'
]"
/>
</a-form-item>
<!-- 会议主题 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="会议主题"
>
<a-input
placeholder="会议主题"
v-decorator="[
'theme'
]"
/>
</a-form-item>
<!-- 培训对象 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="培训对象"
>
<a-input
placeholder="培训对象"
v-decorator="[
'trainees'
]"
/>
</a-form-item>
<!-- 报名方式 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="报名方式"
>
<a-input
placeholder="报名方式"
v-decorator="[
'way'
]"
/>
</a-form-item>
<!-- 活动结束内容 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="活动结束内容"
>
<a-textarea
placeholder="活动结束内容"
v-decorator="[
'endContent',
]"
/>
</a-form-item>
<!-- 详情 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="详情"
required
>
<quill-editor :max-size="maxSize" :placeholder="placeholder" @changeInput="changeInput" />
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { handleApplyBackend } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: 'EntityApplyAdd',
props: { visible: { type: Boolean, default: false } },
components: { QuillEditor },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'activity-add' }),
types: [
{ id: 0, name: '路演' },
{ id: 1, name: '沙龙' },
{ id: 2, name: '论坛' },
],
activityType: '',
maxSize: 2048,
content: '',
placeholder: '请输入...',
releaseTime: '', //
closeTime: '', //
};
},
methods: {
//
changeType(value) {
console.log('value: ', value);
this.activityType = value;
},
//
onChange(dates, dateStrings) {
console.log('From: ', dates[0], ', to: ', dates[1]);
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
this.releaseTime = dateStrings[0];
this.closeTime = dateStrings[1];
},
//
changeInput(value) {
this.content = value;
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
const { releaseTime, closeTime, content, activityType } = this;
const params = { param: values };
params.param.releaseTime = releaseTime;
params.param.closeTime = closeTime;
params.param.content = content;
params.param.activityType = activityType;
console.log('params: ', params);
const res = await handleApplyBackend(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('添加成功');
this.$emit('closeModal');
} else {
this.$emit('closeModal');
throw msg;
}
} catch (error) {
this.$message.error(error || '添加失败');
}
}
});
},
},
};
</script>
<style scoped lang="stylus"></style>

85
src/components/EntityApply/EntityApplyDate.vue

@ -1,5 +1,5 @@
<template>
<div class="main flex-1">
<div class="main flex-1 flex-column">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
@ -40,42 +40,32 @@
>{{ record.dealStatus === 2 ? '已通过' : record.dealStatus === 1 ? '未通过' : '审核中' }}</a-tag>
</template>
<!-- 审批 -->
<template slot="edit" slot-scope="text, record">
<a-button
@click="handleApply(record.id, 2)"
class="ml-3"
size="small"
type="primary"
v-if="record.dealStatus === 1"
>通过</a-button>
<a-button
@click="handleApply(record.id, 1)"
class="ml-3"
size="small"
type="danger"
v-if="record.dealStatus === 2"
>不通过</a-button>
</template>
<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.introduce"></span></div>
<div class="ml-3">成立时间:{{ record.buildTime }}</div>
<div class="ml-3">营业收入:{{ record.businessIncome }}</div>
<div class="ml-3">集成电路布图设计:{{ record.electricDesign }}</div>
<div class="ml-3">电子邮箱:{{ record.email }}</div>
<div class="ml-3">合作单位:{{ record.friendCompany }}</div>
<div class="ml-3">性别:{{ record.gender }}</div> <!--性别0-1--->
<div class="ml-3">身份证号:{{ record.idCard }}</div>
<div class="ml-3">大专以上人员:{{ record.juniorCollege }}</div>
<div class="ml-3">法人代码:{{ record.legalPerson }}</div>
<div class="ml-3">主营业务:{{ record.mainBusiness }}</div>
<div class="ml-3">申请专利数:{{ record.patentApply }}</div>
<div class="ml-3">专利授权数:{{ record.patentGrented }}</div>
<div class="ml-3">发明专利数:{{ record.patentInvent }}</div>
<div class="ml-3">申请入驻场地类型:{{ record.placeType }}</div><!--申请入驻场地类型 0-虚拟1-实体-->
<div class="ml-3">动植物新品种:{{ record.plantKind }}</div>
<div class="ml-3">职务:{{ record.position }}</div>
<div class="ml-3">产品阶段:{{ record.productTech }}</div><!--产品阶段 0-创意阶段 1-研发阶段 2-转化阶段 3-原型样品 4-产业化开发-->
<div class="ml-3">注册资金:{{ record.registerMoney }}</div>
<div class="ml-3">现注册地址:{{ record.registerSite }}</div>
<div class="ml-3">研发人员:{{ record.resarchStaff }}</div>
<div class="ml-3">软件著作权:{{ record.softwareRegister }}</div>
<div class="ml-3">员工人数:{{ record.staffCount }}</div>
<div class="ml-3">文件:{{ record.list }}</div>
<detail :record="record" />
</div>
<!-- 挑战 -->
<template slot="edit">
<a-button class="ml-3" size="small" type="primary">一键挑战</a-button>
</template>
</a-table>
</div>
<a-empty v-else />
@ -83,7 +73,10 @@
</template>
<script>
import EditableCellSelect from "components/EditableCellSelect/EditableCellSelect.vue";
import EditableCellSelect from 'components/EditableCellSelect/EditableCellSelect.vue';
import Detail from 'components/EntityApply/Detail.vue';
import { changeStatus } from 'config/api';
const columns = [
{
title: '序号',
@ -99,12 +92,6 @@ const columns = [
dataIndex: 'company',
key: 'company',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'introduce',
// key: 'introduce',
// },
{
title: '主营业务',
align: 'center',
@ -131,7 +118,7 @@ const columns = [
scopedSlots: { customRender: 'dealStatus' },
},
{
title: '挑战',
title: '审批',
align: 'center',
dataIndex: 'edit',
key: 'edit',
@ -140,9 +127,10 @@ const columns = [
];
export default {
name: "DemandDate",
name: 'DemandDate',
components: {
EditableCellSelect,
Detail,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
@ -153,7 +141,7 @@ export default {
loading: false,
height: '',
editable: false,
}
};
},
mounted() {
@ -178,6 +166,23 @@ export default {
this.dataSource = dataSource;
}
},
//
async handleApply(id, dealStatus) {
try {
const params = { param: { id, dealStatus } };
const res = await changeStatus(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('审核成功');
this.$emit('entityApplicationSearch');
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '审核失败');
}
},
},
};
</script>

70
src/components/EntityApply/EntityApplySearch.vue

@ -1,36 +1,16 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 企业名称 -->
<a-input
placeholder="姓名"
style="width: 150px"
v-model="name"
/>
<a-input
placeholder="职务"
style="width: 150px"
v-model="position"
/>
<a-input
placeholder="联系电话"
style="width: 150px"
v-model="phone"
/>
<a-input
placeholder="企业/团队"
style="width: 150px"
v-model="company"
/>
处理状态:
<a-input class="mr-3" placeholder="姓名" style="width: 150px" v-model="name" />
<a-input class="mr-3" placeholder="职务" style="width: 150px" v-model="position" />
<a-input class="mr-3" placeholder="联系电话" style="width: 150px" v-model="phone" />
<a-input class="mr-3" placeholder="企业/团队" style="width: 150px" v-model="company" />
<a-select
@change="handleChangeSelect('dealStatus',$event)"
allow-clear
class="ml-3"
placeholder="处理状态"
style="width: 150px"
allow-clear
>
<a-select-option
:key="dealStatus.id"
@ -39,26 +19,36 @@
>{{ dealStatus.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" icon="search" type="primary">搜索</a-button>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button>
<!-- 添加 -->
<entity-apply-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import EntityApplyAdd from 'components/EntityApply/EntityApplyAdd.vue';
export default {
name: "DemandSearch",
name: 'EntityApplySearch',
components: {
EntityApplyAdd,
},
data() {
return {
visible: false,
name: '',
position: '',
phone: '',
company: '',
placeType: '1',
dealStatuss: [
{ id:1, value:'审核未通过' },
{ id:2, value:'审核通过' },
{ id: 1, value: '审核未通过' },
{ id: 2, value: '审核通过' },
],
}
};
},
methods: {
handleChangeName(value) {
@ -66,26 +56,30 @@ export default {
this.companyName = value;
},
handleChangeSelect(type, value) {
this[type] = value;
},
showModal() {
this.visible = true;
},
closeModal() {
this.visible = false;
},
async handleTableChange() {
const { name, position, phone, company, placeType, dealStatus } = this;
console.log(dealStatus)
const { name, position, phone, company, dealStatus } = this;
console.log(dealStatus);
//
const condition = {
name,
position,
phone,
company,
placeType,
dealStatus,
};
console.log(condition)
await this.$emit('entityApplicationSearch', condition);
console.log('搜索');
},
},
};

63
src/components/Institute/InstituteSearch.vue

@ -2,26 +2,10 @@
<div class="d-flex flex-wrap pb-3">
<!-- 中文名称 -->
<div>
<a-input
@change="handleChangeChineseName"
placeholder="姓名"
style="width: 150px"
v-model="name"
/>
<!-- <a-input
@change="handleChangeEnglishName"
class="ml-3"
placeholder="英文名称"
style="width: 150px"
v-model="englishName"
/>
<a-select @change="getCategory" 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> -->
<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>
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
@ -35,18 +19,24 @@
</template>
<script>
import InstituteAdd from "components/Institute/InstituteAdd.vue";
import InstituteAdd from 'components/Institute/InstituteAdd.vue';
export default {
name: "InstituteSearch",
name: 'InstituteSearch',
components: {
InstituteAdd,
},
props: { typeLists: { type: Array, default: () => [] } },
data() {
return {
visible: false,
name: "",
}
name: '',
moldIds: [],
};
},
created() {
console.log(this.typeLists);
},
methods: {
showModal() {
@ -57,33 +47,22 @@ export default {
this.visible = false;
},
handleChangeChineseName(value) {
console.log('value: ', value);
this.chineseName = value;
},
handleChangeEnglishName(value) {
console.log('value: ', value);
this.englishName = value;
},
getCategory(value) {
console.log('value: ', value);
this.category = value;
onChange(checkedValues) {
this.moldIds = checkedValues;
console.log('this.moldIds: ', this.moldIds);
},
async handleTableChange() {
console.log('搜索');
const { name} = this;
const { name, moldIds } = this;
//
const condition = {
name
}
await this.$emit('getInstituteSearchBack',condition)
name,
};
await this.$emit('getInstituteSearchBack', condition);
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

66
src/components/Manage/ManageAdd.vue

@ -1,7 +1,7 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<a-modal :closable="false" footer title="添加分类管理" v-model="visible" width="700px">
<a-form :form="form" @submit="handleSubmit">
<!-- 类型 -->
<a-form-item
@ -9,35 +9,40 @@
:wrapper-col="formItemLayout.wrapperCol"
label="类型"
>
<a-input
<a-select
placeholder="类型"
style="width:100%"
v-decorator="[
'type',
'model',
{
rules: [
{ required: true, message: '类型不能为空' },
{ whitespace: true, message: '类型不能为空' },
{ max: 140, massage: '类型最多140个字符' },
],
},
]"
/>
>
<a-select-option
:key="index"
:value="item.id"
v-for="(item, index) in types"
>{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 上级类型 -->
<!-- 分类名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上级类型"
label="分类名称"
>
<a-input
placeholder="上级类型"
placeholder="分类名称"
v-decorator="[
'superiorType',
'name',
{
rules: [
{ required: true, message: '上级类型不能为空' },
{ whitespace: true, message: '上级类型不能为空' },
{ max: 140, massage: '上级类型最多140个字符' },
{ required: true, message: '分类名称不能为空' },
{ whitespace: true, message: '分类名称不能为空' },
{ max: 140, massage: '分类名称最多140个字符' },
],
},
]"
@ -54,6 +59,8 @@
</template>
<script>
import { selModelAdd } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
@ -62,14 +69,19 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ManageAdd",
name: 'ManageAdd',
props: { visible: { type: Boolean, default: false } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'manage-add' }),
}
types: [
{ id: 0, name: '成果' },
{ id: 1, name: '仪器' },
{ id: 2, name: '实验室' },
],
};
},
methods: {
@ -79,20 +91,18 @@ 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 params = { param: values };
const res = await selModelAdd(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('添加成功');
this.$emit('closeModal');
this.$emit('handleTableChange');
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$message.error(error || '添加失败');
}
}
});

49
src/components/Manage/ManageDate.vue

@ -22,7 +22,7 @@
</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>
@ -32,12 +32,12 @@
<a-empty v-else />
<!-- 编辑 -->
<manage-edit :editVisible="editVisible" @closeModal="closeModal" />
<manage-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import ManageEdit from "components/Manage/ManageEdit.vue";
import ManageEdit from 'components/Manage/ManageEdit.vue';
import { selModelDelete } from 'config/api';
const columns = [
@ -71,49 +71,45 @@ const columns = [
},
];
// const lists = [
// {
// id:'001',
// type:'',
// superiorType: '',
// },
// {
// id:'002',
// type:'绿',
// superiorType: '',
// }
// ];
export default {
name: "ManageDate",
name: 'ManageDate',
components: {
ManageEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
props: { lists: { type: Array, default: () => [] } },
data() {
return {
columns,
loading: false,
editingKey: '',
height: '',
editVisible: false
}
editItem: null, //
editVisible: false,
pagination: false,
};
},
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
let th = 150;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {
showEditModal(){
showEditModal(record) {
this.editItem = record;
this.editVisible = true;
},
async closeModal(){
async closeModal() {
this.editVisible = false;
await this.$emit('selModelSearch');
},
@ -127,9 +123,6 @@ export default {
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;
}

73
src/components/Manage/ManageEdit.vue

@ -1,49 +1,55 @@
<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" 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="类型"
>
<a-input
<a-select
placeholder="类型"
style="width:100%"
v-decorator="[
'type',
'model',
{
initialValue: editItem.model,
rules: [
{ required: true, message: '类型不能为空' },
{ whitespace: true, message: '类型不能为空' },
{ max: 140, massage: '类型最多140个字符' },
],
},
]"
/>
>
<a-select-option
:key="index"
:value="item.id"
v-for="(item, index) in types"
>{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
<!-- 上级类型 -->
<!-- 分类名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上级类型"
label="分类名称"
>
<a-input
placeholder="上级类型"
placeholder="分类名称"
v-decorator="[
'superiorType',
'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 class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button>
@ -54,6 +60,8 @@
</template>
<script>
import { selModelUpdate } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
@ -62,14 +70,19 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ManageEdit",
props: { editVisible: { type: Boolean, default: false } },
name: 'ManageEdit',
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'manage-add' }),
}
types: [
{ id: 0, name: '成果' },
{ id: 1, name: '仪器' },
{ id: 2, name: '实验室' },
],
};
},
methods: {
@ -79,20 +92,18 @@ 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 params = { param: values };
params.param.id = this.editItem.id;
const res = await selModelUpdate(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('修改成功');
this.$emit('closeModal');
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '添加研发团队失败');
this.$message.error(error || '修改失败');
}
}
});

40
src/components/Manage/ManageSearch.vue

@ -2,28 +2,19 @@
<div class="d-flex flex-wrap pb-3">
<!-- 团队名称 -->
<div>
<a-input
@change="handleChangeName"
placeholder="分类名称"
style="width: 150px"
v-model="name"
/>
<a-input @change="handleChangeName" placeholder="分类名称" style="width: 150px" v-model="name" />
类型:
<a-select
@change="handleChangeSelect('model',$event)"
allow-clear
class="ml-3"
placeholder="类型"
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-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>
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
@ -31,7 +22,7 @@
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<manage-add :visible="visible" @closeModal="closeModal" />
<manage-add :visible="visible" @closeModal="closeModal" @handleTableChange="handleTableChange" />
</div>
</template>
@ -48,11 +39,11 @@ export default {
visible: false,
name: '',
models: [
{ id:0, value:'成果' },
{ id:1, value:'仪器' },
{ id:2, value:'实验室' },
{ id: 0, value: '成果' },
{ id: 1, value: '仪器' },
{ id: 2, value: '实验室' },
],
}
};
},
methods: {
showModal() {
@ -74,13 +65,14 @@ export default {
async handleTableChange() {
console.log('搜索');
const { name,model} = this;
const { name, model } = this;
//
const condition = {
name,model
}
console.log(condition)
await this.$emit('selModelSearch',condition)
name,
model,
};
console.log(condition);
await this.$emit('selModelSearch', condition);
},
},
};

5
src/components/innovativeService/innovativeServiceSearch.vue

@ -2,11 +2,12 @@
<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-select
@change="handleChangeSelect('serviceType',$event)"
allow-clear
class="ml-3"
placeholder="服务类型"
style="width: 150px"
>
<a-select-option
@ -16,7 +17,7 @@
>{{ serviceType.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>

12
src/config/api.js

@ -130,6 +130,12 @@ export const selModelSearch = params => axios.post(`${achInstr}/selModel`, param
// 创新部类型删除
export const selModelDelete = params => axios.post(`${achInstr}/deleteModel`, params);
// 创新部类型添加
export const selModelAdd = params => axios.post(`${achInstr}/addModel`, params);
// 创新部类型修改
export const selModelUpdate = params => axios.post(`${achInstr}/updateModel`, params);
// 创新部仪器列表查询
export const selInstrumentSearch = params => axios.post(`${achInstr}/selInstrument`, params);
@ -145,6 +151,12 @@ export const selResDelete = params => axios.post(`${achInstr}/deleteRes`, params
// 孵化部入驻实体列表查询
export const entityApplicationSearch = params => axios.post(`${place}/search`, params);
// 入驻企业申请的处理状态
export const changeStatus = params => axios.post(`${place}/status`, params);
// 入驻企业申请(管理员用)
export const handleApplyBackend = params => axios.post(`${place}/applyBackend`, params);
// 查询所有的研发团队相关信息
export const getAllTeam = () => axios.post(`${researchTeam}/selectAllTeam`);

2
src/router/index.js

@ -138,7 +138,7 @@ const routes = [
{
path: '/virtual-application',
name: 'VirtualApplication',
component: () => import(/* webpackChunkName: "virtual-application" */ 'views/VirtualApplication/VirtualApplication.vue'),
component: () => import(/* webpackChunkName: "virtual-application" */ 'views/EntityApplication/VirtualApplication.vue'),
},
// 服务
{

20
src/store/actions.js

@ -1,6 +1,7 @@
import axios from 'axios';
import { message } from 'ant-design-vue';
import { getUserId } from 'config/api-user';
import { selModelSearch } from 'config/api';
const actions = {
/**
@ -23,6 +24,25 @@ const actions = {
throw error || '获取个人信息失败';
}
},
/**
* 创新部类型列表查询
* @param {any} commit
* @param {object} params 提交的参数
*/
async getSelModelSearch({ commit }, params) {
try {
const res = await selModelSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
return data;
} else {
throw msg;
}
} catch (error) {
throw error || '类型获取失败';
}
},
};
export default actions;

9
src/store/mutations.js

@ -28,6 +28,15 @@ const mutations = {
setPartnerOptions(state, partnerOptions) {
state.partnerOptions = partnerOptions;
},
/**
* 设置实体虚拟申请查询条件
* @param {object} state
* @param {object} placeType
*/
setPlaceType(state, placeType) {
state.placeType = placeType;
},
};
export default mutations;

1
src/store/state.js

@ -2,6 +2,7 @@ const state = {
anyringToken: '',
user: { id: '', phone: '', account: '' },
partnerOptions: null, // 合作伙伴和衍生企业查询条件
placeType: '', // 实体虚拟申请
titles: [
{
value: '关于我们',

50
src/views/CategoryManage/CategoryManage.vue

@ -1,18 +1,17 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<manage-search @selModelSearch="selModelSearch" />
<manage-date :pagination="pagination" :lists="lists" @selModelSearch="selModelSearch" />
<manage-date :lists="lists" @selModelSearch="selModelSearch" />
</div>
</template>
<script>
// @ is an alias to /src
import ManageSearch from "components/Manage/ManageSearch.vue";
import ManageDate from "components/Manage/ManageDate.vue";
import {selModelSearch} from 'config/api';
import ManageSearch from 'components/Manage/ManageSearch.vue';
import ManageDate from 'components/Manage/ManageDate.vue';
import { mapActions } from 'vuex';
export default {
name: "CategoryManage",
name: 'CategoryManage',
components: {
ManageSearch,
ManageDate,
@ -21,54 +20,39 @@ export default {
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.selModelSearch()
this.selModelSearch();
},
methods: {
...mapActions(['getSelModelSearch']),
/**
* 根据团队id查看研发团队相关信息
* @param { String } competeTimeId 第几届信息的id
* 获取分类管理列表
* @param { Number } model 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
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) {
if (condition.model !== '') {
params.param.model = condition.model;
}
if(condition.name){
params.param.name = condition.name
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)
const data = await this.getSelModelSearch(params);
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>

32
src/views/EntityApplication/EntityApplication.vue

@ -1,21 +1,25 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<entity-apply-search @entityApplicationSearch="entityApplicationSearch" />
<entity-apply-date :lists="lists" :pagination="pagination" @entityApplicationSearch="entityApplicationSearch" />
<entity-apply-date
:lists="lists"
:pagination="pagination"
@entityApplicationSearch="entityApplicationSearch"
/>
</div>
</template>
<script>
// @ is an alias to /src
import EntityApplySearch from "components/EntityApply/EntityApplySearch.vue";
import EntityApplyDate from "components/EntityApply/EntityApplyDate.vue";
import EntityApplySearch from 'components/EntityApply/EntityApplySearch.vue';
import EntityApplyDate from 'components/EntityApply/EntityApplyDate.vue';
import { entityApplicationSearch } from 'config/api';
import { mapMutations, mapState } from 'vuex';
export default {
name: "Home",
name: 'Home',
components: {
EntityApplySearch,
EntityApplyDate
EntityApplyDate,
},
data() {
@ -25,18 +29,23 @@ export default {
};
},
created() {
this.entityApplicationSearch();
computed: mapState(['placeType']),
async created() {
this.setPlaceType(1);
await this.entityApplicationSearch();
},
methods: {
...mapMutations(['setPlaceType']),
async entityApplicationSearch(condition) {
try {
const params = {
param: {
placeType: this.placeType,
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
@ -52,9 +61,6 @@ export default {
if (condition.company) {
params.param.company = condition.company;
}
if (condition.placeType) {
params.param.placeType = condition.placeType;
}
if (condition.dealStatus) {
params.param.dealStatus = condition.dealStatus;
}
@ -72,7 +78,7 @@ export default {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error("123");
this.$message.error('123');
}
},
},

86
src/views/EntityApplication/VirtualApplication.vue

@ -0,0 +1,86 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<entity-apply-search @entityApplicationSearch="entityApplicationSearch" />
<entity-apply-date
:lists="lists"
:pagination="pagination"
@entityApplicationSearch="entityApplicationSearch"
/>
</div>
</template>
<script>
import EntityApplySearch from 'components/EntityApply/EntityApplySearch.vue';
import EntityApplyDate from 'components/EntityApply/EntityApplyDate.vue';
import { entityApplicationSearch } from 'config/api';
import { mapMutations, mapState } from 'vuex';
export default {
name: 'VirtualApplication',
components: {
EntityApplySearch,
EntityApplyDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
computed: mapState(['placeType']),
async created() {
this.setPlaceType(0);
await this.entityApplicationSearch();
},
methods: {
...mapMutations(['setPlaceType']),
async entityApplicationSearch(condition) {
try {
const params = {
param: {
placeType: this.placeType,
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
if (condition.position) {
params.param.position = condition.position;
}
if (condition.phone) {
params.param.phone = condition.phone;
}
if (condition.company) {
params.param.company = condition.company;
}
if (condition.dealStatus) {
params.param.dealStatus = condition.dealStatus;
}
}
const res = await entityApplicationSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
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('123');
}
},
},
};
</script>

64
src/views/InnovativeLab/InnovativeLab.vue

@ -1,34 +1,69 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<institute-search @getInstituteSearchBack="getInstituteSearchBack" />
<institute-date :pagination="pagination" :lists="lists" @getInstituteSearchBack="getInstituteSearchBack" />
<institute-search :typeLists="typeLists" @getInstituteSearchBack="getInstituteSearchBack" />
<institute-date
:lists="lists"
:pagination="pagination"
@getInstituteSearchBack="getInstituteSearchBack"
/>
</div>
</template>
<script>
import InstituteSearch from "components/Institute/InstituteSearch.vue";
import InstituteDate from "components/Institute/InstituteDate.vue";
import { getInstituteSearchBack } from "config/api";
import InstituteSearch from 'components/Institute/InstituteSearch.vue';
import InstituteDate from 'components/Institute/InstituteDate.vue';
import { getInstituteSearchBack } from 'config/api';
import { mapActions } from 'vuex';
export default {
name: "ResourceSharing",
name: 'ResourceSharing',
components: {
InstituteSearch,
InstituteDate,
},
data(){
return{
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
typeLists: [],
};
},
created() {
this.getInstituteSearchBack()
async created() {
await this.selModelSearch();
await this.getInstituteSearchBack();
},
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: 2,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
}
const data = await this.getSelModelSearch(params);
this.typeLists = data;
},
/**
* 获取实验室
* @param { Array } moldIds 类型 0成果 1仪器 2实验室
* @param { String } name 分类名称
*/
async getInstituteSearchBack(condition) {
try {
const params = {
@ -37,16 +72,14 @@ export default {
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.name){
params.param.name = condition.name
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;
@ -61,6 +94,5 @@ export default {
}
},
},
};
</script>

Loading…
Cancel
Save