6 changed files with 351 additions and 210 deletions
@ -1,166 +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="demandType" slot-scope="text, record"> |
|
||||
<a-tag color="green">{{ record.demandType }}</a-tag> |
|
||||
</template> |
|
||||
|
|
||||
<!-- 提交时间 --> |
|
||||
<template slot="submissionTime" slot-scope="text, record">{{ record.submissionTime }}</template> |
|
||||
|
|
||||
<!-- 处理状态 --> |
|
||||
<template slot="processingStatus" slot-scope="text, record, index"> |
|
||||
<div class="editable-cell d-flex flex-nowrap"> |
|
||||
<a-badge status="success" /> |
|
||||
<editable-cell-select |
|
||||
:arr="status" |
|
||||
:text="record.processingStatus" |
|
||||
@change="onCellChange(index, 'processingStatus', $event)" |
|
||||
/> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<!-- 挑战 --> |
|
||||
<template slot="edit"> |
|
||||
<a-button class="ml-3" size="small" type="primary">一键挑战</a-button> |
|
||||
</template> |
|
||||
</a-table> |
|
||||
</div> |
|
||||
<a-empty v-else /> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
import EditableCellSelect from "components/EditableCellSelect/EditableCellSelect.vue"; |
|
||||
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: 'contacts', |
|
||||
key: 'contacts', |
|
||||
}, |
|
||||
{ |
|
||||
title: '联系方式', |
|
||||
align: 'center', |
|
||||
dataIndex: 'phone', |
|
||||
key: 'phone', |
|
||||
}, |
|
||||
{ |
|
||||
title: '需求类型', |
|
||||
align: 'center', |
|
||||
dataIndex: 'demandType', |
|
||||
key: 'demandType', |
|
||||
scopedSlots: { customRender: 'demandType' }, |
|
||||
}, |
|
||||
{ |
|
||||
title: '需求描述', |
|
||||
align: 'center', |
|
||||
dataIndex: 'requirementDescription', |
|
||||
key: 'requirementDescription', |
|
||||
}, |
|
||||
{ |
|
||||
title: '提交时间', |
|
||||
align: 'center', |
|
||||
dataIndex: 'submissionTime', |
|
||||
key: 'submissionTime', |
|
||||
scopedSlots: { customRender: 'submissionTime' }, |
|
||||
}, |
|
||||
{ |
|
||||
title: '处理状态', |
|
||||
align: 'center', |
|
||||
dataIndex: 'processingStatus', |
|
||||
key: 'processingStatus', |
|
||||
scopedSlots: { customRender: 'processingStatus' }, |
|
||||
}, |
|
||||
{ |
|
||||
title: '挑战', |
|
||||
align: 'center', |
|
||||
dataIndex: 'edit', |
|
||||
key: 'edit', |
|
||||
scopedSlots: { customRender: 'edit' }, |
|
||||
}, |
|
||||
]; |
|
||||
|
|
||||
export default { |
|
||||
name: "DemandDate", |
|
||||
components: { |
|
||||
EditableCellSelect, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
columns, |
|
||||
loading: false, |
|
||||
height: '', |
|
||||
lists:[ |
|
||||
{ |
|
||||
id:'001', |
|
||||
name:'传控科技', |
|
||||
contacts: 'zhou', |
|
||||
phone:'15212352621', |
|
||||
demandType:'技术', |
|
||||
requirementDescription:'张三', |
|
||||
submissionTime: '2020-11-17 18:00', |
|
||||
processingStatus:'处理中' |
|
||||
}, |
|
||||
{ |
|
||||
id:'002', |
|
||||
name:'中绿环保', |
|
||||
contacts: 'lili', |
|
||||
phone:'15254256202', |
|
||||
demandType:'技术', |
|
||||
requirementDescription:'李四', |
|
||||
submissionTime: '2020-11-17 8:00', |
|
||||
processingStatus:'处理中' |
|
||||
} |
|
||||
], |
|
||||
status:[{id:1,name:'待处理'},{id:2,name:'处理中'},{id:3,name:'已处理'}], |
|
||||
editable: false, |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mounted() { |
|
||||
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; |
|
||||
}, |
|
||||
|
|
||||
methods: { |
|
||||
onCellChange(key, dataIndex, value) { |
|
||||
console.log('key, dataIndex, value: ', key, dataIndex, value); |
|
||||
const dataSource = [...this.dataSource]; |
|
||||
const target = dataSource.find(item => item.key === key); |
|
||||
if (target) { |
|
||||
target[dataIndex] = value; |
|
||||
this.dataSource = dataSource; |
|
||||
} |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style scoped lang="stylus"></style> |
|
@ -1,37 +0,0 @@ |
|||||
<template> |
|
||||
<div class="d-flex flex-wrap pb-3"> |
|
||||
<!-- 企业名称 --> |
|
||||
<a-input |
|
||||
@change="handleChangeName" |
|
||||
placeholder="企业名称" |
|
||||
style="width: 150px" |
|
||||
v-model="companyName" |
|
||||
/> |
|
||||
|
|
||||
<a-button @click="handleTableChange" class="mx-2" icon="search" type="primary">搜索</a-button> |
|
||||
</div> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
name: "DemandSearch", |
|
||||
data() { |
|
||||
return { |
|
||||
companyName: '' |
|
||||
} |
|
||||
}, |
|
||||
methods: { |
|
||||
handleChangeName(value) { |
|
||||
console.log('value: ', value); |
|
||||
this.companyName = value; |
|
||||
}, |
|
||||
|
|
||||
handleTableChange() { |
|
||||
console.log('搜索'); |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|
||||
<style scoped lang="stylus"></style> |
|
@ -0,0 +1,185 @@ |
|||||
|
<template> |
||||
|
<div class="main flex-1"> |
||||
|
<div style="width:100%" v-if="lists && lists.length > 0"> |
||||
|
<a-table |
||||
|
:columns="columns" |
||||
|
:data-source="lists" |
||||
|
:loading="loading" |
||||
|
:row-key="record => record.id" |
||||
|
:scroll="{ y: height }" |
||||
|
bordered |
||||
|
class="white" |
||||
|
> |
||||
|
<template slot="id" slot-scope="text, record, index"> |
||||
|
<span>{{ index + 1 }}</span> |
||||
|
</template> |
||||
|
|
||||
|
<!-- 需求类型 --> |
||||
|
<template slot="demandType" slot-scope="text, record"> |
||||
|
<a-tag color="green">{{ record.demandType }}</a-tag> |
||||
|
</template> |
||||
|
|
||||
|
<!-- 提交时间 --> |
||||
|
<template slot="submissionTime" slot-scope="text, record">{{ record.submissionTime }}</template> |
||||
|
|
||||
|
<!-- 处理状态 --> |
||||
|
<template slot="processingStatus" slot-scope="text, record, index"> |
||||
|
<div class="editable-cell d-flex flex-nowrap"> |
||||
|
<a-badge status="success" /> |
||||
|
<editable-cell-select |
||||
|
:arr="status" |
||||
|
:text="record.processingStatus" |
||||
|
@change="onCellChange(index, 'processingStatus', $event)" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<template slot="dealStatus" slot-scope="text, record"> |
||||
|
<a-tag |
||||
|
:color="record.dealStatus === 2 ? 'green' : record.dealStatus === 1 ? 'red' : 'blue'" |
||||
|
>{{ record.dealStatus === 2 ? '已通过' : record.dealStatus === 1 ? '未通过' : '审核中' }}</a-tag> |
||||
|
</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> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 挑战 --> |
||||
|
<template slot="edit"> |
||||
|
<a-button class="ml-3" size="small" type="primary">一键挑战</a-button> |
||||
|
</template> |
||||
|
</a-table> |
||||
|
</div> |
||||
|
<a-empty v-else /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import EditableCellSelect from "components/EditableCellSelect/EditableCellSelect.vue"; |
||||
|
const columns = [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
align: 'center', |
||||
|
dataIndex: 'id', |
||||
|
key: 'id', |
||||
|
width: '7%', |
||||
|
scopedSlots: { customRender: 'id' }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '企业名称', |
||||
|
align: 'center', |
||||
|
dataIndex: 'company', |
||||
|
key: 'company', |
||||
|
}, |
||||
|
// { |
||||
|
// title: '公司介绍', |
||||
|
// align: 'center', |
||||
|
// dataIndex: 'introduce', |
||||
|
// key: 'introduce', |
||||
|
// }, |
||||
|
{ |
||||
|
title: '主营业务', |
||||
|
align: 'center', |
||||
|
dataIndex: 'mainBusiness', |
||||
|
key: 'mainBusiness', |
||||
|
}, |
||||
|
{ |
||||
|
title: '联系人', |
||||
|
align: 'center', |
||||
|
dataIndex: 'name', |
||||
|
key: 'name', |
||||
|
}, |
||||
|
{ |
||||
|
title: '电话', |
||||
|
align: 'center', |
||||
|
dataIndex: 'phone', |
||||
|
key: 'phone', |
||||
|
}, |
||||
|
{ |
||||
|
title: '处理状态', |
||||
|
align: 'center', |
||||
|
dataIndex: 'dealStatus', |
||||
|
key: 'dealStatus', |
||||
|
scopedSlots: { customRender: 'dealStatus' }, |
||||
|
}, |
||||
|
{ |
||||
|
title: '挑战', |
||||
|
align: 'center', |
||||
|
dataIndex: 'edit', |
||||
|
key: 'edit', |
||||
|
scopedSlots: { customRender: 'edit' }, |
||||
|
}, |
||||
|
]; |
||||
|
|
||||
|
export default { |
||||
|
name: "DemandDate", |
||||
|
components: { |
||||
|
EditableCellSelect, |
||||
|
}, |
||||
|
|
||||
|
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
columns, |
||||
|
loading: false, |
||||
|
height: '', |
||||
|
editable: false, |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
let th = 250; |
||||
|
let wh = window.innerHeight; |
||||
|
this.height = wh - th; |
||||
|
window.onresize = () => { |
||||
|
return (() => { |
||||
|
wh = window.innerHeight; |
||||
|
this.height = wh - th; |
||||
|
})(); |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
onCellChange(key, dataIndex, value) { |
||||
|
console.log('key, dataIndex, value: ', key, dataIndex, value); |
||||
|
const dataSource = [...this.dataSource]; |
||||
|
const target = dataSource.find(item => item.key === key); |
||||
|
if (target) { |
||||
|
target[dataIndex] = value; |
||||
|
this.dataSource = dataSource; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="stylus"></style> |
@ -0,0 +1,95 @@ |
|||||
|
<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-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> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: "DemandSearch", |
||||
|
data() { |
||||
|
return { |
||||
|
name: '', |
||||
|
position: '', |
||||
|
phone: '', |
||||
|
company: '', |
||||
|
placeType: '1', |
||||
|
dealStatuss: [ |
||||
|
{ id:1, value:'审核未通过' }, |
||||
|
{ id:2, value:'审核通过' }, |
||||
|
], |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
handleChangeName(value) { |
||||
|
console.log('value: ', value); |
||||
|
this.companyName = value; |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
handleChangeSelect(type, value) { |
||||
|
this[type] = value; |
||||
|
}, |
||||
|
|
||||
|
async handleTableChange() { |
||||
|
const { name, position, phone, company, placeType, dealStatus } = this; |
||||
|
console.log(dealStatus) |
||||
|
// 传参 |
||||
|
const condition = { |
||||
|
name, |
||||
|
position, |
||||
|
phone, |
||||
|
company, |
||||
|
placeType, |
||||
|
dealStatus, |
||||
|
}; |
||||
|
console.log(condition) |
||||
|
await this.$emit('entityApplicationSearch', condition); |
||||
|
console.log('搜索'); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<!-- Add "scoped" attribute to limit CSS to this component only --> |
||||
|
<style scoped lang="stylus"></style> |
@ -1,20 +1,80 @@ |
|||||
<template> |
<template> |
||||
<div class="pa-3 white fill-height d-flex flex-column"> |
<div class="pa-3 white fill-height d-flex flex-column"> |
||||
<demand-search /> |
<entity-apply-search @entityApplicationSearch="entityApplicationSearch" /> |
||||
<demand-date /> |
<entity-apply-date :lists="lists" :pagination="pagination" @entityApplicationSearch="entityApplicationSearch" /> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
// @ is an alias to /src |
// @ is an alias to /src |
||||
import DemandSearch from "components/Demand/DemandSearch.vue"; |
import EntityApplySearch from "components/EntityApply/EntityApplySearch.vue"; |
||||
import DemandDate from "components/Demand/DemandDate.vue"; |
import EntityApplyDate from "components/EntityApply/EntityApplyDate.vue"; |
||||
|
import { entityApplicationSearch } from 'config/api'; |
||||
|
|
||||
export default { |
export default { |
||||
name: "Home", |
name: "Home", |
||||
components: { |
components: { |
||||
DemandSearch, |
EntityApplySearch, |
||||
DemandDate |
EntityApplyDate |
||||
} |
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
lists: [], |
||||
|
pagination: { current: 1, pageSize: 10 }, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
this.entityApplicationSearch(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
async entityApplicationSearch(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; |
||||
|
} |
||||
|
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.placeType) { |
||||
|
params.param.placeType = condition.placeType; |
||||
|
} |
||||
|
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> |
</script> |
||||
|
Loading…
Reference in new issue