parent
6da5b72f46
commit
a7003d4a55
File diff suppressed because it is too large
Load Diff
@ -1,210 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="container" style="padding: 10px!important;"> |
|
||||||
<el-row style="margin-bottom:20px;"> |
|
||||||
<el-col> |
|
||||||
<el-button style="background-color:#0066EB;color:#FFFFFF" plain icon="el-icon-plus" size="mini" class="btn-blue" @click="handleAdd"> |
|
||||||
新增 |
|
||||||
</el-button> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="this.messages" style="height: 100%" border> |
|
||||||
<el-table-column label="发送时间" align="center" key="sendTime" prop="sendTime" width="200"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{ parseTime(scope.row.sendTime) }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="发送对象姓名" align="center" key="userName" prop="userName" width="200"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.userId == 0 ? "全体":scope.row.userName }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="发送对象昵称" align="center" key="nickName" prop="nickName" width="200"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.userId == 0 ? "全体":scope.row.nickName }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="消息内容" align="center" key="message" prop="message" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.message}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<!-- <el-table-column label="操作" align="center" key="applyId" prop="applyId" width="200">--> |
|
||||||
<!-- <template slot-scope="scope">--> |
|
||||||
<!-- <span><el-button size="mini" type="text"--> |
|
||||||
<!-- icon="el-icon-edit" @click="auditTask(scope.row.applyId)">审核</el-button></span>--> |
|
||||||
<!-- </template>--> |
|
||||||
<!-- </el-table-column> :current-page="queryParams.currentPage" --> |
|
||||||
</el-table> |
|
||||||
<div v-if="total>10" style='width:100%;margin-top:30px;text-align: center;'> |
|
||||||
<el-pagination background |
|
||||||
@current-change="handleCurrentChange" |
|
||||||
|
|
||||||
:page-size="queryParams.pageSize" |
|
||||||
layout="total, prev, pager, next, jumper" |
|
||||||
:total="total"> |
|
||||||
</el-pagination> |
|
||||||
</div> |
|
||||||
<el-dialog title="发送系统消息" :visible.sync="open" :close-on-click-modal="false" width="700px" height="700px" |
|
||||||
append-to-body> |
|
||||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px"> |
|
||||||
<el-form-item label="发送对象" prop="userId"> |
|
||||||
<el-select v-model="form.userId" filterable clearable placeholder="请选择" :style="{width:'100%'}"> |
|
||||||
<el-option v-for="item in users" :key="item.userId" :label="item.nickName + ',' + item.phonenumber" :value="item.userId"> |
|
||||||
</el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="消息内容" prop="message"> |
|
||||||
<el-input type="textarea" :rows="5" v-model="form.message"></el-input> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<el-button type="primary" @click="submitForm" style="background-color:#0066EB;color:#FFFFFF">确 定</el-button> |
|
||||||
<el-button @click="cancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
import {listMessage,sendMessage} from "@/api/system/message"; |
|
||||||
import {list} from "@/api/system/user"; |
|
||||||
export default { |
|
||||||
name: "MessageManage", |
|
||||||
data() { |
|
||||||
return { |
|
||||||
open:false, |
|
||||||
// 遮罩层 |
|
||||||
loading: true, |
|
||||||
title: '消息列表', |
|
||||||
messages: [], |
|
||||||
// 总条数 |
|
||||||
total: 0, |
|
||||||
// 查询参数 |
|
||||||
queryParams: { |
|
||||||
pageNum: 1, |
|
||||||
pageSize: 10, |
|
||||||
userId:'' |
|
||||||
}, |
|
||||||
form:{ |
|
||||||
userId:'' |
|
||||||
}, |
|
||||||
rules:{ userId: [ |
|
||||||
{required: true, message: "发送对象不能为空", trigger: "blur"} |
|
||||||
], |
|
||||||
message: [ |
|
||||||
{required: true, message: "消息内容不能为空", trigger: "change"} |
|
||||||
]}, |
|
||||||
users:[] |
|
||||||
} |
|
||||||
}, |
|
||||||
computed: {}, |
|
||||||
created() { |
|
||||||
this.list(); |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
/** 查询列表 */ |
|
||||||
getList() { |
|
||||||
this.loading = true; |
|
||||||
this.list(); |
|
||||||
}, |
|
||||||
list() { |
|
||||||
listMessage(this.queryParams).then(response => { |
|
||||||
this.messages = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
} |
|
||||||
) |
|
||||||
}, |
|
||||||
handleAdd(){ |
|
||||||
list().then(response=>{ |
|
||||||
let userslist = response.user; |
|
||||||
this.users=userslist.reverse(); |
|
||||||
this.users.unshift({ |
|
||||||
userId: 0, |
|
||||||
userName:'全体', |
|
||||||
nickName:'全体', |
|
||||||
phonenumber: '' |
|
||||||
}) |
|
||||||
}) |
|
||||||
this.open = true; |
|
||||||
}, |
|
||||||
submitForm(){ |
|
||||||
this.$refs["form"].validate(valid => { |
|
||||||
if (valid) { |
|
||||||
sendMessage(this.form).then(response => { |
|
||||||
this.$notify({ |
|
||||||
title: '发送成功', |
|
||||||
message: '', |
|
||||||
align: 'center', |
|
||||||
type: 'success' |
|
||||||
}); |
|
||||||
this.resetForm("form"); |
|
||||||
this.open = false; |
|
||||||
this.getList(); |
|
||||||
}); |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
cancel(){ |
|
||||||
this.open = false; |
|
||||||
}, |
|
||||||
//当前页码 |
|
||||||
handleCurrentChange(val) { |
|
||||||
this.queryParams.pageNum=val; |
|
||||||
this.getList(); |
|
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped> |
|
||||||
.type { |
|
||||||
color: #1890FF; |
|
||||||
font-weight: bold; |
|
||||||
font-size: 14px; |
|
||||||
margin-right: 10px; |
|
||||||
} |
|
||||||
|
|
||||||
.tip { |
|
||||||
font-size: 13px; |
|
||||||
color: gray; |
|
||||||
} |
|
||||||
|
|
||||||
.el-link { |
|
||||||
margin-right: 10px; |
|
||||||
font-size: 13px; |
|
||||||
} |
|
||||||
|
|
||||||
.active { |
|
||||||
color: #1890FF; |
|
||||||
} |
|
||||||
|
|
||||||
.el-row { |
|
||||||
margin-bottom: 5px; |
|
||||||
display: flex; |
|
||||||
flex-wrap: wrap |
|
||||||
} |
|
||||||
|
|
||||||
.el-card { |
|
||||||
min-width: 100%; |
|
||||||
height: 100%; |
|
||||||
margin-right: 20px; |
|
||||||
transition: all .5s; |
|
||||||
} |
|
||||||
.container>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#0e0c0c; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.container>>>.el-table td{ |
|
||||||
/* text-align:center; */ |
|
||||||
background-color:#FAF9F9; |
|
||||||
height:60px; |
|
||||||
color:#666666; |
|
||||||
} |
|
||||||
.container>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
</style> |
|
@ -1,951 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="examku"> |
|
||||||
<main id="main"> |
|
||||||
<!--========================== |
|
||||||
Profile Section |
|
||||||
============================--> |
|
||||||
<section id="profile"> |
|
||||||
<div class="container mt30" style="margin-top: 0px"> |
|
||||||
<!-- <el-row :gutter="20">--> |
|
||||||
<!-- <el-alert type="info" effect="dark" v-if="showAlert" :closable="false"> |
|
||||||
您【{{appleTypeStr}}】的申请已提交,平台审核后会站内消息通知您。 |
|
||||||
</el-alert> --> |
|
||||||
<div v-if="showAlert"> |
|
||||||
<el-tag color='#F7F7F7' >您【{{appleTypeStr}}】的申请已提交,平台审核后会站内消息通知您。</el-tag> |
|
||||||
<el-tag color='#F2A51A' style="color:#FFFFFF;margin-left:17px;border:none;">{{appleTypeStr}}信息</el-tag> |
|
||||||
</div> |
|
||||||
<br/> |
|
||||||
<div id="con_a_3" class="profile-info"> |
|
||||||
<div v-if="bArray[0][0] != null" style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> |
|
||||||
<h4 style="font-weight: bold;color:#0066EB;margin-bottom:0px">认证公司用户</h4> |
|
||||||
<div class="testuser"> |
|
||||||
<div style="color:#808080;font-size:14px;line-height:15px;"> |
|
||||||
<p>普通用户可提交公司信息和认证所需材料,经通过平台审核后升级为认证公司用户。</p> |
|
||||||
<p>认证公司用户可在测试众包市场中发布测试任务。</p> |
|
||||||
</div> |
|
||||||
<el-button @click="regCompanyChild" size="small" :disabled="!bArray[0][0]"> |
|
||||||
{{ bArray[1][0] }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div></div> |
|
||||||
<div v-if="bArray[0][1] != null" style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> |
|
||||||
<h4 style="font-weight: bold;color:#0066EB;margin-bottom:0px">测试认证</h4> |
|
||||||
<div class="testuser"> |
|
||||||
<div style="color:#808080;font-size:14px;line-height:15px;"> |
|
||||||
<p >普通用户可提交个人身份信息和资历升级为个人测试者。</p> |
|
||||||
<p>个人测试者可在测试任务众包市场竞标和承接测试项目,完成任务可获取赏金。</p> |
|
||||||
</div> |
|
||||||
<el-button size="small" :disabled="!bArray[0][1]" @click="x2ctChild" > |
|
||||||
{{ bArray[1][1] }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<!-- <div v-if="bArray[0][1] != null" style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> |
|
||||||
<h4 style="font-weight: bold;color:#0066EB;margin-bottom:0px">认证测试公司</h4> |
|
||||||
<div class="testuser"> |
|
||||||
<div style="color:#808080;font-size:14px;line-height:15px;"> |
|
||||||
<p >普通用户可提交公司信息和公司测试者认证所需材料,并通过平台审核后,升级为公司测试者。</p> |
|
||||||
<p>认证公司用户也可以补充提交公司测试者认证所需材料,并通过平台审核后,升级为认证测试公司。 </p> |
|
||||||
<p>认证测试公司可在测试任务众包市场中应征和承接测试项目,完成任务可获取赏金。</p> |
|
||||||
</div> |
|
||||||
<el-button size="small" :disabled="!bArray[0][1]" @click="x2ctChild" > |
|
||||||
{{ bArray[1][1] }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
<div v-if="bArray[0][2] != null" style="border: 1px solid #DCDCDC;border-radius:5px;padding:0 20px;margin:20px 0;width:80%"> |
|
||||||
<h4 style="font-weight: bold;color:#0066EB;margin-bottom:0px">个人测试者</h4> |
|
||||||
<div class="testuser"> |
|
||||||
<div style="color:#808080;font-size:14px;line-height:15px;"> |
|
||||||
<p >普通用户可提交个人身份信息和资历升级为个人测试者。</p> |
|
||||||
<p>个人测试者可在测试任务众包市场中应征和承接测试项目,完成任务可获取赏金。</p> |
|
||||||
</div> |
|
||||||
<el-button size="small" :disabled="!bArray[0][2]" @click="p2ptChild" > |
|
||||||
{{ bArray[1][2] }} |
|
||||||
</el-button> |
|
||||||
</div> |
|
||||||
</div> --> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</section> |
|
||||||
</main> |
|
||||||
<!-- 添加或修改公司申请审核对话框 --> |
|
||||||
<el-dialog v-if="regCompanyOpen" :title="title" :visible.sync="regCompanyOpen" width="800px" append-to-body :close-on-click-modal="false" > |
|
||||||
<el-form ref="form" :model="form" :rules="regCompanyRules" label-width="150px" > |
|
||||||
<el-form-item label="公司名称" prop="name"> |
|
||||||
<el-input v-model="form.name" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="统一信用代码" prop="creditCode"> |
|
||||||
<el-input v-model="form.creditCode" placeholder="请输入统一信用代码" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="通讯地址" prop="address"> |
|
||||||
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="网址" prop="webSite"> |
|
||||||
<el-input placeholder="请输入网址" v-model="form.webSite"> |
|
||||||
<template slot="prepend">Http://</template> |
|
||||||
</el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="营业执照" prop="businessLicenseUrl"> |
|
||||||
<multi-upload v-if="allFileGetFlag" v-model="form.businessLicenseUrl" :serverAddr="materialServerAddr" fileName="营业执照" :limit="1" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="认证公司补充材料" prop="filePath"> |
|
||||||
<nonimage-upload v-if="allFileGetFlag" v-model="form.otherCQList" :serverAddr="materialServerAddr" fileName="认证公司补充材料" :limit="5" @setImgPath='setImgPath'/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="公司简介" prop="companyDesc"> |
|
||||||
<el-input v-model="form.companyDesc" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="联系人姓名" prop="contactName"> |
|
||||||
<el-input v-model="form.contactName" placeholder="请输入联系人姓名"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="联系人职位" prop="contactPosition"> |
|
||||||
<el-input v-model="form.contactPosition" placeholder="请输入联系人职位" /> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<div class="submitbtn"> |
|
||||||
<el-button @click="regCompanySubmitForm" >确 定 </el-button > |
|
||||||
</div> |
|
||||||
<el-button @click="regCompanyCancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
<!-- 添加或修改认证测试公司p2ct申请审核对话框 --> |
|
||||||
<el-dialog v-if="p2ctOpen" :title="title" :visible.sync="p2ctOpen" width="800px" append-to-body :close-on-click-modal="false" > |
|
||||||
<el-form ref="companyForm" :model="companyApply" :rules="p2ctRules" label-width="150px"> |
|
||||||
<el-form-item label="公司名称" prop="name"> |
|
||||||
<el-input v-model="companyApply.name" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="统一信用代码" prop="creditCode"> |
|
||||||
<el-input v-model="companyApply.creditCode" placeholder="请输入统一信用代码" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="通讯地址" prop="address"> |
|
||||||
<el-input v-model="companyApply.address" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="网址" prop="webSite"> |
|
||||||
<el-input placeholder="请输入网址" v-model="companyApply.webSite"> |
|
||||||
<template slot="prepend">Http://</template> |
|
||||||
</el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="营业执照" prop="businessLicenseUrl"> |
|
||||||
<multi-upload v-if="allFileGetFlag" v-model="companyApply.businessLicenseUrl" :serverAddr="materialServerAddr" fileName="营业执照" :limit="1" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="认证公司补充材料" prop="otherCQList"> |
|
||||||
<nonimage-upload v-if="allFileGetFlag" v-model="companyApply.otherCQList" :serverAddr="materialServerAddr" :p2ctapply='1' fileName="认证公司补充材料" :limit="5" @setImgPath='setImgPath'/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="公司简介" prop="companyDesc"> |
|
||||||
<el-input v-model="companyApply.companyDesc" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="联系人姓名" prop="contactName"> |
|
||||||
<el-input v-model="companyApply.contactName" placeholder="请输入联系人姓名" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="联系人职位" prop="contactPosition"> |
|
||||||
<el-input v-model="companyApply.contactPosition" placeholder="请输入联系人职位" /> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<el-form ref="testerForm" :model="testerApply" label-width="150px"> |
|
||||||
<el-form-item label="测试项目案例" prop="testProjects"> |
|
||||||
<el-input v-model="testerApply.testProjects" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="530" trigger="hover"> |
|
||||||
<span>2021年 航空仿真软件单元测试<br> |
|
||||||
2020年 企业供应链管理平台安全测试<br> |
|
||||||
2020年 B2C的电商平台系统前后台会员管理、订单、支付及后台订单处理相关模块测试 |
|
||||||
</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="其它补充材料" prop="otherTQList"> |
|
||||||
<nonimage-upload v-if="allFileGetFlag" v-model="testerApply.otherTQList" :serverAddr="materialServerAddr" :p2ctapply='2' fileName="其它补充材料" :limit="5" @setnoniPath='setnoniPath'/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="补充说明" prop="otherInfo"> |
|
||||||
<el-input v-model="testerApply.otherInfo" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<div class="submitbtn"> |
|
||||||
<el-button type="primary" @click="p2ctSubmitForm">确 定</el-button> |
|
||||||
</div> |
|
||||||
<el-button @click="p2ctCancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
<!-- 添加或修改c2ct申请审核对话框 --> |
|
||||||
<el-dialog v-if="c2ctOpen" :title="title" :visible.sync="c2ctOpen" width="800px" append-to-body :close-on-click-modal="false" > |
|
||||||
<el-form ref="form" :model="form" :rules="c2ctRules" label-width="150px"> |
|
||||||
<el-form-item label="测试项目案例" prop="testProjects"> |
|
||||||
<el-input v-model="form.testProjects" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="530" trigger="hover"> |
|
||||||
<span>2021年 航空仿真软件单元测试<br> |
|
||||||
2020年 企业供应链管理平台安全测试<br> |
|
||||||
2020年 B2C的电商平台系统前后台会员管理、订单、支付及后台订单处理相关模块测试 |
|
||||||
</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="其它补充材料" prop="filePath"> |
|
||||||
<nonimage-upload v-if="allFileGetFlag" v-model="form.otherTQList" :serverAddr="materialServerAddr" fileName="其它补充材料" :limit="5" @setImgPath='setImgPath'/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="补充说明" prop="otherInfo"> |
|
||||||
<el-input v-model="form.otherInfo" type="textarea" placeholder="请输入内容" /> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<div class="submitbtn"> |
|
||||||
<el-button type="primary" @click="c2ctSubmitForm">确 定</el-button> |
|
||||||
</div> |
|
||||||
<el-button @click="c2ctCancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
<!-- 添加或修改个人测试者p2pt申请审核对话框 --> |
|
||||||
<el-dialog v-if="p2ptOpen" :title="title" :visible.sync="p2ptOpen" width="800px" append-to-body :close-on-click-modal="false" > |
|
||||||
<el-form ref="form" :model="form" :rules="p2ptRules" label-width="150px"> |
|
||||||
<el-form-item label="真实姓名" prop="name"> |
|
||||||
<el-input v-model="form.name" placeholder="请输入真实姓名"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="所在城市" prop="city"> |
|
||||||
<el-input v-model="form.city" placeholder="请输入所在城市"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="身份证号码" prop="idNumber"> |
|
||||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号码"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="身份证正面" prop="idCardFrontUrl"> |
|
||||||
<multi-upload v-if="allFileGetFlag" v-model="form.idCardFrontUrl" :serverAddr="materialServerAddr" fileName="身份证正面" :limit="1" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="身份证反面" prop="idCardBackUrl"> |
|
||||||
<multi-upload v-if="allFileGetFlag" v-model="form.idCardBackUrl" :serverAddr="materialServerAddr" fileName="身份证反面" :limit="1" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="测试能力" prop="testSkills"> |
|
||||||
<el-input v-model="form.testSkills" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="400" trigger="hover" > |
|
||||||
<span>性能测试LoadRunner, Jmeter,自动化测试Selenium</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="测试项目案例" prop="testProjects"> |
|
||||||
<el-input v-model="form.testProjects" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="530" trigger="hover"> |
|
||||||
<span>2021年 航空仿真软件单元测试<br>2020年 企业供应链管理平台安全测试<br>2020年 B2C的电商平台系统前后台会员管理、订单、支付及后台订单处理相关模块测试</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="奖项和证书" prop="certificate"> |
|
||||||
<el-input v-model="form.certificate" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="500" trigger="hover"> |
|
||||||
<span>STQB认证软件测试工程师<br>国家软考认证软件评测师<br>或国家等级考试软件测试工程师证书 <br> |
|
||||||
2019年全国大学生软件测试大赛二等奖 |
|
||||||
</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="工作经历" prop="workExperience"> |
|
||||||
<el-input v-model="form.workExperience" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="500" trigger="hover"> |
|
||||||
<span>2017.5-2021.7 西安未央软件有限公司 软件测试工程师<br> |
|
||||||
2013.9-2017.4. 西安大唐软件有限公司 软件测试工程师<br> |
|
||||||
2009.9-2013.7 西安电子科技大学 软件工程专业 本科 |
|
||||||
</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="其它补充材料" prop="filePath"> |
|
||||||
<nonimage-upload v-if="allFileGetFlag" v-model="form.otherTQList" :serverAddr="materialServerAddr" fileName="其它补充材料" :limit="5" @setImgPath='setImgPath'/> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<div class="submitbtn"> |
|
||||||
<el-button type="primary" @click="p2ptSubmitForm">确 定</el-button> |
|
||||||
</div> |
|
||||||
<el-button @click="p2ptCancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
<el-dialog v-if="certification" :title="title" :visible.sync="certification" width="800px" append-to-body :close-on-click-modal="false" > |
|
||||||
<el-form ref="form" :model="form" :rules="certifRules" label-width="150px"> |
|
||||||
<el-form-item label="姓名" prop="name"> |
|
||||||
<el-input v-model="form.name" placeholder="请输入真实姓名"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="身份证号码" prop="idNumber"> |
|
||||||
<el-input v-model="form.idNumber" placeholder="请输入身份证号码"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="所在城市" prop="city"> |
|
||||||
<el-input v-model="form.city" placeholder="请输入所在城市"/> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="测试能力" prop="testSkills"> |
|
||||||
<el-input v-model="form.testSkills" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="400" trigger="hover" > |
|
||||||
<span>性能测试LoadRunner, Jmeter,自动化测试Selenium</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="技能证书" prop="idCardFrontUrl"> |
|
||||||
<multi-upload v-if="allFileGetFlag" v-model="form.idCardFrontUrl" :serverAddr="materialServerAddr" fileName="技能证书" :limit="1" /> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="工作经历" prop="workExperience"> |
|
||||||
<el-input v-model="form.workExperience" type="textarea" placeholder="请输入内容" /> |
|
||||||
<el-popover placement="top-start" title="示例:" width="500" trigger="hover"> |
|
||||||
<span>2017.5-2021.7 西安未央软件有限公司 软件测试工程师<br> |
|
||||||
2013.9-2017.4. 西安大唐软件有限公司 软件测试工程师<br> |
|
||||||
2009.9-2013.7 西安电子科技大学 软件工程专业 本科 |
|
||||||
</span> |
|
||||||
<el-link slot="reference" style="color: #46a6ff;" :underline="false">查看示例</el-link> |
|
||||||
</el-popover> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<div slot="footer" class="dialog-footer"> |
|
||||||
<div class="submitbtn"> |
|
||||||
<el-button type="primary" @click="p2ptSubmitForm">确 定</el-button> |
|
||||||
</div> |
|
||||||
<el-button @click="p2ptCancel">取 消</el-button> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
import {apple_type} from "@/api/system/user"; |
|
||||||
import { |
|
||||||
listTesterApply, |
|
||||||
getTesterApplyByUid, |
|
||||||
delTesterApply, |
|
||||||
addC2CT, |
|
||||||
updateTesterApply, |
|
||||||
exportTesterApply, |
|
||||||
certificationStatus, |
|
||||||
addTesterApply, |
|
||||||
} from "@/api/tester/TesterApply"; |
|
||||||
import { |
|
||||||
listCompanyApply, |
|
||||||
getCompanyApplyByUid, |
|
||||||
delCompanyApply, |
|
||||||
addCompanyApply, |
|
||||||
updateCompanyApply, |
|
||||||
exportCompanyApply, |
|
||||||
} from "@/api/tester/CompanyApply"; |
|
||||||
import {VueCropper} from "vue-cropper"; |
|
||||||
import MultiUpload from "@/page/common/MultiUpload"; |
|
||||||
import NonimageUpload from "@/page/common/NonimageUpload"; |
|
||||||
|
|
||||||
export default { |
|
||||||
components: { |
|
||||||
MultiUpload, |
|
||||||
NonimageUpload, |
|
||||||
VueCropper, |
|
||||||
}, |
|
||||||
props: { |
|
||||||
user: { |
|
||||||
type: Object, |
|
||||||
}, |
|
||||||
// regCompany: { |
|
||||||
// type: Function, |
|
||||||
// default: null, |
|
||||||
// }, |
|
||||||
// p2pt: { |
|
||||||
// type: Function, |
|
||||||
// default: null, |
|
||||||
// }, |
|
||||||
// x2ct: { |
|
||||||
// type: Function, |
|
||||||
// default: null, |
|
||||||
// }, |
|
||||||
// refreshProfile: { |
|
||||||
// type: Function, |
|
||||||
// default: null, |
|
||||||
// }, |
|
||||||
}, |
|
||||||
data() { |
|
||||||
return { |
|
||||||
bArray: [ |
|
||||||
[true, true], |
|
||||||
["升级为认证公司用户", "升级为测试认证"], |
|
||||||
// ["升级为认证公司用户", "升级为认证测试公司", "升级为个人测试者"], |
|
||||||
], |
|
||||||
certification:false, |
|
||||||
showAlert: false, |
|
||||||
appleTypeStr: "", |
|
||||||
testerApplyB: {}, |
|
||||||
companyApplyB: {}, |
|
||||||
// p2ct表单参数 |
|
||||||
userInfo: {}, |
|
||||||
testerApply: {}, |
|
||||||
companyApply: {}, |
|
||||||
form: {}, |
|
||||||
// 弹出层标题 |
|
||||||
title: "", |
|
||||||
// 是否显示regCompany弹出层 |
|
||||||
regCompanyOpen: false, |
|
||||||
// 是否显示p2pt弹出层 |
|
||||||
p2ptOpen: false, |
|
||||||
// 是否显示p2ct弹出层 |
|
||||||
p2ctOpen: false, |
|
||||||
// 是否显示c2ct弹出层 |
|
||||||
c2ctOpen: false, |
|
||||||
rules: {}, |
|
||||||
// 个人测试者表单校验 |
|
||||||
p2ptRules: { |
|
||||||
name: [ |
|
||||||
{required: true, message: "真实姓名不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
city: [ |
|
||||||
{required: true, message: "所在城市不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
idNumber: [ |
|
||||||
{required: true, message: "身份证号码能为空", trigger: "blur"}, |
|
||||||
{ |
|
||||||
pattern: |
|
||||||
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, |
|
||||||
message: "请输入正确的身份证号码", |
|
||||||
trigger: "blur", |
|
||||||
}, |
|
||||||
], |
|
||||||
idCardFrontUrl: [ |
|
||||||
{required: true, message: "身份证正面不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
idCardBackUrl: [ |
|
||||||
{required: true, message: "身份证反面不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
testSkills: [ |
|
||||||
{required: true, message: "测试能力不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
testProjects: [ |
|
||||||
{required: true, message: "测试项目案例不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
idCardFrontUrl: [ |
|
||||||
{ |
|
||||||
required: true, |
|
||||||
message: "请上传身份证正面", |
|
||||||
trigger: "change", |
|
||||||
}, |
|
||||||
], |
|
||||||
idCardBackUrl: [ |
|
||||||
{ |
|
||||||
required: true, |
|
||||||
message: "请上传身份证反面", |
|
||||||
trigger: "change", |
|
||||||
}, |
|
||||||
], |
|
||||||
}, |
|
||||||
// 认证公司用户表单校验 |
|
||||||
regCompanyRules: { |
|
||||||
name: [ |
|
||||||
{required: true, message: "公司名称不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
creditCode: [ |
|
||||||
{required: true, message: "统一信用代码不能为空", trigger: "blur"}, |
|
||||||
{ |
|
||||||
pattern: |
|
||||||
/^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, |
|
||||||
message: "请输入正确的统一信用代码", |
|
||||||
trigger: "blur", |
|
||||||
}, |
|
||||||
], |
|
||||||
address: [ |
|
||||||
{required: true, message: "通讯地址不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
webSite: [ |
|
||||||
{required: true, message: "网址不能为空", trigger: "blur"}, |
|
||||||
{ |
|
||||||
pattern: |
|
||||||
/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/, |
|
||||||
message: "请输入正确的网址", |
|
||||||
trigger: "blur", |
|
||||||
}, |
|
||||||
], |
|
||||||
companyDesc: [ |
|
||||||
{required: true, message: "公司简介不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
contactName: [ |
|
||||||
{required: true, message: "联系人姓名不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
contactPosition: [ |
|
||||||
{required: true, message: "联系人职位不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
businessLicenseUrl: [ |
|
||||||
{ |
|
||||||
required: true, |
|
||||||
message: "请上传营业执照", |
|
||||||
trigger: "change", |
|
||||||
}, |
|
||||||
], |
|
||||||
}, |
|
||||||
// 认证测试公司表单校验 |
|
||||||
p2ctRules: { |
|
||||||
name: [ |
|
||||||
{required: true, message: "公司名称不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
creditCode: [ |
|
||||||
{required: true, message: "统一信用代码不能为空", trigger: "blur"}, |
|
||||||
{ |
|
||||||
pattern: |
|
||||||
/^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/, |
|
||||||
message: "请输入正确的统一信用代码", |
|
||||||
trigger: "blur", |
|
||||||
}, |
|
||||||
], |
|
||||||
address: [ |
|
||||||
{required: true, message: "通讯地址不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
webSite: [ |
|
||||||
{required: true, message: "网址不能为空", trigger: "blur"}, |
|
||||||
{ |
|
||||||
pattern: |
|
||||||
/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/|www\.)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/, |
|
||||||
message: "请输入正确的网址", |
|
||||||
trigger: "blur", |
|
||||||
}, |
|
||||||
], |
|
||||||
|
|
||||||
companyDesc: [ |
|
||||||
{required: true, message: "公司简介不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
contactName: [ |
|
||||||
{required: true, message: "联系人姓名不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
contactPosition: [ |
|
||||||
{required: true, message: "联系人职位不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
businessLicenseUrl: [ |
|
||||||
{ |
|
||||||
required: true, |
|
||||||
message: "请上传营业执照", |
|
||||||
trigger: "change", |
|
||||||
}, |
|
||||||
], |
|
||||||
}, |
|
||||||
// 认证测试公司其他状态表单校验 |
|
||||||
c2ctRules: { |
|
||||||
testProjects: [ |
|
||||||
{required: true, message: "测试项目案例不能为空", trigger: "blur"}, |
|
||||||
], |
|
||||||
}, |
|
||||||
materialServerAddr: "", |
|
||||||
allFileGetFlag: false, |
|
||||||
}; |
|
||||||
}, |
|
||||||
created() { |
|
||||||
this.getCertificationStatus(); |
|
||||||
this.getClientConfigKey("material.server").then((response) => { |
|
||||||
this.materialServerAddr = response.msg; |
|
||||||
}); |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
getCertificationStatus() { |
|
||||||
certificationStatus().then((response) => { |
|
||||||
this.testerApplyB = response.testerApply; |
|
||||||
this.companyApplyB = response.companyApply; |
|
||||||
this.initBArray(); |
|
||||||
}); |
|
||||||
}, |
|
||||||
initBArray() { |
|
||||||
this.bArray = this.checkStatus(); |
|
||||||
}, |
|
||||||
checkStatus() { |
|
||||||
|
|
||||||
|
|
||||||
let stateArr = [ |
|
||||||
[true, true], |
|
||||||
["升级为认证公司用户", "升级为测试认证"], |
|
||||||
]; |
|
||||||
if (this.user.companyStatus == 2) { |
|
||||||
if (this.user.testerStatus == 2) { |
|
||||||
stateArr[0][0] = null; |
|
||||||
stateArr[0][1] = true; |
|
||||||
stateArr[0][2] = null; |
|
||||||
stateArr[1][1] = "更新测试公司信息"; |
|
||||||
} else { |
|
||||||
stateArr[0][0] = true; |
|
||||||
stateArr[0][1] = true; |
|
||||||
stateArr[0][2] = null; |
|
||||||
stateArr[1][0] = "更新公司信息"; |
|
||||||
stateArr[1][1] = "升级为认证测试公司"; |
|
||||||
} |
|
||||||
} else { |
|
||||||
if (this.user.testerStatus == 2) { |
|
||||||
stateArr[0][0] = null; |
|
||||||
stateArr[0][1] = null; |
|
||||||
stateArr[0][2] = true; |
|
||||||
stateArr[1][2] = "更新个人测试者信息"; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
//只要有申请按钮就都变灰 |
|
||||||
//check 第一次认证或更新认证信息申请都需要变灰 status 状态:0:unaudit;1:pass;2:unpass; |
|
||||||
if ( |
|
||||||
this.user.companyStatus == 1 || |
|
||||||
this.user.testerStatus == 1 || |
|
||||||
(this.testerApplyB && this.testerApplyB.status == 0) || |
|
||||||
(this.companyApplyB && this.companyApplyB.status == 0) |
|
||||||
) { |
|
||||||
if (stateArr[0][0] != null) { |
|
||||||
stateArr[0][0] = false; |
|
||||||
} |
|
||||||
if (stateArr[0][1] != null) { |
|
||||||
stateArr[0][1] = false; |
|
||||||
} |
|
||||||
if (stateArr[0][2] != null) { |
|
||||||
stateArr[0][2] = false; |
|
||||||
} |
|
||||||
|
|
||||||
// return stateArr; |
|
||||||
this.showAlert = true; //有申请在审核中 |
|
||||||
|
|
||||||
var result = 0; |
|
||||||
var cS = this.user.companyStatus; |
|
||||||
var tS = this.user.testerStatus; |
|
||||||
/*** |
|
||||||
* 申请: |
|
||||||
* 0 p2c |
|
||||||
* 1 p2pt |
|
||||||
* 2 p2ct |
|
||||||
* 3 c2ct |
|
||||||
* 或更新: |
|
||||||
* 4 更新公司 uc |
|
||||||
* 5 更新测试公司 uct |
|
||||||
* 6 更新个人测试者 upt |
|
||||||
*/ |
|
||||||
if (cS == 2) { |
|
||||||
if (tS == 2) { |
|
||||||
result = 5; //uct |
|
||||||
} else if (tS == 1) { |
|
||||||
result = 3; //c2ct |
|
||||||
} else { |
|
||||||
result = 4; //uc |
|
||||||
} |
|
||||||
} else if (cS == 1) { |
|
||||||
if (tS == 2) { |
|
||||||
// 个人测试者无法再继续认证为公司 |
|
||||||
} else if (tS == 1) { |
|
||||||
result = 2; //p2ct |
|
||||||
} else { |
|
||||||
result = 0; //p2c |
|
||||||
} |
|
||||||
} else { |
|
||||||
if (tS == 2) { |
|
||||||
result = 6; //upt |
|
||||||
} else if (tS == 1) { |
|
||||||
result = 1; //p2pt |
|
||||||
} else { |
|
||||||
// 啥都没做哦 |
|
||||||
} |
|
||||||
} |
|
||||||
this.appleTypeStr = apple_type.getDescFromValue(result); |
|
||||||
} else { |
|
||||||
this.showAlert = false; |
|
||||||
} |
|
||||||
|
|
||||||
return stateArr; |
|
||||||
}, |
|
||||||
regCompanyChild() { |
|
||||||
this.getCompanyApplyByUserID(this.user.userId); |
|
||||||
}, |
|
||||||
/** 加载审核页面数据操作 */ |
|
||||||
getCompanyApplyByUserID(userId) { |
|
||||||
this.allFileGetFlag = false; |
|
||||||
getCompanyApplyByUid(userId).then((response) => { |
|
||||||
if (response.data) { |
|
||||||
this.form = response.data; |
|
||||||
} else { |
|
||||||
this.form = { |
|
||||||
applyId: null, |
|
||||||
name: null, |
|
||||||
creditCode: null, |
|
||||||
address: null, |
|
||||||
webSite: null, |
|
||||||
companyDesc: null, |
|
||||||
contactName: null, |
|
||||||
contactPosition: null, |
|
||||||
createTime: null, |
|
||||||
updateTime: null, |
|
||||||
businessLicenseUrl: [], |
|
||||||
otherCQList: [], |
|
||||||
}; |
|
||||||
} |
|
||||||
this.allFileGetFlag = true; |
|
||||||
this.regCompanyOpen = true; |
|
||||||
this.title = "公司用户认证信息"; |
|
||||||
}); |
|
||||||
}, |
|
||||||
p2ptChild() { |
|
||||||
this.p2ptGetApplyByUserID(this.user.userId); |
|
||||||
}, |
|
||||||
/** 加载审核页面数据操作 */ |
|
||||||
p2ptGetApplyByUserID(userId) { |
|
||||||
getTesterApplyByUid(userId).then((response) => { |
|
||||||
if (response.data) { |
|
||||||
this.form = response.data; |
|
||||||
} else { |
|
||||||
this.form = { |
|
||||||
applyId: null, |
|
||||||
name: null, |
|
||||||
city: null, |
|
||||||
idNumber: null, |
|
||||||
testSkills: null, |
|
||||||
testProjects: null, |
|
||||||
workExperience: null, |
|
||||||
certificate: null, |
|
||||||
createTime: null, |
|
||||||
updateTime: null, |
|
||||||
idCardFrontUrl: [], |
|
||||||
idCardBackUrl: [], |
|
||||||
otherTQList: [], |
|
||||||
}; |
|
||||||
} |
|
||||||
this.allFileGetFlag = true; |
|
||||||
this.p2ptOpen = true; |
|
||||||
this.title = "个人测试者认证信息"; |
|
||||||
}); |
|
||||||
}, |
|
||||||
p2ctChild() { |
|
||||||
this.p2ctGetApplyByUserID(this.user.userId); |
|
||||||
}, |
|
||||||
/** 加载审核页面数据操作 */ |
|
||||||
p2ctGetApplyByUserID(userId) { |
|
||||||
certificationStatus().then((response) => { |
|
||||||
if (response.testerApply) { |
|
||||||
this.testerApply = response.testerApply; |
|
||||||
} else { |
|
||||||
this.testerApply = { |
|
||||||
testProjects: null, |
|
||||||
otherInfo: null, |
|
||||||
otherTQList: [], |
|
||||||
}; |
|
||||||
} |
|
||||||
if (response.companyApply) { |
|
||||||
this.companyApply = response.companyApply; |
|
||||||
} else { |
|
||||||
this.companyApply = { |
|
||||||
applyId: null, |
|
||||||
name: null, |
|
||||||
creditCode: null, |
|
||||||
address: null, |
|
||||||
webSite: null, |
|
||||||
companyDesc: null, |
|
||||||
contactName: null, |
|
||||||
contactPosition: null, |
|
||||||
createTime: null, |
|
||||||
updateTime: null, |
|
||||||
businessLicenseUrl: [], |
|
||||||
otherCQList: [], |
|
||||||
}; |
|
||||||
} |
|
||||||
if (response.data) { |
|
||||||
this.userInfo = response.data; |
|
||||||
} else { |
|
||||||
} |
|
||||||
this.allFileGetFlag = true; |
|
||||||
this.p2ctOpen = true; |
|
||||||
this.title = "测试公司认证信息"; |
|
||||||
}); |
|
||||||
}, |
|
||||||
c2ctChild() { |
|
||||||
this.c2ctGetApplyByUserID(this.user.userId); |
|
||||||
}, |
|
||||||
/** 加载审核页面数据操作 */ |
|
||||||
c2ctGetApplyByUserID(userId) { |
|
||||||
getTesterApplyByUid(userId).then((response) => { |
|
||||||
if (response.data) { |
|
||||||
this.form = response.data; |
|
||||||
} else { |
|
||||||
this.form = { |
|
||||||
testProjects: null, |
|
||||||
otherInfo: null, |
|
||||||
otherTQList: [], |
|
||||||
}; |
|
||||||
} |
|
||||||
this.allFileGetFlag = true; |
|
||||||
this.c2ctOpen = true; |
|
||||||
this.title = "测试公司认证信息"; |
|
||||||
}); |
|
||||||
}, |
|
||||||
// 取消按钮 |
|
||||||
p2ptCancel() { |
|
||||||
this.p2ptOpen = false; |
|
||||||
this.reset(); |
|
||||||
}, |
|
||||||
// 取消按钮 |
|
||||||
regCompanyCancel() { |
|
||||||
this.regCompanyOpen = false; |
|
||||||
this.reset(); |
|
||||||
}, |
|
||||||
p2ctCancel() { |
|
||||||
this.p2ctOpen = false; |
|
||||||
this.p2ctReset(); |
|
||||||
}, |
|
||||||
c2ctCancel() { |
|
||||||
this.c2ctOpen = false; |
|
||||||
this.reset(); |
|
||||||
}, |
|
||||||
// 表单重置 |
|
||||||
reset() { |
|
||||||
this.form = {}; |
|
||||||
this.resetForm("form"); |
|
||||||
}, |
|
||||||
//TODO p2ct中包含的两个表单重置 |
|
||||||
p2ctReset() { |
|
||||||
this.companyApply = {}; |
|
||||||
this.resetForm("companyApply"); |
|
||||||
this.testerApply = {}; |
|
||||||
this.resetForm("testerApply"); |
|
||||||
}, |
|
||||||
/** 添加或修改认证公司用户提交按钮 */ |
|
||||||
regCompanySubmitForm() { |
|
||||||
this.$refs["form"].validate((valid) => { |
|
||||||
if (valid) { |
|
||||||
if (this.form.applyId != null) { |
|
||||||
updateCompanyApply(this.form).then((response) => { |
|
||||||
this.$message.success("更新提交成功,请等待审核结果"); |
|
||||||
this.regCompanyOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} else { |
|
||||||
addCompanyApply(this.form).then((response) => { |
|
||||||
this.$message.success("申请提交成功,请等待审核结果"); |
|
||||||
this.regCompanyOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
|
|
||||||
// 添加或修改认证测试公司提交按钮 |
|
||||||
p2ctSubmitForm() { |
|
||||||
this.$refs["companyForm"].validate((valid) => { |
|
||||||
if (valid) { |
|
||||||
if (this.testerApply.applyId != null) { |
|
||||||
updateCompanyApply(this.companyApply).then((response) => { |
|
||||||
updateTesterApply(this.testerApply).then((response) => { |
|
||||||
this.$message.success("更新提交成功,请等待审核结果"); |
|
||||||
this.p2ctOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
} else { |
|
||||||
this.testerApply.applyType = 1; |
|
||||||
addCompanyApply(this.companyApply).then((response) => { |
|
||||||
addTesterApply(this.testerApply).then((response) => { |
|
||||||
this.$message.success("申请提交成功,请等待审核结果"); |
|
||||||
this.p2ctOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
//不同状态下添加或修改认证测试公司提交按钮 |
|
||||||
c2ctSubmitForm() { |
|
||||||
this.$refs["form"].validate((valid) => { |
|
||||||
if (valid) { |
|
||||||
this.form.applyType = 2; |
|
||||||
if (this.form.applyId != null) { |
|
||||||
updateTesterApply(this.form).then((response) => { |
|
||||||
this.$message.success("更新提交成功,请等待审核结果"); |
|
||||||
this.c2ctOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} else { |
|
||||||
addC2CT(this.form).then((response) => { |
|
||||||
this.$message.success("申请提交成功,请等待审核结果"); |
|
||||||
this.c2ctOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
setImgPath(value) { |
|
||||||
if(value){ |
|
||||||
if(this.regCompanyOpen){ |
|
||||||
this.form.otherCQList= value; |
|
||||||
}else if(this.p2ctOpen){ |
|
||||||
this.companyApply.otherCQList= value; |
|
||||||
}else if(this.c2ctOpen){ |
|
||||||
this.form.otherTQList=value |
|
||||||
}else if(this.p2ptOpen){ |
|
||||||
this.form.otherTQList= value; |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
setnoniPath(value){ |
|
||||||
if(value){ |
|
||||||
this.testerApply.otherTQList= value; |
|
||||||
} |
|
||||||
}, |
|
||||||
/** 添加或修改个人测试者提交按钮 */ |
|
||||||
p2ptSubmitForm() { |
|
||||||
this.$refs["form"].validate((valid) => { |
|
||||||
if (valid) { |
|
||||||
this.form.applyType = 0; |
|
||||||
if (this.form.applyId != null) { |
|
||||||
updateTesterApply(this.form).then((response) => { |
|
||||||
this.$message.success("更新提交成功,请等待审核结果"); |
|
||||||
this.p2ptOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} else { |
|
||||||
addTesterApply(this.form).then((response) => { |
|
||||||
this.$message.success("申请提交成功,请等待审核结果"); |
|
||||||
this.p2ptOpen = false; |
|
||||||
this.refreshUserProfile(); |
|
||||||
}); |
|
||||||
} |
|
||||||
} |
|
||||||
}); |
|
||||||
}, |
|
||||||
refreshUserProfile() { |
|
||||||
if (this.refreshProfile) { |
|
||||||
this.refreshProfile(); |
|
||||||
} |
|
||||||
}, |
|
||||||
x2ctChild(){ |
|
||||||
this.certification=true |
|
||||||
}, |
|
||||||
//TODO check 第一次认证成功或更新认证信息成功 |
|
||||||
x2ctChild() { |
|
||||||
// if (this.user.companyStatus == 2) { |
|
||||||
// if (this.user.testerStatus == 2) { |
|
||||||
// this.p2ctChild(); |
|
||||||
// } else { |
|
||||||
// this.c2ctChild(); |
|
||||||
// } |
|
||||||
// } else { |
|
||||||
// if (this.user.testerStatus == 2) { |
|
||||||
// //TODO do nothing ??? |
|
||||||
// } else { |
|
||||||
// this.p2ctChild(); |
|
||||||
// } |
|
||||||
// } |
|
||||||
}, |
|
||||||
}, |
|
||||||
}; |
|
||||||
</script> |
|
||||||
<style scoped > |
|
||||||
.user-userUpgrade-span { |
|
||||||
text-align: center; |
|
||||||
} |
|
||||||
.testuser{ |
|
||||||
display:flex; |
|
||||||
align-items:center; |
|
||||||
justify-content:space-between; |
|
||||||
} |
|
||||||
.testuser>>>.el-button{ |
|
||||||
background:#F2A51A; |
|
||||||
color:#FFFFFF; |
|
||||||
margin-left:50px; |
|
||||||
border: none; |
|
||||||
} |
|
||||||
.dialog-footer{ |
|
||||||
display:flex; |
|
||||||
text-align:right; |
|
||||||
margin-left:550px |
|
||||||
} |
|
||||||
.submitbtn>>>.el-button{ |
|
||||||
background:#0066EB; |
|
||||||
color:#FFFFFF; |
|
||||||
margin-right:30px; |
|
||||||
border: none; |
|
||||||
} |
|
||||||
.examku>>>.el-dialog__title{ |
|
||||||
font-weight:bold; |
|
||||||
color: #0969bd |
|
||||||
} |
|
||||||
</style> |
|
@ -1,37 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<!-- <div style="display:flex;align-items:center"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">众包详情</div> |
|
||||||
</div> --> |
|
||||||
<div style="background: #FFFFFF;border-radius: 4px;margin-top:-15px;margin-left:-130px"> |
|
||||||
<crowddetails :mydetails='mydetails'></crowddetails> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import crowddetails from '@/page/homepage/crowdsourcing/crowddetails' |
|
||||||
export default{ |
|
||||||
components: {crowddetails}, |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
mydetails:true, |
|
||||||
|
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
|
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
|
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,35 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<!-- <div style="display:flex;align-items:center"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">众包市场</div> |
|
||||||
</div> --> |
|
||||||
<div style="background: #FFFFFF;border-radius: 4px;"> |
|
||||||
<crowd></crowd> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import crowd from '@/page/homepage/crowdsourcing/crowd' |
|
||||||
export default{ |
|
||||||
components: {crowd}, |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
|
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
|
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,346 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<!-- <div style="display:flex;align-items:center"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">我的众包</div> |
|
||||||
</div> --> |
|
||||||
<div style="background:#FFFFFF;border-radius:4px;"> |
|
||||||
<div class="crowdnum"> |
|
||||||
<el-radio-group v-model="crowdmol" @change="showDataTypeChage" fill='#0066EB'> |
|
||||||
<el-radio-button label="myClaim" v-if="myClaimShow"> |
|
||||||
<div v-if="crowdmol=='myClaim'" style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/chenggong.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#FFFFFF">我竞标成功的任务</span> |
|
||||||
</div> |
|
||||||
<div v-else style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/chenggong 1.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#4d4d4d">我竞标成功的任务</span> |
|
||||||
</div> |
|
||||||
</el-radio-button> |
|
||||||
<el-radio-button label="myPublish"> |
|
||||||
<div v-if="crowdmol=='myPublish'" style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/fabu1.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#FFFFFF">我发布的任务</span> |
|
||||||
</div> |
|
||||||
<div v-else style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/fabu.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#4d4d4d">我发布的任务</span> |
|
||||||
</div> |
|
||||||
</el-radio-button> |
|
||||||
<el-radio-button label="myApply"> |
|
||||||
<div v-if="crowdmol=='myApply'" style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/ceshishenqing 1.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#FFFFFF">众包发布申请</span> |
|
||||||
</div> |
|
||||||
<div v-else style="display:flex;align-items:center"> |
|
||||||
<img src="/assets/personal/ceshishenqing.png" alt=""> |
|
||||||
<span style="margin-left:6px;color:#4d4d4d">众包发布申请</span> |
|
||||||
</div> |
|
||||||
</el-radio-button> |
|
||||||
<!-- <el-radio-button label="tobeExpired"> |
|
||||||
<img v-if="crowdmol=='tobeExpired'" src="/assets/personal/ceshishenqing 1.png" alt=""> |
|
||||||
<img v-else src="/assets/personal/ceshishenqing.png" alt=""> |
|
||||||
<span style="margin-left:6px">即将到期的任务</span> |
|
||||||
</el-radio-button> |
|
||||||
<el-radio-button label="allTask"> |
|
||||||
<img v-if="crowdmol=='allTask'" src="/assets/personal/ceshishenqing 1.png" alt=""> |
|
||||||
<img v-else src="/assets/personal/ceshishenqing.png" alt=""> |
|
||||||
<span style="margin-left:6px">所有任务</span> |
|
||||||
</el-radio-button> --> |
|
||||||
<!--审核页 <crowdsource-audit ref="crowdsourceAudit" @closeDialog="closeDialog" ></crowdsource-audit> --> |
|
||||||
</el-radio-group> |
|
||||||
<el-form v-if="crowdmol=='allTask'" :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="baseinfo" style="margin-top:30px"> |
|
||||||
<el-form-item label="任务状态" prop="processStatus"> |
|
||||||
<el-select v-model="queryParams.processStatus"> |
|
||||||
<el-option label="请选择" value="">请选择</el-option> |
|
||||||
<el-option label="应征中" value=0>竞标中</el-option> |
|
||||||
<el-option label="测试中" value=1>测试中</el-option> |
|
||||||
<el-option label="没有竞标者,过期下架" value=4>没有竞标者,过期下架</el-option> |
|
||||||
<el-option label="未指定测试者,过期下架" value=5>未指定测试者,过期下架</el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item> |
|
||||||
<el-button type="primary" icon="el-icon-search" size="small" @click="showDataTypeChage('allTask')">搜索</el-button> |
|
||||||
<el-button style="background: #F2A51A;" @click="resetQuery">重置</el-button> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
<el-table v-loading='loading' :data="crowdData" style="margin-top:30px" > |
|
||||||
<el-table-column label="序号" width="100px" align="center"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
{{ scope.$index + 1 }} |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="任务ID" v-if="crowdmol=='allTask'" width="90" align="center" key="taskId" prop="taskId"/> |
|
||||||
<el-table-column label="发布时间" align="center" key="createTime" prop="createTime" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.createTime">{{ parseTime(scope.row.createTime).toString().split(" ")[0]}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="项目名称" align="center" key="projectName" prop="projectName" :show-overflow-tooltip="true" width="260px"/> |
|
||||||
<el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>¥{{scope.row.price}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="任务类型" align="center" key="testType" prop="testType" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{findLabelValueByProp(tasktypelist,scope.row.testType,'id','name')}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="项目工期" align="center" key="period" prop="period" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.period}}天</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<!-- --> |
|
||||||
<el-table-column v-if="crowdmol=='myClaim' || crowdmol=='myPublish'|| crowdmol=='tobeExpired'" |
|
||||||
label="截止日期" align="center" key="expireTime" prop="expireTime" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.expireTime">{{ parseTime(scope.row.expireTime).toString().split(" ")[0]}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column v-if="crowdmol=='myApply'" label="审核状态" align="center" key="1" prop="status" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<el-tag v-if="scope.row.status == 0" type="primary" effect="dark" size="small" style="width:68px;padding-left: 12px;padding-right: 12px;cursor:pointer">待审核</el-tag> |
|
||||||
<el-tag v-else-if="scope.row.status == 1" type="success" effect="dark" size="small" style="cursor:pointer">审核通过</el-tag> |
|
||||||
<el-tag v-else type="danger" effect="dark" size="small" style="cursor:pointer">审核不通过</el-tag> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column v-if="crowdmol !='myApply'" label="任务状态" align="center" key="3" prop="processStatus" :show-overflow-tooltip="true" width="180px"> |
|
||||||
<template slot-scope="scope" > |
|
||||||
<p v-if="scope.row.processStatus"> |
|
||||||
<el-tag :type="scope.row.processStatus==0?'primary':(scope.row.processStatus==1 || scope.row.processStatus==3)?'success':'danger'" effect="dark" |
|
||||||
style="cursor:pointer">{{findByvalue(processStatuslist,scope.row.processStatus)}}</el-tag> |
|
||||||
</p> |
|
||||||
<p v-else> |
|
||||||
暂无 |
|
||||||
</p> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column v-if="crowdmol !='myApply'" label="竞标者总数" align="center" key="appCount" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.personalAppCount + scope.row.companyAppCount}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" |
|
||||||
v-if="(crowdmol=='myApply' && scope.row.status==2) ||((crowdmol=='myPublish') && (scope.row.processStatus==4 || scope.row.processStatus==5 || scope.row.processStatus==6 ||scope.row.processStatus == 7))" |
|
||||||
@click="publishTask(scope.row)" >重新发布 |
|
||||||
</el-button> |
|
||||||
<router-link v-if="crowdmol=='myApply'" :to="{path:'/console/currentcrowd',query:{id:scope.row.applyId,type:crowdmol}}" class="link-type"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-key" >查看详情 |
|
||||||
</el-button> |
|
||||||
</router-link> |
|
||||||
<router-link v-if="crowdmol=='myPublish' || crowdmol=='myClaim'" :to="{path:'/console/currentcrowd',query:{id:scope.row.taskId,type:crowdmol}}" class="link-type"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-key" >查看详情 |
|
||||||
</el-button> |
|
||||||
</router-link> |
|
||||||
<router-link v-if="crowdmol=='tobeExpired' || crowdmol=='allTask'" :to="{path:'/console/currentcrowd',query:{id:scope.row.applyId,type:crowdmol}}" class="link-type"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-key" >查看详情 |
|
||||||
</el-button> |
|
||||||
</router-link> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
<!-- :current-page="currentPage" --> |
|
||||||
<div v-if="total>10" style='width:100%;margin-top:30px;text-align: center;'> |
|
||||||
<el-pagination background |
|
||||||
@current-change="handleCurrentChange" |
|
||||||
|
|
||||||
:page-size="queryParams.pageSize" |
|
||||||
layout="total, prev, pager, next, jumper" |
|
||||||
:total="total"> |
|
||||||
</el-pagination> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<crowdsource-task v-show="crowdmol=='myApply' && task != null" ref="crowdsourceTask"></crowdsource-task> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {findByvalue, findLabelValueByProp} from "@/util/util"; |
|
||||||
import {applicantlist,onsiteTypelist,processStatuslist} from "@/const/dict/commondict"; |
|
||||||
import {crowdlist,homecrowdlist,myClaim, myApply, myPublish} from "@/api/crowdsource/crowdsource"; |
|
||||||
import CrowdsourceTask from "../../common/CrowdsourceTask"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
tasktypelist:[{name:'静态测试',id:'static'},{name:'功能测试',id:'function'},{name:'性能测试',id:'performance'},{name:'安全测试',id:'security'}, |
|
||||||
{name:'配置项测试',id:'configuration'},{name:'可靠性测试',id:'reliability'}, {name:'研发任务',id:'development'},{name:'用人任务',id:'outsource'},{name:'其他',id:'other'}], |
|
||||||
crowdmol:'myApply', |
|
||||||
crowdData:[], |
|
||||||
task:null, |
|
||||||
// currentPage:'1', |
|
||||||
loading: false, |
|
||||||
myClaimShow: true, |
|
||||||
// companyStatus: 0, |
|
||||||
// testerStatus: 0, |
|
||||||
processStatuslist,//任务状态 |
|
||||||
// 总条数 |
|
||||||
total: 0, |
|
||||||
// 查询参数 |
|
||||||
queryParams: { |
|
||||||
pageNum: 1, |
|
||||||
pageSize: 10, |
|
||||||
taskStatus:undefined, |
|
||||||
processStatus:undefined |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['testtypelist','feescopelist','companyStatus','testerStatus','userinform']) |
|
||||||
}, |
|
||||||
components:{CrowdsourceTask}, |
|
||||||
mounted(){ |
|
||||||
// this.companyStatus = store.getters.companyStatus; |
|
||||||
// this.testerStatus = store.getters.testerStatus; |
|
||||||
if (this.companyStatus == 2 && this.testerStatus !=2) { |
|
||||||
this.myClaimShow = false; |
|
||||||
// if (store.getters.activeName == 'myPublish' || store.getters.activeName == 'myClaim' || store.getters.activeName == 'myApply') |
|
||||||
// this.activeName = store.getters.activeName; |
|
||||||
// else |
|
||||||
// this.activeName = 'myPublish'; |
|
||||||
} else { |
|
||||||
// if (store.getters.activeName == 'myPublish' || store.getters.activeName == 'myClaim' || store.getters.activeName == 'myApply') |
|
||||||
// this.activeName = store.getters.activeName; |
|
||||||
} |
|
||||||
this.showDataTypeChage('myApply') |
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
findByvalue, |
|
||||||
findLabelValueByProp, |
|
||||||
showDataTypeChage(val){ |
|
||||||
if (val == 'myApply'){ |
|
||||||
this.listMyApply(); |
|
||||||
} |
|
||||||
else if (val == 'myPublish'){ |
|
||||||
this.listMyPublish(); |
|
||||||
} |
|
||||||
else if (val == 'myClaim'){ |
|
||||||
this.listMyClaim(); |
|
||||||
} |
|
||||||
else if (val == 'tobeExpired'){ |
|
||||||
this.listTobeExpired(); |
|
||||||
} |
|
||||||
else if (val == 'allTask'){ |
|
||||||
this.listAllTask(); |
|
||||||
} |
|
||||||
}, |
|
||||||
//众包发布申请 |
|
||||||
listMyApply() { |
|
||||||
this.loading = true; |
|
||||||
myApply(this.queryParams).then(response => { |
|
||||||
this.crowdData = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
// 我发布的任务 |
|
||||||
listMyPublish() { |
|
||||||
this.loading = true; |
|
||||||
myPublish(this.queryParams).then(response => { |
|
||||||
this.crowdData = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
//我应征成功的任务 |
|
||||||
listMyClaim() { |
|
||||||
this.loading = true; |
|
||||||
// |
|
||||||
myClaim(this.queryParams,this.userinform.userId).then(response => { |
|
||||||
this.crowdData = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
// 即将到期的任务 |
|
||||||
listTobeExpired(){ |
|
||||||
this.loading = true; |
|
||||||
this.queryParams.queryType = 1; |
|
||||||
homecrowdlist(this.queryParams).then(response => { |
|
||||||
this.crowdData = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
// 所有任务 |
|
||||||
listAllTask(){ |
|
||||||
this.loading = true; |
|
||||||
this.queryParams.queryType = 2; |
|
||||||
homecrowdlist(this.queryParams).then(response => { |
|
||||||
this.crowdData = response.rows; |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
//当前页码 |
|
||||||
handleCurrentChange(val) { |
|
||||||
this.queryParams.pageNum=val; |
|
||||||
this.showDataTypeChage(this.crowdmol) |
|
||||||
}, |
|
||||||
// 重新发布 |
|
||||||
publishTask(task) { |
|
||||||
this.task = task; |
|
||||||
this.$refs.crowdsourceTask.openDialog(task); |
|
||||||
}, |
|
||||||
//重置 |
|
||||||
resetQuery() { |
|
||||||
// this.dateRange = []; |
|
||||||
this.resetForm("queryForm"); |
|
||||||
this.queryParams.pageNum=1 |
|
||||||
this.showDataTypeChage(this.crowdmol) |
|
||||||
// this.listAllTask(); |
|
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-radio-button__inner{ |
|
||||||
background:#ebebed; |
|
||||||
border:none; |
|
||||||
margin-right:20px; |
|
||||||
color: #4D4D4D; |
|
||||||
display:flex; |
|
||||||
align-items: center; |
|
||||||
/* font-weight:bold; */ |
|
||||||
} |
|
||||||
.crowdnum>>>.el-radio-button:first-child .el-radio-button__inner{ |
|
||||||
border-radius:0; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-radio-button:last-child .el-radio-button__inner{ |
|
||||||
border-radius:0; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#0e0c0c; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table td{ |
|
||||||
/* text-align:center; */ |
|
||||||
background-color:#FAF9F9; |
|
||||||
height:60px; |
|
||||||
color:#666666; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
.baseinfo>>>.el-button{ |
|
||||||
width:90px; |
|
||||||
height:30px; |
|
||||||
background: #0066EB; |
|
||||||
border-radius: 4px; |
|
||||||
margin-left:20px; |
|
||||||
color:#FFFFFF; |
|
||||||
margin-top:5px; |
|
||||||
line-height:9px; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,161 +0,0 @@ |
|||||||
<template> |
|
||||||
<el-dialog title="竞标者详情" :visible.sync="open" :close-on-click-modal="false" width="800px" append-to-body> |
|
||||||
<el-form label-width="130px" class="demo-ruleForm" v-loading="loading"> |
|
||||||
<el-row> |
|
||||||
<el-col :span="24" v-if="tester.name"> |
|
||||||
<el-form-item label="测试者姓名"> {{tester.name}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="24" v-if="user.nickName"> |
|
||||||
<el-form-item label="昵称"> {{user.nickName}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row> |
|
||||||
<el-col :span="12" v-if="user.userName"> |
|
||||||
<el-form-item label="用户名"> {{user.userName}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="12"> |
|
||||||
<el-form-item label="性别"> {{user.sex == 0 ? "男" : "女"}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="12" v-if="tester.city"> |
|
||||||
<el-form-item label="现居住地"> {{tester.city}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
|
|
||||||
|
|
||||||
</el-row> |
|
||||||
<el-row> |
|
||||||
<el-col :span="12"> |
|
||||||
<el-form-item label="手机"> {{user.phonenumber}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="12"> |
|
||||||
<el-form-item label="邮箱"> {{user.email}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<!-- <el-row v-if="user.companyStatus==0"> |
|
||||||
<el-col :span="24" v-if="tester&&tester.testProjects"> |
|
||||||
<el-form-item label="测试项目经验"> {{tester.testProjects}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> --> |
|
||||||
<el-row v-if="user.companyStatus==0"> |
|
||||||
<el-col :span="24" v-if="tester.certificate"> |
|
||||||
<el-form-item label="证书和奖励"> {{tester.certificate}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==0"> |
|
||||||
<el-col :span="24" v-if="tester.workExperience" > |
|
||||||
<el-form-item label="工作简历"> |
|
||||||
{{tester.workExperience}} |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==2"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="公司名称"> {{company.name}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==2"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="公司地址"> {{company.address}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==2"> |
|
||||||
<el-col :span="12"> |
|
||||||
<el-form-item label="联系人"> {{company.contactName}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="12"> |
|
||||||
<el-form-item label="联系人电话"> {{company.contactTel}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==2"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="公司简介"> {{company.companyDesc}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="user.companyStatus==2"> |
|
||||||
<el-col :span="24" v-if="tester&&tester.testProjects"> |
|
||||||
<el-form-item label="测试项目经验"> {{tester.testProjects}} </el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-form-item label="备注信息" v-if="tester.remark"> {{tester.remark}} </el-form-item> |
|
||||||
<!-- <el-form-item label="相关资料"> |
|
||||||
<div v-for="(item,key) in fileList " :key='key'> {{item.fileName}} <el-link @click="downloadFile(item.fileId)" type="primary">下载</el-link></div> |
|
||||||
</el-form-item> --> |
|
||||||
<el-form-item style="text-align:center" label-width="0px"> |
|
||||||
<!-- <el-button type="primary" @click="assign" :disabled="status!=0" style="margin-right:10px">选中</el-button> --> |
|
||||||
<el-button type="primary" @click="cancel(false)" >取消</el-button> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
</el-dialog> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
|
|
||||||
import {getUserDetail} from "@/api/system/user.js"; |
|
||||||
import {assignTester} from "@/api/crowdsource/crowdsource"; |
|
||||||
|
|
||||||
export default { |
|
||||||
name: "TesterDetail", |
|
||||||
props: { |
|
||||||
status: Number, |
|
||||||
taskId: Number |
|
||||||
}, |
|
||||||
data() { |
|
||||||
return { |
|
||||||
open:false, |
|
||||||
user: {}, |
|
||||||
tester: {}, |
|
||||||
company: {}, |
|
||||||
fileList:[], |
|
||||||
loading:true, |
|
||||||
userId:0, |
|
||||||
} |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
viewDetail(userId){ |
|
||||||
this.userId = userId; |
|
||||||
this.open = true; |
|
||||||
this.loading = true; |
|
||||||
getUserDetail(userId).then(response => { |
|
||||||
this.user = response.user; |
|
||||||
if (response.company != null) |
|
||||||
this.company = response.company; |
|
||||||
if (response.tester != null) |
|
||||||
this.tester = response.tester; |
|
||||||
if (response.fileList != null) { |
|
||||||
this.fileList = response.fileList; |
|
||||||
} |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
assign(){ |
|
||||||
this.$confirm("确认要将众包任务指定给该测试者吗?").then(() => { |
|
||||||
let param = {}; |
|
||||||
param.testerId = this.userId; |
|
||||||
param.taskId = this.taskId; |
|
||||||
assignTester(param).then(response => { |
|
||||||
this.cancel(true); |
|
||||||
}) |
|
||||||
}) |
|
||||||
}, |
|
||||||
cancel(isFresh){ |
|
||||||
this.open = false; |
|
||||||
this.$emit("closeDialog", isFresh) |
|
||||||
}, |
|
||||||
downloadFile(fileUrl) { |
|
||||||
const loading = this.$loading({ |
|
||||||
lock: true, |
|
||||||
text: '正在下载,请稍后...', |
|
||||||
spinner: 'el-icon-loading', |
|
||||||
background: 'rgba(0, 0, 0, 0.7)' |
|
||||||
}); |
|
||||||
downloadFast(fileUrl, loading); |
|
||||||
} |
|
||||||
}, |
|
||||||
created() { |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped> |
|
||||||
|
|
||||||
</style> |
|
@ -1,412 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<div style="background: #FFFFFF;border-radius: 4px;margin-top:26px;"> |
|
||||||
<div style="margin:0 20px" class="crowdnum"> |
|
||||||
<div class="backbtn"> |
|
||||||
<el-button icon="el-icon-arrow-left" @click='backroute'>返回</el-button> |
|
||||||
</div> |
|
||||||
<div style="display:flex;align-items:center;margin:30px 0"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">任务信息</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div style="display:flex"> |
|
||||||
<div class="taskd"> |
|
||||||
<p>名称</p> |
|
||||||
<p v-if="crowdtype=='myApply'">{{task.projectName}}</p> |
|
||||||
<p v-else> {{task.project_name}}</p> |
|
||||||
<!-- style="width:580px;" --> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>赏金金额</p> |
|
||||||
<p style="width:260px">{{task.price | currency('¥')}}</p> |
|
||||||
</div> |
|
||||||
<div> |
|
||||||
<div v-if="crowdtype=='myApply'" class="taskd"> |
|
||||||
<p>审核状态</p> |
|
||||||
<div style="width:220px"> |
|
||||||
|
|
||||||
<p v-if="task.status" > |
|
||||||
<el-tag v-if="task.status == 0" type="primary" effect="dark" size="small" style="width:68px;padding-left: 12px;padding-right: 12px;cursor:pointer">待审核</el-tag> |
|
||||||
<el-tag v-else-if="task.status == 1" type="success" effect="dark" size="small" style="cursor:pointer">审核通过</el-tag> |
|
||||||
<el-tag v-else type="danger" effect="dark" size="small" style="cursor:pointer">审核不通过</el-tag> |
|
||||||
</p> |
|
||||||
<p v-else>无</p> |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
<div v-else class="taskd"> |
|
||||||
<p v-if="crowdtype=='competitive'">审核状态</p> |
|
||||||
<p v-else>任务状态</p> |
|
||||||
<p > |
|
||||||
<el-tag :type="task.process_status==0?'warning':task.process_status==1?'primary':task.process_status==3?'success':'danger'" effect="dark" |
|
||||||
style="cursor:pointer">{{findByvalue(processStatuslist,parseInt(task.process_status))}}</el-tag> |
|
||||||
</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div style="display:flex;"> |
|
||||||
|
|
||||||
<div class="taskd"> |
|
||||||
<p>竞标者总数</p> |
|
||||||
<div > |
|
||||||
|
|
||||||
<p v-if="task.company_app_count || task.personal_app_count">{{(task.company_app_count + task.personal_app_count) == 20 ? "已满":(task.company_app_count + task.personal_app_count) +'人' }}</p> |
|
||||||
<p v-else>暂无</p> |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
</div> |
|
||||||
|
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div style="display:flex"> |
|
||||||
<div class="taskd"> |
|
||||||
<p>测试类型</p> |
|
||||||
<p v-if="crowdtype=='myApply'"> {{findLabelValueByProp(testtypelist,task.testType,'dictValue','dictLabel')}}</p> |
|
||||||
<p v-else>{{findLabelValueByProp(testtypelist,task.test_type,'dictValue','dictLabel')}}</p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>发布日期</p> |
|
||||||
<p v-if="crowdtype=='myApply'" style="width:260px">{{task.createTime}}</p> |
|
||||||
<p v-else style="width:260px">{{task.create_time&&task.create_time.slice(0,10)}}</p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>发布有效期</p> |
|
||||||
<p v-if="crowdtype=='myApply'">{{task.validDays}} 天 </p> |
|
||||||
<p v-else> {{task.valid_days}} 天 </p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>项目工期</p> |
|
||||||
<p>{{task.period}}天</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div style="display:flex"> |
|
||||||
<div class="taskd"> |
|
||||||
<p>竞标者要求</p> |
|
||||||
<p v-if="crowdtype=='myApply'">{{findByvalue(applicantlist,task.applicantType)}}</p> |
|
||||||
<p v-else>{{findByvalue(applicantlist,task.applicant_type)}}</p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>技能要求</p> |
|
||||||
<p v-if="crowdtype=='myApply'" style="width:260px">{{task.techNeed}} </p> |
|
||||||
<p v-else style="width:260px"> {{task.tech_need}}</p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>驻场要求</p> |
|
||||||
<p v-if="crowdtype=='myApply'"> {{findByvalue(onsiteTypelist,task.onsiteType)}} </p> |
|
||||||
<p v-else> {{findByvalue(onsiteTypelist,task.onsite_type)}} </p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>地域要求</p> |
|
||||||
<p>{{task.area}}</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>项目简介</p> |
|
||||||
<p v-if="crowdtype=='myApply'" style="width:100%;"> {{task.projectDesc}} </p> |
|
||||||
<p v-else style="width:100%;">{{task.project_desc}}</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>备注信息</p> |
|
||||||
<p style="width:100%;">{{task.remark}}</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div v-if="crowdtype=='myPublish' || crowdtype=='competitive'" style="margin-top:30px;"> |
|
||||||
<el-divider v-if="task.processStatus==0 || task.processStatus==1" content-position="left"><h3>任务提醒</h3></el-divider> |
|
||||||
<el-form label-width="150px" class="demo-ruleForm" label-position="left" style="margin-top:20px"> |
|
||||||
<el-row v-if="task.processStatus==0"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="发布有效期截止"> |
|
||||||
{{task.expireTime}} |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="task.processStatus==1"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="工期截止"> |
|
||||||
{{task.deadline}} |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
</el-form> |
|
||||||
<div style="display:flex;align-items:center;margin:30px 0"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">竞标者名单</div> |
|
||||||
</div> |
|
||||||
<el-table v-loading="loading" :data="applicantdataList" border style="width:95%;margin-top:30px"> |
|
||||||
<el-table-column label="序号" align="center" type="index" width="60"></el-table-column> |
|
||||||
<el-table-column label="竞标时间" align="center" key="applyTime" prop="applyTime" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{ parseTime(scope.row.applyTime) }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="竞标者类型" align="center" key="testerType" prop="testerType"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{ scope.row.testerType==2 ? "认证测试公司" : "个人测试者"}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="名称" align="center" key="userName" prop="userName"/> |
|
||||||
<el-table-column label="状态" align="center" key="status" prop="status" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{ scope.row.status==0 ? "竞标中" :scope.row.status==1 ?"竞标成功":'竞标失败'}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="viewTesterDetail(scope.row.applicantId)" > |
|
||||||
查看详情 |
|
||||||
</el-button> |
|
||||||
<el-button v-if="crowdtype=='myPublish'" :disabled="task.process_status!=0" size="mini" type="text" icon="el-icon-key" @click="assignTester(scope.row.applicantId)" > |
|
||||||
选中 |
|
||||||
</el-button> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
<div v-if="total>10" style='width:100%;margin-top:30px;text-align:right;'> |
|
||||||
<el-pagination background |
|
||||||
@size-change="handleSizeChange" |
|
||||||
@current-change="handleCurrentChange" |
|
||||||
:current-page="currentPage" |
|
||||||
:page-size="pageSize" |
|
||||||
layout="total, prev, pager, next, jumper" |
|
||||||
:total="total"> |
|
||||||
</el-pagination> |
|
||||||
</div> |
|
||||||
<tester-detail ref="testerDetail" :status="task.processStatus" :taskId="task.taskId" @closeDialog="closeDialog"></tester-detail> |
|
||||||
</div> |
|
||||||
<div v-if="crowdtype=='myApply'&& task.status != 0"> |
|
||||||
<div style="display:flex;align-items:center;margin:30px 0"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">审核信息</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div style="display:flex"> |
|
||||||
<div class="taskd"> |
|
||||||
<p>审核状态</p> |
|
||||||
<p> |
|
||||||
<el-tag v-if="task.status == 0" type="primary" effect="dark" size="small" style="width:68px;padding-left: 12px;padding-right: 12px;cursor:pointer">待审核</el-tag> |
|
||||||
<el-tag v-else-if="task.status == 1" type="success" effect="dark" size="small" style="cursor:pointer">审核通过</el-tag> |
|
||||||
<el-tag v-else type="danger" effect="dark" size="small" style="cursor:pointer">审核不通过</el-tag> |
|
||||||
</p> |
|
||||||
</div> |
|
||||||
<div class="taskd"> |
|
||||||
<p>审核时间</p> |
|
||||||
<p style="width:260px">{{task.auditTime}}</p> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div class="taskd"> |
|
||||||
<p>审核意见</p> |
|
||||||
<p>{{task.auditOpinion}}</p> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
</div> |
|
||||||
<div v-if="crowdtype=='myClaim'"> |
|
||||||
<el-divider v-if="task.processStatus==0 || task.processStatus==1" content-position="left"><h3>任务提醒</h3></el-divider> |
|
||||||
<el-form label-width="150px" class="demo-ruleForm" label-position="left"> |
|
||||||
<el-row v-if="task.processStatus==0"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="发布有效期截止"> |
|
||||||
{{task.expireTime}} |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
<el-row v-if="task.processStatus==1"> |
|
||||||
<el-col :span="24"> |
|
||||||
<el-form-item label="工期截止"> |
|
||||||
{{task.deadline}} |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
</el-form> |
|
||||||
<el-divider content-position="left"><h3>发布者信息</h3></el-divider> |
|
||||||
<el-form> |
|
||||||
<el-form-item label="公司名称" v-if="company.name !=null"> |
|
||||||
{{company.name}} |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="公司简介" v-if="company.companyDesc !=null"> |
|
||||||
{{company.companyDesc}} |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="公司联系人"> |
|
||||||
{{company.contactName}} |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="联系电话"> |
|
||||||
{{company.contactTel}} |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
</div> |
|
||||||
<div style="width: 1200px;display: inline-block;text-align: center;margin-top: 10px;"> |
|
||||||
<el-button type="primary" v-if="crowdtype=='myApply'&& task.status == 2" @click="publishTask" class="btn-yellow">修改并重新发布</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<!-- v-show="task.status ==1" --> |
|
||||||
<crowdsource-task ref="crowdsourceTask"></crowdsource-task> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {getApply,getApplicant,assignTester,getById} from "@/api/crowdsource/crowdsource"; |
|
||||||
import CrowdsourceTask from "../../common/CrowdsourceTask"; |
|
||||||
import {findByvalue, findLabelValueByProp} from "@/util/util"; |
|
||||||
import TesterDetail from "./TesterDetail"; |
|
||||||
import {applicantlist,onsiteTypelist,processStatuslist} from "@/const/dict/commondict"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
resultOpen:false, |
|
||||||
loading:false, |
|
||||||
crowdtype:'',//类型 |
|
||||||
id:'',//众包id |
|
||||||
applicantdataList:[],//竞标者名单 |
|
||||||
total:'',pageNum:1,pageSize:10, |
|
||||||
task:{},//任务详情 |
|
||||||
company:{},//公司信息 |
|
||||||
publisher:{},// |
|
||||||
onsiteTypelist,//驻场需求 |
|
||||||
applicantlist,//竞标者要求 |
|
||||||
processStatuslist,//任务状态 |
|
||||||
} |
|
||||||
}, |
|
||||||
components: {CrowdsourceTask,TesterDetail}, |
|
||||||
computed:{ |
|
||||||
...mapGetters(['testtypelist','feescopelist','token','userinform']) |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
this.id=this.$route.query.id; |
|
||||||
this.crowdtype=this.$route.query.type; |
|
||||||
if(this.crowdtype=='myApply'){ |
|
||||||
getApply(this.id).then(response => { |
|
||||||
this.task = response.data; |
|
||||||
this.task.status=this.task.status+'' |
|
||||||
}); |
|
||||||
}else{ |
|
||||||
// 我发布的/我应征成功的 获取公司信息company |
|
||||||
getById(this.id).then(response => { |
|
||||||
if (response.task != null) |
|
||||||
this.task = response.task; |
|
||||||
if (response.company != null) |
|
||||||
this.company = response.company; |
|
||||||
if (response.publisher != null) |
|
||||||
this.publisher = response.publisher; |
|
||||||
}).catch((err)=>{ |
|
||||||
}) |
|
||||||
} |
|
||||||
if(this.id){ |
|
||||||
this.getmenber() |
|
||||||
} |
|
||||||
|
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
findByvalue, |
|
||||||
findLabelValueByProp, |
|
||||||
// 竞标者名单 |
|
||||||
getmenber(){ |
|
||||||
getApplicant(this.id).then(response => { |
|
||||||
this.applicantdataList = response.data; |
|
||||||
}) |
|
||||||
}, |
|
||||||
backroute(){ |
|
||||||
this.$router.go(-1) |
|
||||||
}, |
|
||||||
//竞标者名单选中 |
|
||||||
assignTester(userId) { |
|
||||||
this.$confirm("确认要将众包任务指定给该测试者吗?").then(() => { |
|
||||||
let param = {}; |
|
||||||
param.testerId = userId; |
|
||||||
param.taskId = this.task.task_id; |
|
||||||
assignTester(param).then(response => { |
|
||||||
this.applicantList = response.data; |
|
||||||
this.task.process_status = response.task.processStatus; |
|
||||||
this.getmenber() |
|
||||||
}) |
|
||||||
}) |
|
||||||
}, |
|
||||||
//竞标者名单查看详情 |
|
||||||
viewTesterDetail(userId) { |
|
||||||
this.userId = userId; |
|
||||||
this.$refs.testerDetail.viewDetail(userId); |
|
||||||
}, |
|
||||||
// 修改重新发布 |
|
||||||
publishTask(){ |
|
||||||
this.$refs.crowdsourceTask.openDialog(this.task); |
|
||||||
}, |
|
||||||
//关闭测试者详情 |
|
||||||
closeDialog(isFresh) { |
|
||||||
if (isFresh) { |
|
||||||
// getApplicant(this.id).then(response => { |
|
||||||
// this.applicantList = response.data; |
|
||||||
// }) |
|
||||||
this.getmenber() |
|
||||||
getById(this.id).then(response => { |
|
||||||
this.task = response.task; |
|
||||||
this.$refs.taskInfo.setTask(this.task); |
|
||||||
}) |
|
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
//当前页码 |
|
||||||
handleCurrentChange(val) { |
|
||||||
this.pageNum=val; |
|
||||||
this.getList(); |
|
||||||
}, |
|
||||||
}, |
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
.backbtn>>>.el-button{ |
|
||||||
width: 80px; |
|
||||||
height: 36px; |
|
||||||
background:#0066EB; |
|
||||||
color:#FFFFFF; |
|
||||||
line-height:35px; |
|
||||||
padding:0 15px; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-divider--horizontal{ |
|
||||||
margin:13px 0; |
|
||||||
} |
|
||||||
.taskd{ |
|
||||||
color: #4D4D4D; |
|
||||||
display:flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.taskd p{ |
|
||||||
margin:0; |
|
||||||
text-align: left; |
|
||||||
font-size:14px; |
|
||||||
} |
|
||||||
.taskd p:nth-child(1){ |
|
||||||
font-weight: bold; |
|
||||||
width:100px; |
|
||||||
} |
|
||||||
.taskd p:nth-child(2){ |
|
||||||
width:220px; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#0e0c0c; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table td{ |
|
||||||
/* text-align:center; */ |
|
||||||
background-color:#FAF9F9; |
|
||||||
height:60px; |
|
||||||
color:#666666; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
|
|
||||||
</style> |
|
@ -1,149 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="crowdnum"> |
|
||||||
<el-table :data="crowdData" style="margin-top:30px" > |
|
||||||
<el-table-column label="序号" width="100px" align="center"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
{{ scope.$index + 1 }} |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="发布时间" align="center" key="createTime" prop="createTime" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.createTime">{{ parseTime(scope.row.createTime).toString().split(" ")[0]}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="项目名称" align="center" key="projectName" prop="projectName" :show-overflow-tooltip="true" width="260px"/> |
|
||||||
<el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>¥{{scope.row.price}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="任务类型" align="center" key="testType" prop="testType" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{findLabelValueByProp(tasktypelist,scope.row.testType,'dictValue', 'dictLabel')}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="项目工期" align="center" key="period" prop="period" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.period}}天</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
|
|
||||||
<el-table-column label="任务状态" align="center" key="3" prop="processStatus" :show-overflow-tooltip="true" width="180px"> |
|
||||||
<template slot-scope="scope" > |
|
||||||
<p v-if="scope.row.processStatus" style="margin:0" class="tagcls"> |
|
||||||
<el-tag :type="scope.row.processStatus==0?'warning':scope.row.processStatus==1?'primary':scope.row.processStatus==3?'danger':'danger'" effect="dark" |
|
||||||
style="cursor:pointer">{{findByvalue(processStatuslist,parseInt(scope.row.processStatus))}}</el-tag> |
|
||||||
</p> |
|
||||||
<p v-else> |
|
||||||
暂无 |
|
||||||
</p> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
|
|
||||||
<el-table-column label="竞标者总数" align="center" key="appCount" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.personalAppCount + scope.row.companyAppCount}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<div style="display:flex;align-items:center;justify-content: space-evenly;"> |
|
||||||
<router-link :to="{path:'/console/currentcrowd',query:{id:scope.row.taskId,type:'myPublish'}}" class="link-type"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-key" >查看详情 |
|
||||||
</el-button> |
|
||||||
</router-link> |
|
||||||
<p @click="confirmpay(scope.row)" style="color:#409EFF;font-size: 12px;cursor:pointer">确认付款</p> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
<!-- <div v-if="total>10" style='width:100%;margin-top:30px;text-align: center;'> |
|
||||||
<el-pagination background |
|
||||||
@current-change="handleCurrentChange" |
|
||||||
:page-size="queryParams.pageSize" |
|
||||||
layout="total, prev, pager, next, jumper" |
|
||||||
:total="total"> |
|
||||||
</el-pagination> |
|
||||||
</div> --> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {myPublish,payconfirm} from "@/api/crowdsource/crowdsource"; |
|
||||||
import {processStatuslist} from "@/const/dict/commondict"; |
|
||||||
import {findByvalue, findLabelValueByProp} from "@/util/util"; |
|
||||||
import mixin from '@/mixin/index.js' |
|
||||||
export default{ |
|
||||||
mixins: [mixin], |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
crowdData:[], |
|
||||||
total: 0, |
|
||||||
queryParams: { |
|
||||||
pageNum: 1, |
|
||||||
pageSize:99, |
|
||||||
taskStatus:undefined, |
|
||||||
processStatus:undefined |
|
||||||
}, |
|
||||||
processStatuslist,//任务状态 |
|
||||||
|
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
this.listMyPublish() |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['userinform']) |
|
||||||
}, |
|
||||||
|
|
||||||
methods:{ |
|
||||||
findByvalue, |
|
||||||
findLabelValueByProp, |
|
||||||
// 我发布的任务 |
|
||||||
listMyPublish() { |
|
||||||
myPublish(this.queryParams).then(response => { |
|
||||||
let rowdata = response.rows; |
|
||||||
rowdata.forEach(item=>{ |
|
||||||
item.processStatus=item.processStatus+'' |
|
||||||
}) |
|
||||||
this.crowdData=rowdata.filter(item=>item.processStatus==3) |
|
||||||
this.total = response.total; |
|
||||||
this.loading = false; |
|
||||||
}) |
|
||||||
}, |
|
||||||
//当前页码 |
|
||||||
handleCurrentChange(val) { |
|
||||||
this.queryParams.pageNum=val; |
|
||||||
this.listMyPublish |
|
||||||
}, |
|
||||||
confirmpay(row){ |
|
||||||
this.$confirm("确定当前任务已付款").then(()=>{ |
|
||||||
payconfirm({taskId:row.taskId}).then(res=>{ |
|
||||||
if(res.code==200){ |
|
||||||
this.$message.success('确认完成') |
|
||||||
this.listMyPublish() |
|
||||||
} |
|
||||||
}) |
|
||||||
}) |
|
||||||
}, |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.crowdnum>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#666666; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table td{ |
|
||||||
/* text-align:center; */ |
|
||||||
background-color:#FFFFFF; |
|
||||||
height:60px; |
|
||||||
color:#333333; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
</style> |
|
@ -1,318 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<!-- <div style="display:flex;align-items:center"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">我的购物车</div> |
|
||||||
</div> --> |
|
||||||
<div style="background: #FFFFFF;border-radius: 4px;"> |
|
||||||
<div class="cartnum"> |
|
||||||
<el-table v-loading="loading" :data="cartdata" ref="multipleTable" @selection-change="handleSelectionChange" border> |
|
||||||
<el-table-column type="selection" width="55"> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="商品名称" align="center" key="name" prop="name" :show-overflow-tooltip="true"/> |
|
||||||
<el-table-column label="数量" align="center" key="amount" prop="amount" width="220px"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<el-input-number v-model="scope.row.amount" :min="1" :max="999" label="描述文字"></el-input-number> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="规格" align="center" key="deliverType" prop="deliverType" :show-overflow-tooltip="true"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.deliverType=='License' ? '按月':'按次'}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="单价" align="center" key="price" prop="price" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.price}}元</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="订单总金额" align="center" :show-overflow-tooltip="true" width="100px"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{scope.row.price * scope.row.amount}}元</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="加入购物车时间" align="center" key="createTime" prop="createTime" width="200px"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span>{{parseTime(scope.row.createTime) }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<router-link :to="'/console/mytooldetails?id='+ scope.row.toolId" class="link-type"> |
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit">商品详情 |
|
||||||
</el-button> |
|
||||||
</router-link> |
|
||||||
<el-button style="margin-left:10px" size="mini" type="text" icon="el-icon-remove" @click="handleRemove(scope.row)">移除 |
|
||||||
</el-button> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
<div class="counter"> |
|
||||||
<p style="font-weight: bold;margin-right:10px">所选商品总金额: |
|
||||||
<span style='color:#E84C3D'> ¥{{totalFee}}</span> |
|
||||||
</p> |
|
||||||
<el-button @click="multipleRemovetool">移除</el-button> |
|
||||||
<el-button style="background: #F2A51A;" @click="clearCarttool()">清空购物车</el-button> |
|
||||||
</div> |
|
||||||
<el-divider></el-divider> |
|
||||||
<div class="payclass"> |
|
||||||
<p style="font-weight: bold;font-size:19px;margin-right:10px">支付方式:</p> |
|
||||||
<el-radio v-model="paytype" label="ali"> |
|
||||||
<img src="/assets/personal/zhifubao.png" alt=""> |
|
||||||
<p style="margin-left:15px">支付宝</p> |
|
||||||
</el-radio> |
|
||||||
<el-radio v-model="paytype" label="wx"> |
|
||||||
<img src="/assets/personal/weixinzhifu.png" alt=""> |
|
||||||
<p style="margin-left:15px">微信</p> |
|
||||||
</el-radio> |
|
||||||
<el-button @click="immediatepay">立即支付</el-button> |
|
||||||
</div> |
|
||||||
<qrcode value="https://qr.alipay.com/bax06461ioqvmutyhrni55f5" :options="options" ></qrcode> |
|
||||||
|
|
||||||
<el-dialog title="" :visible.sync="boxShow" width="600px" :before-close="handleClose" class="qcode"> |
|
||||||
<div style="width:500px;margin:0 auto;text-align:center"> |
|
||||||
<!-- <canvas width="150px" height="150px"></canvas> |
|
||||||
<div id="qrcode" ref="qrcode"></div> --> |
|
||||||
<qrcode :value="codeUrl" :options="options" ></qrcode> |
|
||||||
<div style="margin-top:20px;font-size: 16px;">扫描微信二维码支付</div> |
|
||||||
</div> |
|
||||||
</el-dialog> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {getMyShoppingCart, removeShoppingCart, multipleRemove, clearCart} from "@/api/my/my"; |
|
||||||
import {buyTools, noPayMore, queryOrderState} from "@/api/toolInfo/market"; |
|
||||||
import VueQrcode from "@xkeshi/vue-qrcode"; |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
// import QRCode from 'qrcodejs2' |
|
||||||
import store from "@/store"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
loading:false, |
|
||||||
boxShow:false, |
|
||||||
cartdata:[], |
|
||||||
totalFee:'', |
|
||||||
paytype:'ali', |
|
||||||
toolIds: [],//勾选的工具 |
|
||||||
orderNumber:'',//订单id |
|
||||||
codeUrl:'', |
|
||||||
options: { size: 150}, |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
if(this.token){ |
|
||||||
this.list(); |
|
||||||
} |
|
||||||
}, |
|
||||||
components:{ |
|
||||||
'qrcode': VueQrcode, |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['token']) |
|
||||||
}, |
|
||||||
|
|
||||||
methods:{ |
|
||||||
list() { |
|
||||||
getMyShoppingCart().then(response => { |
|
||||||
this.cartdata = response.rows; |
|
||||||
//默认都选中 |
|
||||||
// this.$nextTick(() => { |
|
||||||
// for (let i = 0; i < this.cartdata.length; i++) { |
|
||||||
// this.$refs.multipleTable.toggleRowSelection(this.cartdata[i]) |
|
||||||
// } |
|
||||||
// }) |
|
||||||
store.commit('SET_CARTCOUNT', this.cartdata.length); |
|
||||||
}) |
|
||||||
}, |
|
||||||
// 每一行移除功能 |
|
||||||
handleRemove(row) { |
|
||||||
this.$confirm('确定要从购物车中移除吗?', '提示', {type: 'warning'}).then( () => { |
|
||||||
removeShoppingCart(row.toolId).then(response => { |
|
||||||
this.$notify({ |
|
||||||
title: '从购物车删除成功', |
|
||||||
message: '', |
|
||||||
align: 'center', |
|
||||||
type: 'success' |
|
||||||
}); |
|
||||||
this.list(); |
|
||||||
}); |
|
||||||
}) |
|
||||||
}, |
|
||||||
//勾选的方法 |
|
||||||
handleSelectionChange(selection){ |
|
||||||
this.toolIds = selection.map(item => item.toolId); |
|
||||||
}, |
|
||||||
//总移除商品按钮 |
|
||||||
multipleRemovetool() { |
|
||||||
if (this.toolIds.length == 0) { |
|
||||||
this.$alert("请您选择要移除的商品", {dangerouslyUseHTMLString: true}); |
|
||||||
} else { |
|
||||||
this.$confirm('确定要移除所选的商品吗?', '提示', {type: 'warning'}).then(() => { |
|
||||||
multipleRemove(this.toolIds).then(response => { |
|
||||||
this.list(); |
|
||||||
}) |
|
||||||
}) |
|
||||||
} |
|
||||||
}, |
|
||||||
//清空购物车 |
|
||||||
clearCarttool() { |
|
||||||
this.$confirm('确定要清空购物车吗?', '提示', {type: 'warning'}).then(() => { |
|
||||||
clearCart().then(response => { |
|
||||||
this.list(); |
|
||||||
}) |
|
||||||
}) |
|
||||||
}, |
|
||||||
//关闭支付弹窗 |
|
||||||
handleClose(){ |
|
||||||
this.boxShow=false; |
|
||||||
clearInterval(this.timers); |
|
||||||
}, |
|
||||||
// 立即支付 |
|
||||||
immediatepay(){ |
|
||||||
|
|
||||||
let ids = this.toolIds; |
|
||||||
let tools = this.cartdata; |
|
||||||
if (ids.length == 0) { |
|
||||||
this.$alert("请您选择要购买的商品", {dangerouslyUseHTMLString: true}); |
|
||||||
return; |
|
||||||
} else { |
|
||||||
let totalFee = 0; |
|
||||||
let toolArr = []; |
|
||||||
for (let i in ids) { |
|
||||||
let tool = tools.filter(function (item) { |
|
||||||
return item.toolId == ids[i]; |
|
||||||
}) |
|
||||||
let param = {}; |
|
||||||
param.toolId = tool[0].toolId; |
|
||||||
param.amount = tool[0].amount; |
|
||||||
param.deliverType = tool[0].deliverType; |
|
||||||
param.price = tool[0].price; |
|
||||||
param.payType = this.paytype; |
|
||||||
param.toolType = tool[0].toolType; |
|
||||||
totalFee = totalFee + tool[0].price; |
|
||||||
toolArr.push(param); |
|
||||||
} |
|
||||||
if (totalFee == 0) { |
|
||||||
noPayMore(toolArr).then(response => { |
|
||||||
this.$notify({ |
|
||||||
title: '支付成功', |
|
||||||
message: '可在我的工具中查看已购买的工具', |
|
||||||
align: 'center', |
|
||||||
type: 'success' |
|
||||||
}); |
|
||||||
setTimeout(() => { |
|
||||||
this.$router.push('/console/mytools') |
|
||||||
},1000); |
|
||||||
this.list(); |
|
||||||
}) |
|
||||||
} else { |
|
||||||
if (this.paytype == 'ali') { |
|
||||||
// return; |
|
||||||
buyTools(toolArr).then(response => { |
|
||||||
// 打开新的页面进行填充html。 |
|
||||||
var newWindow = window.open("#", "_blank"); |
|
||||||
newWindow.document.write(response.data); |
|
||||||
this.list(); |
|
||||||
}) |
|
||||||
} else { |
|
||||||
buyTools(toolArr).then(response => { |
|
||||||
this.boxShow = true; |
|
||||||
this.codeUrl = response.code_url; |
|
||||||
this.orderNumber = response.out_trade_no; |
|
||||||
// let self = this |
|
||||||
this.getOrderstate() //生成二维码的时候调用监听支付是否成功的方法 |
|
||||||
}) |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
getOrderstate() { |
|
||||||
let self = this; |
|
||||||
let num = 0 |
|
||||||
self.timers = setInterval(() => { //创建一个全局的定时器 |
|
||||||
num++; |
|
||||||
queryOrderState(this.orderNumber).then(res => { |
|
||||||
if (res.data == true) { //判断 如果data.data==true就是订单支付成功 |
|
||||||
this.$notify({ |
|
||||||
title: '支付成功', |
|
||||||
message: '可在我的工具中查看已购买的工具', |
|
||||||
align: 'center', |
|
||||||
type: 'success' |
|
||||||
}); |
|
||||||
this.boxShow = false; |
|
||||||
setTimeout(() => { |
|
||||||
this.$router.push('/console/mytools') |
|
||||||
},1000); |
|
||||||
// this.$store.dispatch("tagsView/delView", this.$route); |
|
||||||
// this.$router.push({path: "/market/market"}); |
|
||||||
clearInterval(this.timers) //别忘记关闭定时器,否则会一直调这个接口 |
|
||||||
} |
|
||||||
}) |
|
||||||
if (num == 500) { //这里是判断num++到500的情况下用户还没有支付则自动关闭定时器和二维码 |
|
||||||
this.boxShow = false |
|
||||||
clearInterval(this.timers) |
|
||||||
} |
|
||||||
}, 1500) |
|
||||||
}, |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
.cartnum>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#666666; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.cartnum>>>.el-table td{ |
|
||||||
text-align:center; |
|
||||||
background-color:#FFFFFF; |
|
||||||
color:#333333; |
|
||||||
height:60px; |
|
||||||
} |
|
||||||
.cartnum>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
.counter{ |
|
||||||
display:flex; |
|
||||||
margin-left:70%; |
|
||||||
align-items: center; |
|
||||||
margin-top:30px; |
|
||||||
} |
|
||||||
.counter>>>.el-button{ |
|
||||||
/* width: 80px; */ |
|
||||||
height: 36px; |
|
||||||
background: #0066EB; |
|
||||||
border-radius: 4px; |
|
||||||
color:#FFFFFF |
|
||||||
} |
|
||||||
.payclass{ |
|
||||||
width:620px; |
|
||||||
margin:0 auto; |
|
||||||
text-align:center; |
|
||||||
display:flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.payclass>>>.el-button{ |
|
||||||
width: 130px; |
|
||||||
height: 36px; |
|
||||||
background: #F84C43; |
|
||||||
border-radius: 4px; |
|
||||||
color:#FFFFFF |
|
||||||
} |
|
||||||
.payclass>>>.el-radio{ |
|
||||||
display:flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
.payclass>>>.el-radio__label{ |
|
||||||
display:flex; |
|
||||||
align-items: center; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,46 +0,0 @@ |
|||||||
<template> |
|
||||||
<div > |
|
||||||
<div style="display:flex;align-items:center;margin:10px 0 15px 0;cursor:pointer"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<el-link :underline="false" style="font-weight: bold;font-size: 18px;margin-left:10px" @click="backtest">测试工具市场>{{tooldeti.name}}</el-link> |
|
||||||
</div> |
|
||||||
<!-- --> |
|
||||||
<div style="background: #FFFFFF;border-radius:4px;margin-top:26px;padding-top:5px;"> |
|
||||||
<tooldetails :mydetails='mydetails' @inform='inform'></tooldetails> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import tooldetails from '@/page/homepage/tool/tooldetails' |
|
||||||
export default{ |
|
||||||
components: {tooldetails}, |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
mydetails:true, |
|
||||||
tooldeti:{}, |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
|
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
inform(val){ |
|
||||||
this.tooldeti=val |
|
||||||
}, |
|
||||||
backtest(){ |
|
||||||
this.$router.push('/console/toolsmarket') |
|
||||||
}, |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
.el-link.el-link--default{ |
|
||||||
color:#333333 |
|
||||||
} |
|
||||||
</style> |
|
@ -1,35 +0,0 @@ |
|||||||
<template> |
|
||||||
<div style="padding-bottom:50px"> |
|
||||||
<!-- <div style="display:flex;align-items:center"> |
|
||||||
<div class="dvied"></div> |
|
||||||
<div style="font-weight: bold;color: #333333;font-size: 18px;margin-left:10px">工具市场</div> |
|
||||||
</div> --> |
|
||||||
<div style="background: #FFFFFF;border-radius: 4px;"> |
|
||||||
<toolmarker></toolmarker> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import toolmarker from '@/page/homepage/tool/toolmarker' |
|
||||||
export default{ |
|
||||||
components: {toolmarker,}, |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
|
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
|
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.dvied{ |
|
||||||
width: 4px; |
|
||||||
height: 18px; |
|
||||||
background: #0066EB; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,57 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<div class="testby"> |
|
||||||
<div class="test_content"> |
|
||||||
<p style="font-size:28px;color:#333333">测试宝余额</p> |
|
||||||
<p> |
|
||||||
<span style="font-size:30px;color:#3791FA">{{accountdata.balance}}</span> |
|
||||||
<span style="font-size:18px;color:#A6A6A6;margin-left: 10px;">元</span> |
|
||||||
</p> |
|
||||||
<p style="font-size:18px;color:#A6A6A6;margin-bottom:30px">可提现余额:{{accountdata.availableBalance}}元</p> |
|
||||||
<el-divider ></el-divider> |
|
||||||
<div style="margin-top:50px;"> |
|
||||||
<el-button type="primary" style="width:150px;height:50px;font-size: 18px;margin-right:20px;">充值</el-button> |
|
||||||
<el-button type="info" style="width:150px;height:50px;font-size: 18px;margin-left:20px;">提现</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {queryAccount} from "@/api/my/testb"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
accountdata:{} |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
|
|
||||||
queryAccount(this.userinform.userId).then(res=>{ |
|
||||||
this.accountdata=res |
|
||||||
}) |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['userinform']) |
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
|
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.testby{ |
|
||||||
width:650px; |
|
||||||
height: 500px; |
|
||||||
margin: 50px auto; |
|
||||||
background:#F1F3F8 ; |
|
||||||
border-radius: 10px; |
|
||||||
padding: 0 150px |
|
||||||
} |
|
||||||
.test_content{ |
|
||||||
text-align: center; |
|
||||||
padding-top: 50px; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,194 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<div class="testby"> |
|
||||||
<p style="font-size:28px;color:#333333;margin-top:0">设置交易密码</p> |
|
||||||
<el-divider ></el-divider> |
|
||||||
<p style="color:#A6A6A6;font-size:13px">*请确保交易密码与登录密码不同!</p> |
|
||||||
<p style="color:#A6A6A6;font-size:13px">*密码必须为 6-16 位,字母、数字或字符的组合。</p> |
|
||||||
<p style="color:#A6A6A6;font-size:13px;margin-bottom: 30px;"> |
|
||||||
<span>*如果您收不到手机验证码,请先去</span> |
|
||||||
<span style="color:#1989fa">个人信息</span> |
|
||||||
<span>页面验证工作手机。</span> |
|
||||||
</p> |
|
||||||
<el-form ref="sactionform" :model="sactionform" :rules="sactionFormRules" label-width="120px" > |
|
||||||
<el-form-item label="手机号码"> |
|
||||||
<span v-if="userinform.phonenumber">+86 {{userinform.phonenumber}}</span> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="password" label="交易密码"> |
|
||||||
<el-input show-password v-model="sactionform.password" ></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item prop="newpassword" label="确认交易密码"> |
|
||||||
<el-input show-password v-model="sactionform.newpassword"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item label="短信验证码" class="verifybtn" > |
|
||||||
<el-input v-model="sactionform.code" |
|
||||||
maxlength="6" |
|
||||||
auto-complete="off"> |
|
||||||
<el-button slot="suffix" |
|
||||||
@click="getVerify" |
|
||||||
:disabled="tranVerify.disabled"> |
|
||||||
<span v-show="tranVerify.show">获取验证码</span> |
|
||||||
<span v-show="!tranVerify.show" class="count">{{tranVerify.count}} s</span> |
|
||||||
</el-button> |
|
||||||
</el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item> |
|
||||||
<el-button type="primary" @click="onSubmit" class="but">确认</el-button> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
|
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {isMobile} from "@/util/validate"; |
|
||||||
import {getCodeUserLogin,scatpasswd} from "@/api/system/login"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
const validatePass = (rule, value, callback) => { |
|
||||||
if (value === '') { |
|
||||||
return callback(new Error('请输入密码')); |
|
||||||
} |
|
||||||
if(!/^[a-z0-9][a-z0-9A-Z@#%^.*!~?|]{5,11}$/i.test(value)){ |
|
||||||
return callback(new Error('密码格式错误')); |
|
||||||
} |
|
||||||
// if (this.getpasswordForm.repassword !== '') { |
|
||||||
// this.$refs.getpasswordForm.validateField('repassword') |
|
||||||
// } |
|
||||||
return callback(); |
|
||||||
}; |
|
||||||
//注册的确认密码 |
|
||||||
const validatePass2 = (rule, value, callback) => { |
|
||||||
if (value === '') { |
|
||||||
callback(new Error('请再次输入密码')); |
|
||||||
} else if (value !== this.sactionform.password) { |
|
||||||
callback(new Error('两次输入密码不一致!')); |
|
||||||
} else { |
|
||||||
callback(); |
|
||||||
} |
|
||||||
}; |
|
||||||
https://www.keyitest.cn/prod-api/captchaUserLogin?phoneNumber=18729807538 |
|
||||||
return{ |
|
||||||
sactionform:{password:'',newpassword:'',code:'',uuid:''}, |
|
||||||
tranVerify:{ show: true, count: 0, timer: null, disabled: false},//注册验证码 |
|
||||||
sactionFormRules:{ |
|
||||||
password: [{ required: true, validator:validatePass, trigger: 'blur' }, |
|
||||||
{ min: 6, message: '密码长度最少为6位', trigger: 'blur' }], |
|
||||||
newpassword: [{ required: true, validator:validatePass2, trigger: 'blur' }, |
|
||||||
{ min: 6, message: '密码长度最少为6位', trigger: 'blur' }], |
|
||||||
}, |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['userinform']) |
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
// 获取短信验证码 |
|
||||||
getVerify() { |
|
||||||
if(!this.sactionform.newpassword){ |
|
||||||
this.$message.warning('请输入密码'); |
|
||||||
return; |
|
||||||
} |
|
||||||
let phone = this.userinform.phonenumber; |
|
||||||
if (!phone || !isMobile(phone)) { |
|
||||||
this.$message.warning('手机格式不对'); |
|
||||||
return; |
|
||||||
} |
|
||||||
this.tranVerify.disabled = true; |
|
||||||
// 获取注册验证码的接口 |
|
||||||
getCodeUserLogin(phone).then((res)=> { |
|
||||||
if(res.code==200){ |
|
||||||
this.sactionform.uuid=res.uuid; |
|
||||||
this.$message.success('短信发送成功,请注意查收') |
|
||||||
const TIME_COUNT = 60; //更改倒计时时间 |
|
||||||
if (!this.timer) { |
|
||||||
this.tranVerify.count = TIME_COUNT; |
|
||||||
this.tranVerify.show = false; |
|
||||||
this.tranVerify.timer = |
|
||||||
setInterval(() => { |
|
||||||
if (this.tranVerify.count > 0 && this.tranVerify.count <= TIME_COUNT) { |
|
||||||
this.tranVerify.count--; |
|
||||||
} else { |
|
||||||
this.tranVerify.disabled = false; |
|
||||||
this.tranVerify.show = true; |
|
||||||
clearInterval(this.tranVerify.timer); // 清除定时器 |
|
||||||
this.tranVerify.timer = null; |
|
||||||
} |
|
||||||
}, 1000); |
|
||||||
} |
|
||||||
} |
|
||||||
}).catch((err) => { |
|
||||||
}); |
|
||||||
}, |
|
||||||
onSubmit(){ |
|
||||||
this.$refs.sactionform.validate((valid) => { |
|
||||||
if(valid) { |
|
||||||
if(!this.sactionform.code){ |
|
||||||
this.$message.warning('请输入验证码'); |
|
||||||
}else{ |
|
||||||
let data={ |
|
||||||
password:this.sactionform.password, |
|
||||||
code:this.sactionform.code, |
|
||||||
uuid:this.sactionform.uuid, |
|
||||||
} |
|
||||||
let userId=this.userinform.userId |
|
||||||
scatpasswd(userId,data).then(res=>{ |
|
||||||
if(res.code==200){ |
|
||||||
this.$message.success('设置成功'); |
|
||||||
this.$router.push(`/console/profile`) |
|
||||||
}else{ |
|
||||||
this.$message.warning('验证码无效'); |
|
||||||
} |
|
||||||
}) |
|
||||||
} |
|
||||||
} |
|
||||||
}) |
|
||||||
}, |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.testby{ |
|
||||||
width:800px; |
|
||||||
height: 500px; |
|
||||||
margin: 50px 0 50px 100px; |
|
||||||
background:#F1F3F8 ; |
|
||||||
border-radius: 10px; |
|
||||||
padding:50px |
|
||||||
} |
|
||||||
.testby>>>.el-input__inner{ |
|
||||||
width:300px; |
|
||||||
} |
|
||||||
.but{ |
|
||||||
width:300px; |
|
||||||
font-size:16px; |
|
||||||
background-color: #0066EB; |
|
||||||
} |
|
||||||
.testby>>>.el-input{ |
|
||||||
width: 300px !important;; |
|
||||||
} |
|
||||||
.verifybtn>>>.el-input{ |
|
||||||
width: 300px !important;; |
|
||||||
} |
|
||||||
.verifybtn>>>.el-button{ |
|
||||||
|
|
||||||
margin-top:-3px; |
|
||||||
margin-left: -28px; |
|
||||||
width:100%; |
|
||||||
height:50px; |
|
||||||
font-size:15px; |
|
||||||
/* color:#0066EB; */ |
|
||||||
background: transparent; |
|
||||||
border:none; |
|
||||||
border-radius:6px; |
|
||||||
z-index:-1 |
|
||||||
/* 18798569999 */ |
|
||||||
} |
|
||||||
.verifybtn>>>.el-button.is-disabled:hover{ |
|
||||||
background: transparent; |
|
||||||
} |
|
||||||
</style> |
|
@ -1,93 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="crowdnum"> |
|
||||||
<el-table :data="sactionData" style="margin-top:30px" > |
|
||||||
<el-table-column label="交易名称" align="center" key="recordName" prop="recordName"/> |
|
||||||
<el-table-column label="交易类型" align="center" key="recordType" prop="recordType" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.recordType==0" style="color:#e6a23c">充值</span> |
|
||||||
<span v-if="scope.row.recordType==1" style="color:#409eff">提现</span> |
|
||||||
<span v-if="scope.row.recordType==2" style="color:#f56c6c">支出</span> |
|
||||||
<span v-if="scope.row.recordType==3" style="color:#67c23a">收入</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="交易金额" align="center" key="recordAmount" prop="recordAmount"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<p>{{hasDot(scope.row.recordAmount)}}</p> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="交易状态" align="center" key="recordStatus" prop="recordStatus" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.recordStatus==0" style="color:#409eff">处理中</span> |
|
||||||
<span v-if="scope.row.recordStatus==1" style="color:#67c23a">已完成</span> |
|
||||||
<span v-if="scope.row.recordStatus==2" style="color:#e6a23c">已取消</span> |
|
||||||
<span v-if="scope.row.recordStatus==3" style="color:#f56c6c">已失败</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="交易时间" align="center" key="recordTime" prop="recordTime" > |
|
||||||
<template slot-scope="scope"> |
|
||||||
<span v-if="scope.row.recordTime">{{scope.row.recordTime.slice(0,10)}}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260"></el-table-column> --> |
|
||||||
</el-table> |
|
||||||
<!-- <div v-if="total>10" style='width:100%;margin-top:30px;text-align: center;'> |
|
||||||
<el-pagination background |
|
||||||
@current-change="handleCurrentChange" |
|
||||||
:page-size="queryParams.pageSize" |
|
||||||
layout="total, prev, pager, next, jumper" |
|
||||||
:total="total"> |
|
||||||
</el-pagination> |
|
||||||
</div> --> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import {mapGetters} from "vuex"; |
|
||||||
import {queryRecord} from "@/api/my/testb"; |
|
||||||
export default{ |
|
||||||
data(){ |
|
||||||
return{ |
|
||||||
sactionData:[], |
|
||||||
total: 0, |
|
||||||
} |
|
||||||
}, |
|
||||||
mounted(){ |
|
||||||
queryRecord(this.userinform.userId).then(res=>{ |
|
||||||
// res.rows=[{recordName:'1',recordType:'3',recordAmount:'500.363654',recordStatus:'2',recordTime:'2023.01.60 10:50'}] |
|
||||||
this.sactionData = res.rows; |
|
||||||
this.total = res.total; |
|
||||||
}) |
|
||||||
}, |
|
||||||
computed: { |
|
||||||
...mapGetters(['userinform']) |
|
||||||
}, |
|
||||||
methods:{ |
|
||||||
hasDot(num){ // 保留小数点后两位 |
|
||||||
if(num){ |
|
||||||
var result = (num.toString()).indexOf(".");// 查找是否含有小数点 |
|
||||||
if(result != -1) { |
|
||||||
return (num.toString()).substring(0,result+3) //有小数点保留两位小数 |
|
||||||
} else { |
|
||||||
return num |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
|
||||||
|
|
||||||
} |
|
||||||
</script> |
|
||||||
<style scoped> |
|
||||||
.crowdnum>>>.el-table th{ |
|
||||||
background-color:#F7F7F7; |
|
||||||
color:#0e0c0c; |
|
||||||
text-align:center; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table td{ |
|
||||||
/* text-align:center; */ |
|
||||||
background-color:#FAF9F9; |
|
||||||
height:60px; |
|
||||||
color:#666666; |
|
||||||
} |
|
||||||
.crowdnum>>>.el-table--border th{ |
|
||||||
border-right:#F7F7F7 |
|
||||||
} |
|
||||||
</style> |
|
Loading…
Reference in new issue