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. 93
      src/components/EntityApply/EntityApplyDate.vue
  6. 90
      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. 64
      src/views/CategoryManage/CategoryManage.vue
  19. 32
      src/views/EntityApplication/EntityApplication.vue
  20. 86
      src/views/EntityApplication/VirtualApplication.vue
  21. 66
      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-dompurify-html": "^2.3.0",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuetify": "^2.4.6",
"vuex": "^3.4.0" "vuex": "^3.4.0"
}, },
"devDependencies": { "devDependencies": {
@ -32,13 +33,15 @@
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"css-loader": "^5.0.1", "css-loader": "^5.0.1",
"deepmerge": "^4.2.2",
"eslint": "^6.7.2", "eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3", "eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^6.2.2",
"less": "^2.7.3", "less": "^2.7.3",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"material-design-icons-iconfont": "^6.1.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass": "^1.26.5", "sass": "^1.32.8",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^3.0.2", "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>

93
src/components/EntityApply/EntityApplyDate.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="main flex-1"> <div class="main flex-1 flex-column">
<div style="width:100%" v-if="lists && lists.length > 0"> <div style="width:100%" v-if="lists && lists.length > 0">
<a-table <a-table
:columns="columns" :columns="columns"
@ -35,10 +35,28 @@
</template> </template>
<template slot="dealStatus" slot-scope="text, record"> <template slot="dealStatus" slot-scope="text, record">
<a-tag <a-tag
:color="record.dealStatus === 2 ? 'green' : record.dealStatus === 1 ? 'red' : 'blue'" :color="record.dealStatus === 2 ? 'green' : record.dealStatus === 1 ? 'red' : 'blue'"
>{{ record.dealStatus === 2 ? '已通过' : record.dealStatus === 1 ? '未通过' : '审核中' }}</a-tag> >{{ record.dealStatus === 2 ? '已通过' : record.dealStatus === 1 ? '未通过' : '审核中' }}</a-tag>
</template> </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 <div
class="d-flex flex-nowrap justify-space-between" class="d-flex flex-nowrap justify-space-between"
@ -46,36 +64,8 @@
slot-scope="record" slot-scope="record"
style="margin: 0" style="margin: 0"
> >
<div class="ml-3">公司介绍:<span v-dompurify-html="record.introduce"></span></div> <detail :record="record" />
<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>
</div> </div>
<!-- 挑战 -->
<template slot="edit">
<a-button class="ml-3" size="small" type="primary">一键挑战</a-button>
</template>
</a-table> </a-table>
</div> </div>
<a-empty v-else /> <a-empty v-else />
@ -83,7 +73,10 @@
</template> </template>
<script> <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 = [ const columns = [
{ {
title: '序号', title: '序号',
@ -99,12 +92,6 @@ const columns = [
dataIndex: 'company', dataIndex: 'company',
key: 'company', key: 'company',
}, },
// {
// title: '',
// align: 'center',
// dataIndex: 'introduce',
// key: 'introduce',
// },
{ {
title: '主营业务', title: '主营业务',
align: 'center', align: 'center',
@ -131,7 +118,7 @@ const columns = [
scopedSlots: { customRender: 'dealStatus' }, scopedSlots: { customRender: 'dealStatus' },
}, },
{ {
title: '挑战', title: '审批',
align: 'center', align: 'center',
dataIndex: 'edit', dataIndex: 'edit',
key: 'edit', key: 'edit',
@ -140,9 +127,10 @@ const columns = [
]; ];
export default { export default {
name: "DemandDate", name: 'DemandDate',
components: { components: {
EditableCellSelect, EditableCellSelect,
Detail,
}, },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
@ -153,7 +141,7 @@ export default {
loading: false, loading: false,
height: '', height: '',
editable: false, editable: false,
} };
}, },
mounted() { mounted() {
@ -178,6 +166,23 @@ export default {
this.dataSource = dataSource; 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> </script>

90
src/components/EntityApply/EntityApplySearch.vue

@ -1,91 +1,85 @@
<template> <template>
<div class="d-flex flex-wrap pb-3"> <div class="d-flex flex-wrap pb-3">
<!-- 企业名称 --> <!-- 企业名称 -->
<a-input <a-input class="mr-3" placeholder="姓名" style="width: 150px" v-model="name" />
<a-input class="mr-3" placeholder="职务" style="width: 150px" v-model="position" />
placeholder="姓名" <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" style="width: 150px"
v-model="name" >
/> <a-select-option
<a-input :key="dealStatus.id"
:value="dealStatus.id"
placeholder="职务" v-for="dealStatus in dealStatuss"
style="width: 150px" >{{ dealStatus.value }}</a-select-option>
v-model="position" </a-select>
/>
<a-input
placeholder="联系电话"
style="width: 150px"
v-model="phone"
/>
<a-input
placeholder="企业/团队"
style="width: 150px"
v-model="company"
/>
处理状态:
<a-select
@change="handleChangeSelect('dealStatus',$event)"
class="ml-3"
style="width: 150px"
allow-clear
>
<a-select-option
:key="dealStatus.id"
:value="dealStatus.id"
v-for="dealStatus in dealStatuss"
>{{ dealStatus.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" icon="search" type="primary">搜索</a-button> <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> </div>
</template> </template>
<script> <script>
import EntityApplyAdd from 'components/EntityApply/EntityApplyAdd.vue';
export default { export default {
name: "DemandSearch", name: 'EntityApplySearch',
components: {
EntityApplyAdd,
},
data() { data() {
return { return {
visible: false,
name: '', name: '',
position: '', position: '',
phone: '', phone: '',
company: '', company: '',
placeType: '1',
dealStatuss: [ dealStatuss: [
{ id:1, value:'审核未通过' }, { id: 1, value: '审核未通过' },
{ id:2, value:'审核通过' }, { id: 2, value: '审核通过' },
], ],
} };
}, },
methods: { methods: {
handleChangeName(value) { handleChangeName(value) {
console.log('value: ', value); console.log('value: ', value);
this.companyName = value; this.companyName = value;
}, },
handleChangeSelect(type, value) { handleChangeSelect(type, value) {
this[type] = value; this[type] = value;
}, },
showModal() {
this.visible = true;
},
closeModal() {
this.visible = false;
},
async handleTableChange() { async handleTableChange() {
const { name, position, phone, company, placeType, dealStatus } = this; const { name, position, phone, company, dealStatus } = this;
console.log(dealStatus) console.log(dealStatus);
// //
const condition = { const condition = {
name, name,
position, position,
phone, phone,
company, company,
placeType,
dealStatus, dealStatus,
}; };
console.log(condition)
await this.$emit('entityApplicationSearch', 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 class="d-flex flex-wrap pb-3">
<!-- 中文名称 --> <!-- 中文名称 -->
<div> <div>
<a-input <a-input placeholder="姓名" style="width: 150px" v-model="name" />
@change="handleChangeChineseName" <a-checkbox-group @change="onChange" class="ml-3">
placeholder="姓名" <a-checkbox :key="item.id" :value="item.id" v-for="item in typeLists">{{ item.name }}</a-checkbox>
style="width: 150px" </a-checkbox-group>
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-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button> <a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div> </div>
@ -35,18 +19,24 @@
</template> </template>
<script> <script>
import InstituteAdd from "components/Institute/InstituteAdd.vue"; import InstituteAdd from 'components/Institute/InstituteAdd.vue';
export default { export default {
name: "InstituteSearch", name: 'InstituteSearch',
components: { components: {
InstituteAdd, InstituteAdd,
}, },
props: { typeLists: { type: Array, default: () => [] } },
data() { data() {
return { return {
visible: false, visible: false,
name: "", name: '',
} moldIds: [],
};
},
created() {
console.log(this.typeLists);
}, },
methods: { methods: {
showModal() { showModal() {
@ -57,33 +47,22 @@ export default {
this.visible = false; this.visible = false;
}, },
handleChangeChineseName(value) { onChange(checkedValues) {
console.log('value: ', value); this.moldIds = checkedValues;
this.chineseName = value; console.log('this.moldIds: ', this.moldIds);
},
handleChangeEnglishName(value) {
console.log('value: ', value);
this.englishName = value;
},
getCategory(value) {
console.log('value: ', value);
this.category = value;
}, },
async handleTableChange() { async handleTableChange() {
console.log('搜索'); console.log('搜索');
const { name} = this; const { name, moldIds } = this;
// //
const condition = { const condition = {
name name,
} };
await this.$emit('getInstituteSearchBack',condition) await this.$emit('getInstituteSearchBack', condition);
}, },
}, },
}; };
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style> <style scoped lang="stylus"></style>

66
src/components/Manage/ManageAdd.vue

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

49
src/components/Manage/ManageDate.vue

@ -22,7 +22,7 @@
</template> </template>
<template slot="edit" slot-scope="text, record"> <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-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-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm> </a-popconfirm>
@ -32,12 +32,12 @@
<a-empty v-else /> <a-empty v-else />
<!-- 编辑 --> <!-- 编辑 -->
<manage-edit :editVisible="editVisible" @closeModal="closeModal" /> <manage-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</div> </div>
</template> </template>
<script> <script>
import ManageEdit from "components/Manage/ManageEdit.vue"; import ManageEdit from 'components/Manage/ManageEdit.vue';
import { selModelDelete } from 'config/api'; import { selModelDelete } from 'config/api';
const columns = [ const columns = [
@ -71,49 +71,45 @@ const columns = [
}, },
]; ];
// const lists = [
// {
// id:'001',
// type:'',
// superiorType: '',
// },
// {
// id:'002',
// type:'绿',
// superiorType: '',
// }
// ];
export default { export default {
name: "ManageDate", name: 'ManageDate',
components: { components: {
ManageEdit, ManageEdit,
}, },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, props: { lists: { type: Array, default: () => [] } },
data() { data() {
return { return {
columns, columns,
loading: false, loading: false,
editingKey: '', editingKey: '',
height: '', height: '',
editVisible: false editItem: null, //
} editVisible: false,
pagination: false,
};
}, },
mounted() { 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: { methods: {
showEditModal(){ showEditModal(record) {
this.editItem = record;
this.editVisible = true; this.editVisible = true;
}, },
async closeModal(){ async closeModal() {
this.editVisible = false; this.editVisible = false;
await this.$emit('selModelSearch'); await this.$emit('selModelSearch');
}, },
@ -127,9 +123,6 @@ export default {
if (code === 200) { if (code === 200) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.$emit('selModelSearch'); this.$emit('selModelSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== id);
// TODO:
} else { } else {
throw msg; throw msg;
} }

73
src/components/Manage/ManageEdit.vue

@ -1,49 +1,55 @@
<template> <template>
<div class="d-flex flex-wrap pb-3"> <div class="d-flex flex-wrap pb-3">
<!-- 编辑 --> <!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px"> <a-modal :closable="false" footer title="修改分类管理" v-model="editVisible" width="700px">
<a-form :form="form" @submit="handleSubmit"> <a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 类型 --> <!-- 类型 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="类型" label="类型"
> >
<a-input <a-select
placeholder="类型" placeholder="类型"
style="width:100%"
v-decorator="[ v-decorator="[
'type', 'model',
{ {
initialValue: editItem.model,
rules: [ rules: [
{ required: true, message: '类型不能为空' }, { 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>
<!-- 上级类型 --> <!-- 分类名称 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="上级类型" label="分类名称"
> >
<a-input <a-input
placeholder="上级类型" placeholder="分类名称"
v-decorator="[ v-decorator="[
'superiorType', 'name',
{ {
initialValue: editItem.name,
rules: [ rules: [
{ required: true, message: '上级类型不能为空' }, { required: true, message: '分类名称不能为空' },
{ whitespace: true, message: '上级类型不能为空' }, { whitespace: true, message: '分类名称不能为空' },
{ max: 140, massage: '上级类型最多140个字符' }, { max: 140, massage: '分类名称最多140个字符' },
], ],
}, },
]" ]"
/> />
</a-form-item> </a-form-item>
<a-form-item class="d-flex flex-row-reverse"> <a-form-item class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button> <a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button> <a-button class="white--text" html-type="submit" type="primary">保存</a-button>
@ -54,6 +60,8 @@
</template> </template>
<script> <script>
import { selModelUpdate } from 'config/api';
const formItemLayout = { const formItemLayout = {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
@ -62,14 +70,19 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } }; const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default { export default {
name: "ManageEdit", name: 'ManageEdit',
props: { editVisible: { type: Boolean, default: false } }, props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
data() { data() {
return { return {
formItemLayout, formItemLayout,
tailItemLayout, tailItemLayout,
form: this.$form.createForm(this, { name: 'manage-add' }), form: this.$form.createForm(this, { name: 'manage-add' }),
} types: [
{ id: 0, name: '成果' },
{ id: 1, name: '仪器' },
{ id: 2, name: '实验室' },
],
};
}, },
methods: { methods: {
@ -79,20 +92,18 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => { this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) { if (!err) {
try { try {
console.log('values: ', values); const params = { param: values };
// const params = this.generateParams(values); params.param.id = this.editItem.id;
// const res = await createTask(params); const res = await selModelUpdate(params);
// const { data, msg, code } = res.data; const { data, msg, code } = res.data;
// // if (code === 200) {
// this.clearCreateTask(); this.$message.success('修改成功');
// this.$emit('closeDialog'); this.$emit('closeModal');
// if (code === 200) { } else {
// this.handleCreateSuccess(params.executorId); throw msg;
// } else { }
// throw msg;
// }
} catch (error) { } 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 class="d-flex flex-wrap pb-3">
<!-- 团队名称 --> <!-- 团队名称 -->
<div> <div>
<a-input <a-input @change="handleChangeName" placeholder="分类名称" style="width: 150px" v-model="name" />
@change="handleChangeName"
placeholder="分类名称"
style="width: 150px"
v-model="name"
/>
类型:
<a-select <a-select
@change="handleChangeSelect('model',$event)" @change="handleChangeSelect('model',$event)"
allow-clear
class="ml-3" class="ml-3"
placeholder="类型"
style="width: 150px" style="width: 150px"
allow-clear
> >
<a-select-option <a-select-option :key="model.id" :value="model.id" v-for="model in models">{{ model.value }}</a-select-option>
:key="model.id"
:value="model.id"
v-for="model in models"
>{{ model.value }}</a-select-option>
</a-select> </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>
<div class="flex-1"></div> <div class="flex-1"></div>
@ -31,7 +22,7 @@
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button> <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> </div>
</template> </template>
@ -48,11 +39,11 @@ export default {
visible: false, visible: false,
name: '', name: '',
models: [ models: [
{ id:0, value:'成果' }, { id: 0, value: '成果' },
{ id:1, value:'仪器' }, { id: 1, value: '仪器' },
{ id:2, value:'实验室' }, { id: 2, value: '实验室' },
], ],
} };
}, },
methods: { methods: {
showModal() { showModal() {
@ -74,13 +65,14 @@ export default {
async handleTableChange() { async handleTableChange() {
console.log('搜索'); console.log('搜索');
const { name,model} = this; const { name, model } = this;
// //
const condition = { const condition = {
name,model name,
} model,
console.log(condition) };
await this.$emit('selModelSearch',condition) 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 class="d-flex flex-wrap pb-3">
<!-- 团队名称 --> <!-- 团队名称 -->
<div> <div>
<a-input placeholder="服务名称" style="width: 150px" v-model="name" />服务类型: <a-input placeholder="服务名称" style="width: 150px" v-model="name" />
<a-select <a-select
@change="handleChangeSelect('serviceType',$event)" @change="handleChangeSelect('serviceType',$event)"
allow-clear allow-clear
class="ml-3" class="ml-3"
placeholder="服务类型"
style="width: 150px" style="width: 150px"
> >
<a-select-option <a-select-option
@ -16,7 +17,7 @@
>{{ serviceType.value }}</a-select-option> >{{ serviceType.value }}</a-select-option>
</a-select> </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>
<div class="flex-1"></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 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); 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 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`); export const getAllTeam = () => axios.post(`${researchTeam}/selectAllTeam`);

2
src/router/index.js

@ -138,7 +138,7 @@ const routes = [
{ {
path: '/virtual-application', path: '/virtual-application',
name: 'VirtualApplication', 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 axios from 'axios';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { getUserId } from 'config/api-user'; import { getUserId } from 'config/api-user';
import { selModelSearch } from 'config/api';
const actions = { const actions = {
/** /**
@ -23,6 +24,25 @@ const actions = {
throw error || '获取个人信息失败'; 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; export default actions;

9
src/store/mutations.js

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

1
src/store/state.js

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

64
src/views/CategoryManage/CategoryManage.vue

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

32
src/views/EntityApplication/EntityApplication.vue

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

66
src/views/InnovativeLab/InnovativeLab.vue

@ -1,34 +1,69 @@
<template> <template>
<div class="pa-3 white fill-height d-flex flex-column"> <div class="pa-3 white fill-height d-flex flex-column">
<institute-search @getInstituteSearchBack="getInstituteSearchBack" /> <institute-search :typeLists="typeLists" @getInstituteSearchBack="getInstituteSearchBack" />
<institute-date :pagination="pagination" :lists="lists" @getInstituteSearchBack="getInstituteSearchBack" /> <institute-date
:lists="lists"
:pagination="pagination"
@getInstituteSearchBack="getInstituteSearchBack"
/>
</div> </div>
</template> </template>
<script> <script>
import InstituteSearch from "components/Institute/InstituteSearch.vue"; import InstituteSearch from 'components/Institute/InstituteSearch.vue';
import InstituteDate from "components/Institute/InstituteDate.vue"; import InstituteDate from 'components/Institute/InstituteDate.vue';
import { getInstituteSearchBack } from "config/api"; import { getInstituteSearchBack } from 'config/api';
import { mapActions } from 'vuex';
export default { export default {
name: "ResourceSharing", name: 'ResourceSharing',
components: { components: {
InstituteSearch, InstituteSearch,
InstituteDate, InstituteDate,
}, },
data(){ data() {
return{ return {
lists: [], lists: [],
pagination: { current: 1, pageSize: 10 }, pagination: { current: 1, pageSize: 10 },
typeLists: [],
}; };
}, },
created() { async created() {
this.getInstituteSearchBack() await this.selModelSearch();
await this.getInstituteSearchBack();
}, },
methods: { 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) { async getInstituteSearchBack(condition) {
try { try {
const params = { const params = {
@ -37,16 +72,14 @@ export default {
pageSize: (condition && condition.pageSize) || 10, pageSize: (condition && condition.pageSize) || 10,
}, },
}; };
if(condition){ if (condition) {
if(condition.name){ if (condition.name) {
params.param.name = condition.name params.param.name = condition.name;
} }
} }
console.log('params',params)
const res = await getInstituteSearchBack(params); const res = await getInstituteSearchBack(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
console.log(data)
this.lists = data.list; this.lists = data.list;
const paper = { ...this.pagination }; const paper = { ...this.pagination };
paper.current = data.pageNum; paper.current = data.pageNum;
@ -61,6 +94,5 @@ export default {
} }
}, },
}, },
}; };
</script> </script>

Loading…
Cancel
Save