杨豪
3 years ago
13 changed files with 1066 additions and 2 deletions
@ -1,6 +1,6 @@
|
||||
ENV = 'production' |
||||
|
||||
# 接口地址 |
||||
VUE_APP_BASE_API = 'http://www.cyjyyjy.com:8094' |
||||
VUE_APP_BASE_API = 'http://www.cyjyyjy.com:8095' |
||||
VUE_APP_WS_API = 'ws:///127.0.0.1:8001' |
||||
|
||||
|
Binary file not shown.
@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/CooperationMode', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/CooperationMode/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/CooperationMode', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export default { add, edit, del } |
@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/EnterpriseAuthentication', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/EnterpriseAuthentication/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/EnterpriseAuthentication', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function getAuthenticationList(data) { |
||||
return request({ |
||||
url: 'api/EnterpriseAuthentication/getAuthenticationList', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function examineAuthenticationInfo(data) { |
||||
return request({ |
||||
url: '/api/EnterpriseAuthentication/examineAuthenticationInfo ', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export default { add, edit, del , getAuthenticationList, examineAuthenticationInfo } |
@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/Project', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/Project/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/Project', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function getProjectList(data) { |
||||
return request({ |
||||
url: 'api/Project/listProject', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function openProject(data) { |
||||
return request({ |
||||
url: 'api/Project/examineProject?id=' + data, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
export default { add, edit, del , getProjectList, openProject } |
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/Resources', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/Resources/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/Resources', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function getResourceList(data) { |
||||
return request({ |
||||
url: 'api/Resources/listResource', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function examineResources(data) { |
||||
return request({ |
||||
url: 'api/Resources/examineResources', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
|
||||
export default { add, edit, del, getResourceList, examineResources } |
@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request' |
||||
|
||||
export function add(data) { |
||||
return request({ |
||||
url: 'api/ResourcesCagetory', |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export function del(ids) { |
||||
return request({ |
||||
url: 'api/ResourcesCagetory/', |
||||
method: 'delete', |
||||
data: ids |
||||
}) |
||||
} |
||||
|
||||
export function edit(data) { |
||||
return request({ |
||||
url: 'api/ResourcesCagetory', |
||||
method: 'put', |
||||
data |
||||
}) |
||||
} |
||||
|
||||
export default { add, edit, del } |
@ -0,0 +1,257 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
<!-- <crudOperation :permission="permission" /> --> |
||||
<div class="search-box"> |
||||
<el-select v-model="authorizationType" clearable placeholder="认证类型"> |
||||
<el-option |
||||
v-for="item in typeOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select v-model="authenticationState" clearable placeholder="审核状态"> |
||||
<el-option |
||||
v-for="item in stateOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-button type="primary" @click="search">搜索</el-button> |
||||
</div> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="loading" :data="data" size="small" style="width: 100%;" > |
||||
<el-table-column prop="authorizationType" label="认证类型"> |
||||
<template slot-scope="scope"> |
||||
<span>{{scope.row.authorizationType == 1 ? '企业' : '个人'}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="enterpriseId" label="企业id" /> |
||||
<el-table-column prop="applicantId" label="申请人id" /> |
||||
<el-table-column prop="isLegalPerson" label="是否为企业法人"> |
||||
<template slot-scope="scope"> |
||||
<span>{{scope.row.authorizationType == 0 ? '不是' : '是'}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="authorizationPath" label="授权申请书"> |
||||
<template slot-scope="scope"> |
||||
<a :href="scope.row.authorizationPath" style="color: #42b983" target="_blank"> |
||||
<img :src="scope.row.authorizationPath" alt="点击打开" class="el-avatar2"> |
||||
</a> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="enterpriseName" label="企业名称" /> |
||||
<el-table-column prop="creditCode" label="信用代码" /> |
||||
<el-table-column prop="industryId" label="行业id" /> |
||||
<el-table-column prop="enterpriseScale" label="企业规模" /> |
||||
<el-table-column prop="businessLicense" label="营业执照"> |
||||
<template slot-scope="scope"> |
||||
<a :href="scope.row.businessLicense" style="color: #42b983" target="_blank"> |
||||
<img :src="scope.row.businessLicense" alt="点击打开" class="el-avatar2"> |
||||
</a> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="bankAccount" label="对公银行账号" width="100" /> |
||||
<el-table-column prop="bankName" label="银行名称" /> |
||||
<el-table-column prop="bankBranch" label="开户网点" /> |
||||
<el-table-column prop="legalPersonName" label="法人姓名" /> |
||||
<el-table-column prop="legalPersonIdcard" label="身份证号" /> |
||||
<el-table-column prop="idcardPicFront" label="身份证正面"> |
||||
<template slot-scope="scope"> |
||||
<a :href="scope.row.idcardPicFront" style="color: #42b983" target="_blank"> |
||||
<img :src="scope.row.idcardPicFront" alt="点击打开" class="el-avatar2"> |
||||
</a> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="idcardPicBehind" label="身份证背面"> |
||||
<template slot-scope="scope"> |
||||
<a :href="scope.row.idcardPicBehind" style="color: #42b983" target="_blank"> |
||||
<img :src="scope.row.idcardPicBehind" alt="点击打开" class="el-avatar2"> |
||||
</a> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="idcardPicHold" label="手持身份证"> |
||||
<template slot-scope="scope"> |
||||
<a :href="scope.row.idcardPicHold" style="color: #42b983" target="_blank"> |
||||
<img :src="scope.row.idcardPicHold" alt="点击打开" class="el-avatar2"> |
||||
</a> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="authenticationState" label="认证状态"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.authenticationState == 0">未认证</span> |
||||
<span v-if="scope.row.authenticationState == 1">审核中</span> |
||||
<span v-if="scope.row.authenticationState == 2">认证通过</span> |
||||
<span v-if="scope.row.authenticationState == 3">认证失败</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="reason" label="认证失败原因" width="100"> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="150px" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="primary" @click="showDialog(scope.row)">审核</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</div> |
||||
<el-dialog |
||||
title="审核" |
||||
:visible.sync="dialogVisible" |
||||
width="500"> |
||||
<div> |
||||
<el-form :model="authForm" label-width="100px"> |
||||
<el-form-item label="是否通过"> |
||||
<el-radio-group v-model="authForm.type" @change="radioChange"> |
||||
<el-radio :label="1">是</el-radio> |
||||
<el-radio :label="0">否</el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item label="未通过理由" v-show="authForm.type == 0"> |
||||
<el-input type="textarea" v-model="authForm.reason"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
<div slot="footer"> |
||||
<el-button @click="dialogVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="authSubmit">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
<el-pagination |
||||
@size-change="handleSizeChange" |
||||
@current-change="handleCurrentChange" |
||||
:current-page.sync="page" |
||||
:page-size="size" |
||||
:page-sizes="[ 10, 20, 30, 40]" |
||||
layout="total, sizes, prev, pager, next, jumper" |
||||
:total="total"> |
||||
</el-pagination> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudEnterpriseAuthentication from '@/api/EnterpriseAuthentication' |
||||
export default { |
||||
name: 'authenticationInfo', |
||||
data() { |
||||
return { |
||||
loading: true, |
||||
data: [], |
||||
authorizationType: null, |
||||
authenticationState: null, |
||||
typeOptions:[ |
||||
{ |
||||
value: 1, |
||||
label: '个人' |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '企业' |
||||
} |
||||
], |
||||
stateOptions:[ |
||||
{ |
||||
value: 1, |
||||
label: '审核中' |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '审核通过' |
||||
}, |
||||
{ |
||||
value: 3, |
||||
label: '审核不通过' |
||||
} |
||||
], |
||||
dialogVisible: false, |
||||
authForm:{ |
||||
type: 1, |
||||
reason:'' |
||||
}, |
||||
page: 1, |
||||
size: 1, |
||||
total: 0 |
||||
} |
||||
}, |
||||
watch: { |
||||
}, |
||||
created(){ |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
search(){ |
||||
this.page = 1 |
||||
this.getList() |
||||
}, |
||||
handleSizeChange(val){ |
||||
this.size = val |
||||
this.getList() |
||||
}, |
||||
handleCurrentChange(val){ |
||||
this.page = val |
||||
this.getList() |
||||
}, |
||||
getList(){ |
||||
let params = { |
||||
authorizationType: this.authorizationType, |
||||
authenticationState: this.authenticationState, |
||||
page: this.page - 1, |
||||
size: this.size |
||||
} |
||||
crudEnterpriseAuthentication.getAuthenticationList(params).then((res)=>{ |
||||
this.data = res.content |
||||
this.total = res.totalElements |
||||
this.loading = false |
||||
}) |
||||
}, |
||||
showDialog(row){ |
||||
console.log(row) |
||||
this.authForm.examineId = row.id |
||||
row.authenticationState == 2 ? this.authForm.type = 1 : this.authForm.type = 0 |
||||
this.authForm.reason = row.reason |
||||
this.dialogVisible = true |
||||
}, |
||||
radioChange(val){ |
||||
if(val == 1){ |
||||
this.authForm.reason = '' |
||||
} |
||||
}, |
||||
authSubmit(){ |
||||
crudEnterpriseAuthentication.examineAuthenticationInfo(this.authForm).then((res)=>{ |
||||
this.$message({ |
||||
message: '操作成功!', |
||||
type: 'success' |
||||
}) |
||||
this.dialogVisible = false |
||||
this.getList() |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
.table-img { |
||||
display: inline-block; |
||||
text-align: center; |
||||
background: #ccc; |
||||
color: #fff; |
||||
white-space: nowrap; |
||||
position: relative; |
||||
overflow: hidden; |
||||
vertical-align: middle; |
||||
width: 58px; |
||||
height: 58px; |
||||
border-radius: 0; |
||||
} |
||||
.el-avatar2{ |
||||
width: 58px; |
||||
height: 58px; |
||||
} |
||||
</style> |
@ -0,0 +1,210 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<div class="search-box"> |
||||
<el-select v-model="resourceType" clearable placeholder="资源类型"> |
||||
<el-option |
||||
v-for="item in typeOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select v-model="resourceAuditState" clearable @change="stateChange" placeholder="审核状态"> |
||||
<el-option |
||||
v-for="item in stateOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-button type="primary" @click="search">搜索</el-button> |
||||
</div> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="loading" :data="data" size="small" style="width: 100%;"> |
||||
<el-table-column prop="id" label="id" /> |
||||
<el-table-column prop="enterpriseName" label="企业名称" /> |
||||
<el-table-column prop="title" label="标题" /> |
||||
<el-table-column prop="capital" label="资金需求" /> |
||||
<el-table-column prop="detailedDescription" label="详细描述" /> |
||||
<el-table-column prop="resourceType" label="资源类型"> |
||||
<template slot-scope="scope"> |
||||
<span>{{scope.row.resourceType == 1 ? '资源' : '需求'}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="resourceAuditState" label="审核状态"> |
||||
<template slot-scope="scope"> |
||||
<span>{{scope.row.resourceAuditState == 1 ? '待审核' : scope.row.resourceAuditState == 2 ? '审核通过' : '审核未通过'}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="150px" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="showDialog(scope.row)">审核</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<el-dialog |
||||
title="审核" |
||||
:visible.sync="dialogVisible" |
||||
width="500"> |
||||
<div> |
||||
<el-form :model="authForm" label-width="100px"> |
||||
<el-form-item label="是否通过"> |
||||
<el-radio-group v-model="authForm.type" @change="radioChange"> |
||||
<el-radio :label="1">是</el-radio> |
||||
<el-radio :label="0">否</el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item label="未通过理由" v-show="authForm.type == 0"> |
||||
<el-input type="textarea" v-model="authForm.reason"></el-input> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
<div slot="footer"> |
||||
<el-button @click="dialogVisible = false">取 消</el-button> |
||||
<el-button type="primary" @click="authSubmit">确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
<el-pagination |
||||
@size-change="handleSizeChange" |
||||
@current-change="handleCurrentChange" |
||||
:page="page" |
||||
:page-size="size" |
||||
:page-sizes="[1, 10, 20, 30, 40]" |
||||
layout="total, sizes, prev, pager, next, jumper" |
||||
:total="total"> |
||||
</el-pagination> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudResource from '@/api/Resources.js' |
||||
|
||||
// crud交由presenter持有 |
||||
export default { |
||||
name: 'Resource', |
||||
data() { |
||||
return { |
||||
loading: true, |
||||
data: [], |
||||
typeOptions:[ |
||||
{ |
||||
value: 1, |
||||
label: '资源' |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '需求' |
||||
} |
||||
], |
||||
stateOptions:[ |
||||
{ |
||||
value: 1, |
||||
label: '审核中' |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '审核通过' |
||||
}, |
||||
{ |
||||
value: 3, |
||||
label: '审核不通过' |
||||
} |
||||
], |
||||
// resourceCagetoryId: 0, |
||||
// enterpriseType: 0, |
||||
// resourceAuditState: [1], |
||||
// resourceType: 0, |
||||
resourceCagetoryId: null, |
||||
enterpriseType: null, |
||||
resourceAuditState: null, |
||||
resourceType: null, |
||||
total: 0, |
||||
page: 1, |
||||
size: 10, |
||||
dialogVisible:false, |
||||
authForm:{type: 1,reason: ''} |
||||
} |
||||
}, |
||||
created(){ |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
stateChange(e){ |
||||
this.resourceAuditState = [e] |
||||
}, |
||||
handleSizeChange(val){ |
||||
this.size = val |
||||
this.getList() |
||||
}, |
||||
handleCurrentChange(val){ |
||||
this.page = val |
||||
this.getList() |
||||
}, |
||||
search(){ |
||||
this.page = 1 |
||||
this.getList() |
||||
}, |
||||
getList(){ |
||||
let params = { |
||||
resourceAuditState: this.resourceAuditState, |
||||
resourceType: this.resourceType, |
||||
resourceCagetoryId: this.resourceCagetoryId, |
||||
enterpriseType:this.enterpriseType, |
||||
page: this.page - 1, |
||||
size: this.size |
||||
} |
||||
crudResource.getResourceList(params).then((res)=>{ |
||||
this.data = res.content |
||||
this.loading = false |
||||
this.total = res.totalElements |
||||
}) |
||||
}, |
||||
showDialog(row){ |
||||
console.log(row) |
||||
this.dialogVisible = true |
||||
row.resourceAuditState == 2 ? this.authForm.type = 1 : this.authForm.type = 0 |
||||
this.authForm.examineId = row.id |
||||
}, |
||||
radioChange(val){ |
||||
if(val == 1){ |
||||
this.authForm.reason = '' |
||||
} |
||||
}, |
||||
authSubmit(){ |
||||
crudResource.examineResources(this.authForm).then((res)=>{ |
||||
this.$message({ |
||||
message: '操作成功!', |
||||
type: 'success' |
||||
}) |
||||
this.dialogVisible = false |
||||
this.getList() |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
.table-img { |
||||
display: inline-block; |
||||
text-align: center; |
||||
background: #ccc; |
||||
color: #fff; |
||||
white-space: nowrap; |
||||
position: relative; |
||||
overflow: hidden; |
||||
vertical-align: middle; |
||||
width: 32px; |
||||
height: 32px; |
||||
line-height: 32px; |
||||
} |
||||
.el-pagination{ |
||||
margin-top: 20px; |
||||
} |
||||
</style> |
@ -0,0 +1,178 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
<!-- <crudOperation :permission="permission" /> --> |
||||
<div class="search-box"> |
||||
<el-select v-model="projectState" clearable placeholder="项目状态"> |
||||
<el-option |
||||
v-for="item in stateOptions" |
||||
:key="item.value" |
||||
:label="item.label" |
||||
:value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-button type="primary" @click="search">搜索</el-button> |
||||
</div> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="loading" :data="tableData" size="small" style="width: 100%;"> |
||||
<!-- <el-table-column type="selection" width="55" /> --> |
||||
<el-table-column type="index" /> |
||||
<el-table-column prop="projectName" label="项目名称" /> |
||||
<el-table-column prop="projectCode" label="项目编号" /> |
||||
<el-table-column prop="cooperationModeId" label="合作模式id" /> |
||||
<el-table-column prop="resultContent" label="交付成果" /> |
||||
<el-table-column prop="totalMoney" label="项目总金额" /> |
||||
<el-table-column prop="providerId" label="项目提供方id" /> |
||||
<el-table-column prop="examineState" label="立项书审核状态"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.examineState == 1">审核中</span> |
||||
<span v-if="scope.row.examineState == 2">审核通过</span> |
||||
<span v-if="scope.row.examineState == 3">审核不通过</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="projectState" label="立项书状态"> |
||||
<template slot-scope="scope"> |
||||
<span v-if="scope.row.examineState == 0">未开始</span> |
||||
<span v-if="scope.row.examineState == 1">进行中</span> |
||||
<span v-if="scope.row.examineState == 2">已结束</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" width="150px" align="center"> |
||||
<template slot-scope="scope"> |
||||
<el-button type="text" @click="openProject(scope.row)">{{scope.row.projectState == 0 ? '开启项目' : scope.row.projectState == 1 ?'项目进行中' : '项目已结束'}}</el-button></el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</div> |
||||
<el-pagination |
||||
@size-change="handleSizeChange" |
||||
@current-change="handleCurrentChange" |
||||
:page="page" |
||||
:page-size="size" |
||||
:page-sizes="[1, 10, 20, 30, 40]" |
||||
layout="total, sizes, prev, pager, next, jumper" |
||||
:total="total"> |
||||
</el-pagination> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudProject from '@/api/Project' |
||||
export default { |
||||
name: 'Project', |
||||
data() { |
||||
return { |
||||
loading:true, |
||||
projectState: null, |
||||
tableData: [], |
||||
stateOptions:[ |
||||
{ |
||||
value: 1, |
||||
label: '已确认待发起方付款' |
||||
}, |
||||
{ |
||||
value: 2, |
||||
label: '已付款项目开启' |
||||
}, |
||||
{ |
||||
value: 3, |
||||
label: '申请交付' |
||||
}, |
||||
{ |
||||
value: 4, |
||||
label: '已结束' |
||||
}, |
||||
{ |
||||
value: 5, |
||||
label: '禅易介入中' |
||||
}, |
||||
{ |
||||
value: 6, |
||||
label: '介入结束' |
||||
}, |
||||
{ |
||||
value: 7, |
||||
label: '已取消' |
||||
} |
||||
], |
||||
total: 0, |
||||
page: 1, |
||||
size: 10 |
||||
} |
||||
}, |
||||
watch: { |
||||
}, |
||||
created(){ |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
handleSizeChange(val){ |
||||
this.size = val |
||||
this.getList() |
||||
}, |
||||
handleCurrentChange(val){ |
||||
this.page = val |
||||
this.getList() |
||||
}, |
||||
search(){ |
||||
this.page = 1 |
||||
this.getList() |
||||
}, |
||||
getList(){ |
||||
let params = { |
||||
projectState: this.projectState, |
||||
page: this.page - 1, |
||||
size: this.size |
||||
} |
||||
crudProject.getProjectList(params).then((res)=>{ |
||||
this.tableData = res.content |
||||
this.loading = false |
||||
this.total = res.totalElements |
||||
}) |
||||
}, |
||||
openProject(row){ |
||||
if(row.projectState == 0){ |
||||
this.$confirm('是否确定开启项目?', '提示', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
}).then(() => { |
||||
crudProject.openProject(row.id).then((res)=>{ |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '操作成功' |
||||
}) |
||||
this.getList() |
||||
}) |
||||
}).catch(() => { |
||||
this.$message({ |
||||
type: 'info', |
||||
message: '已取消删除' |
||||
}); |
||||
}); |
||||
} |
||||
}, |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
.table-img { |
||||
display: inline-block; |
||||
text-align: center; |
||||
background: #ccc; |
||||
color: #fff; |
||||
white-space: nowrap; |
||||
position: relative; |
||||
overflow: hidden; |
||||
vertical-align: middle; |
||||
width: 32px; |
||||
height: 32px; |
||||
line-height: 32px; |
||||
} |
||||
</style> |
@ -0,0 +1,120 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
<crudOperation :permission="permission" /> |
||||
<!--表单组件--> |
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
||||
<el-form-item label="id" prop="id"> |
||||
<el-input v-model="form.id" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="合作模式名称"> |
||||
<el-input v-model="form.name" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="合作模式简介"> |
||||
<el-input v-model="form.content" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="合作模式阶段数"> |
||||
<el-input v-model="form.stageNums" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="createTime"> |
||||
<el-input v-model="form.createTime" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="updateTime"> |
||||
<el-input v-model="form.updateTime" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="isDel"> |
||||
<el-input v-model="form.isDel" style="width: 370px;" /> |
||||
</el-form-item> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
||||
<el-table-column type="selection" width="55" /> |
||||
<el-table-column v-if="columns.visible('id')" prop="id" label="id" /> |
||||
<el-table-column v-if="columns.visible('name')" prop="name" label="合作模式名称" /> |
||||
<el-table-column v-if="columns.visible('content')" prop="content" label="合作模式简介" /> |
||||
<el-table-column v-if="columns.visible('stageNums')" prop="stageNums" label="合作模式阶段数" /> |
||||
<el-table-column v-if="columns.visible('isDel')" prop="isDel" label="isDel" /> |
||||
<el-table-column v-permission="['admin','CooperationMode:edit','CooperationMode:del']" label="操作" width="150px" align="center"> |
||||
<template slot-scope="scope"> |
||||
<udOperation |
||||
:data="scope.row" |
||||
:permission="permission" |
||||
/> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<pagination /> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudCooperationMode from '@/api/CooperationMode' |
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
||||
import rrOperation from '@crud/RR.operation' |
||||
import crudOperation from '@crud/CRUD.operation' |
||||
import udOperation from '@crud/UD.operation' |
||||
import pagination from '@crud/Pagination' |
||||
import MaterialList from "@/components/material"; |
||||
|
||||
// crud交由presenter持有 |
||||
const defaultCrud = CRUD({ title: '合作模式', url: 'api/CooperationMode', sort: 'id,desc', crudMethod: { ...crudCooperationMode }}) |
||||
const defaultForm = { id: null, name: null, content: null, stageNums: null, createTime: null, updateTime: null, isDel: null } |
||||
export default { |
||||
name: 'CooperationMode', |
||||
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, |
||||
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], |
||||
data() { |
||||
return { |
||||
|
||||
permission: { |
||||
add: ['admin', 'CooperationMode:add'], |
||||
edit: ['admin', 'CooperationMode:edit'], |
||||
del: ['admin', 'CooperationMode:del'] |
||||
}, |
||||
rules: { |
||||
id: [ |
||||
{ required: true, message: '不能为空', trigger: 'blur' } |
||||
] |
||||
} } |
||||
}, |
||||
watch: { |
||||
}, |
||||
methods: { |
||||
// 获取数据前设置好接口地址 |
||||
[CRUD.HOOK.beforeRefresh]() { |
||||
return true |
||||
}, // 新增与编辑前做的操作 |
||||
[CRUD.HOOK.afterToCU](crud, form) { |
||||
}, |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
.table-img { |
||||
display: inline-block; |
||||
text-align: center; |
||||
background: #ccc; |
||||
color: #fff; |
||||
white-space: nowrap; |
||||
position: relative; |
||||
overflow: hidden; |
||||
vertical-align: middle; |
||||
width: 32px; |
||||
height: 32px; |
||||
line-height: 32px; |
||||
} |
||||
</style> |
@ -0,0 +1,116 @@
|
||||
<template> |
||||
<div class="app-container"> |
||||
<!--工具栏--> |
||||
<div class="head-container"> |
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
<crudOperation :permission="permission" /> |
||||
<!--表单组件--> |
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> |
||||
<el-form-item label="id" prop="id"> |
||||
<el-input v-model="form.id" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="分类名称"> |
||||
<el-input v-model="form.cagetoryName" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="分类图标"> |
||||
<el-input v-model="form.cagetoryLogo" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="createTime"> |
||||
<el-input v-model="form.createTime" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="updateTime"> |
||||
<el-input v-model="form.updateTime" style="width: 370px;" /> |
||||
</el-form-item> |
||||
<el-form-item label="isDel"> |
||||
<el-input v-model="form.isDel" style="width: 370px;" /> |
||||
</el-form-item> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
<!--表格渲染--> |
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
||||
<el-table-column type="selection" width="55" /> |
||||
<el-table-column v-if="columns.visible('id')" prop="id" label="id" /> |
||||
<el-table-column v-if="columns.visible('cagetoryName')" prop="cagetoryName" label="分类名称" /> |
||||
<el-table-column v-if="columns.visible('cagetoryLogo')" prop="cagetoryLogo" label="分类图标" /> |
||||
<el-table-column v-if="columns.visible('isDel')" prop="isDel" label="isDel" /> |
||||
<el-table-column v-permission="['admin','ResourcesCagetory:edit','ResourcesCagetory:del']" label="操作" width="150px" align="center"> |
||||
<template slot-scope="scope"> |
||||
<udOperation |
||||
:data="scope.row" |
||||
:permission="permission" |
||||
/> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<!--分页组件--> |
||||
<pagination /> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
import crudResourcesCagetory from '@/api/ResourcesCagetory' |
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
||||
import rrOperation from '@crud/RR.operation' |
||||
import crudOperation from '@crud/CRUD.operation' |
||||
import udOperation from '@crud/UD.operation' |
||||
import pagination from '@crud/Pagination' |
||||
import MaterialList from "@/components/material"; |
||||
|
||||
// crud交由presenter持有 |
||||
const defaultCrud = CRUD({ title: '资源分类表', url: 'api/ResourcesCagetory', sort: 'id,desc', crudMethod: { ...crudResourcesCagetory }}) |
||||
const defaultForm = { id: null, cagetoryName: null, cagetoryLogo: null, createTime: null, updateTime: null, isDel: null } |
||||
export default { |
||||
name: 'ResourcesCagetory', |
||||
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, |
||||
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], |
||||
data() { |
||||
return { |
||||
permission: { |
||||
add: ['admin', 'ResourcesCagetory:add'], |
||||
edit: ['admin', 'ResourcesCagetory:edit'], |
||||
del: ['admin', 'ResourcesCagetory:del'] |
||||
}, |
||||
rules: { |
||||
id: [ |
||||
{ required: true, message: '不能为空', trigger: 'blur' } |
||||
] |
||||
} |
||||
} |
||||
}, |
||||
watch: { |
||||
}, |
||||
methods: { |
||||
// 获取数据前设置好接口地址 |
||||
[CRUD.HOOK.beforeRefresh]() { |
||||
return true |
||||
}, // 新增与编辑前做的操作 |
||||
[CRUD.HOOK.afterToCU](crud, form) { |
||||
}, |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped> |
||||
.table-img { |
||||
display: inline-block; |
||||
text-align: center; |
||||
background: #ccc; |
||||
color: #fff; |
||||
white-space: nowrap; |
||||
position: relative; |
||||
overflow: hidden; |
||||
vertical-align: middle; |
||||
width: 32px; |
||||
height: 32px; |
||||
line-height: 32px; |
||||
} |
||||
</style> |
Loading…
Reference in new issue