parent
8e35061e8f
commit
db40a0c573
@ -1,167 +1,208 @@ |
|||||||
<template> |
<template> |
||||||
<el-tabs type="border-card" style="min-height: 600px;" v-model="activeName"> |
<el-tabs type="border-card" style="min-height: 600px" v-model="activeName"> |
||||||
<el-tab-pane name="audit"> |
<el-tab-pane name="audit"> |
||||||
<span slot="label"><i class="el-icon-date"></i> 待审核</span> |
<span slot="label"><i class="el-icon-date"></i> 待审核</span> |
||||||
<el-table v-loading="loading" :data="this.tasks" style="height: 100%"> |
<el-table v-loading="loading" :data="this.tasks" style="height: 100%"> |
||||||
<el-table-column label="项目名称" align="center" key="projectName" prop="projectName" |
<el-table-column |
||||||
:show-overflow-tooltip="true"/> |
label="项目名称" |
||||||
<el-table-column label="测试类型" align="center" key="testType" width="100" prop="testType" |
align="center" |
||||||
:show-overflow-tooltip="true"> |
key="projectName" |
||||||
<template slot-scope="scope"> |
prop="projectName" |
||||||
<span>{{ findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel')}}</span> |
:show-overflow-tooltip="true" |
||||||
</template> |
/> |
||||||
</el-table-column> |
<el-table-column |
||||||
<el-table-column label="联系人" align="center" key="contactName" prop="contactName" |
label="测试类型" |
||||||
:show-overflow-tooltip="true"> |
align="center" |
||||||
</el-table-column> |
key="testType" |
||||||
<el-table-column label="工期" align="center" key="period" prop="period" |
width="100" |
||||||
:show-overflow-tooltip="true"> |
prop="testType" |
||||||
<template slot-scope="scope"> |
:show-overflow-tooltip="true" |
||||||
<span>{{scope.row.period}}天</span> |
> |
||||||
</template> |
<template slot-scope="scope"> |
||||||
</el-table-column> |
<span>{{ |
||||||
<el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true"> |
findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel') |
||||||
<template slot-scope="scope"> |
}}</span> |
||||||
<span>{{scope.row.price | currency('¥')}}</span> |
</template> |
||||||
</template> |
</el-table-column> |
||||||
</el-table-column> |
<el-table-column |
||||||
<!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"--> |
label="联系人" |
||||||
<!-- :show-overflow-tooltip="true">--> |
align="center" |
||||||
<!-- <template slot-scope="scope">--> |
key="contactName" |
||||||
<!-- <audit-status :status="scope.row.status"></audit-status>--> |
prop="contactName" |
||||||
<!-- </template>--> |
:show-overflow-tooltip="true" |
||||||
<!-- </el-table-column>--> |
> |
||||||
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime" > |
</el-table-column> |
||||||
<template slot-scope="scope"> |
<el-table-column label="工期" align="center" key="period" prop="period" :show-overflow-tooltip="true"> |
||||||
<span>{{ parseTime(scope.row.createTime) }}</span> |
<template slot-scope="scope"> |
||||||
</template> |
<span>{{ scope.row.period }}天</span> |
||||||
</el-table-column> |
</template> |
||||||
<el-table-column label="操作" align="center" key="applyId" prop="applyId" > |
</el-table-column> |
||||||
<template slot-scope="scope"> |
<el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true"> |
||||||
<span><el-button size="mini" type="text" |
<template slot-scope="scope"> |
||||||
icon="el-icon-edit" @click="auditTask(scope.row.applyId)">审核</el-button></span> |
<span>{{ scope.row.price | currency('¥') }}</span> |
||||||
</template> |
</template> |
||||||
</el-table-column> |
</el-table-column> |
||||||
</el-table> |
<!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"--> |
||||||
<pagination |
<!-- :show-overflow-tooltip="true">--> |
||||||
v-show="total>0" |
<!-- <template slot-scope="scope">--> |
||||||
:total="total" |
<!-- <audit-status :status="scope.row.status"></audit-status>--> |
||||||
:page.sync="queryParams.pageNum" |
<!-- </template>--> |
||||||
:limit.sync="queryParams.pageSize" |
<!-- </el-table-column>--> |
||||||
@pagination="getList" |
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime"> |
||||||
/> |
<template slot-scope="scope"> |
||||||
<crowdsource-audit ref="crowdsourceAudit" @closeDialog="closeDialog" :list="tasktypelist" ></crowdsource-audit> |
<span>{{ parseTime(scope.row.createTime) }}</span> |
||||||
</el-tab-pane> |
</template> |
||||||
<el-tab-pane name="tobeExpired" label="即将到期"> |
</el-table-column> |
||||||
<span slot="label"><i class="el-icon-date"></i>即将到期的任务</span> |
<el-table-column label="操作" align="center" key="applyId" prop="applyId"> |
||||||
<crowdsource-list :list1="tasktypelist" type="tobeExpired" v-if="activeName=='tobeExpired'" ref="tobeExpired"></crowdsource-list> |
<template slot-scope="scope"> |
||||||
</el-tab-pane> |
<span |
||||||
<el-tab-pane name="allTask"> |
><el-button |
||||||
<span slot="label"><i class="el-icon-date"></i>所有任务</span> |
size="mini" |
||||||
<crowdsource-list :list1="tasktypelist" type="allTask" v-if="activeName=='allTask'" ref="allTask"></crowdsource-list> |
type="text" |
||||||
</el-tab-pane> |
icon="el-icon-edit" |
||||||
</el-tabs> |
@click="auditTask(scope.row.applyId)" |
||||||
|
>审核</el-button |
||||||
|
></span |
||||||
|
> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
<pagination |
||||||
|
v-show="total > 0" |
||||||
|
:total="total" |
||||||
|
:page.sync="queryParams.pageNum" |
||||||
|
:limit.sync="queryParams.pageSize" |
||||||
|
@pagination="getList" |
||||||
|
/> |
||||||
|
<crowdsource-audit |
||||||
|
ref="crowdsourceAudit" |
||||||
|
@closeDialog="closeDialog" |
||||||
|
:list="tasktypelist" |
||||||
|
></crowdsource-audit> |
||||||
|
</el-tab-pane> |
||||||
|
<el-tab-pane name="tobeExpired" label="即将到期"> |
||||||
|
<span slot="label"><i class="el-icon-date"></i>即将到期的任务</span> |
||||||
|
<crowdsource-list |
||||||
|
:list1="tasktypelist" |
||||||
|
type="tobeExpired" |
||||||
|
v-if="activeName == 'tobeExpired'" |
||||||
|
ref="tobeExpired" |
||||||
|
></crowdsource-list> |
||||||
|
</el-tab-pane> |
||||||
|
<el-tab-pane name="allTask"> |
||||||
|
<span slot="label"><i class="el-icon-date"></i>所有任务</span> |
||||||
|
<crowdsource-list |
||||||
|
:list1="tasktypelist" |
||||||
|
type="allTask" |
||||||
|
v-if="activeName == 'allTask'" |
||||||
|
ref="allTask" |
||||||
|
></crowdsource-list> |
||||||
|
</el-tab-pane> |
||||||
|
</el-tabs> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import {listApply} from "@/api/crowdsource/crowdsource"; |
import { listApply } from '@/api/crowdsource/crowdsource' |
||||||
import CrowdsourceAudit from "@/views/components/CrowdsourceAudit"; |
import CrowdsourceAudit from '@/views/components/CrowdsourceAudit' |
||||||
import AuditStatus from "@/views/components/enum/AuditStatus"; |
import AuditStatus from '@/views/components/enum/AuditStatus' |
||||||
import TestType from "@/views/components/enum/TestType"; |
import TestType from '@/views/components/enum/TestType' |
||||||
import CrowdsourceList from "@/views/components/CrowdsourceList"; |
import CrowdsourceList from '@/views/components/CrowdsourceList' |
||||||
import store from "@/store"; |
import store from '@/store' |
||||||
import mixin from '@/mixin/index.js' |
import mixin from '@/mixin/index.js' |
||||||
export default { |
export default { |
||||||
name: "CrowdsourceManage", |
name: 'CrowdsourceManage', |
||||||
components: {TestType, CrowdsourceAudit, AuditStatus, CrowdsourceList}, |
components: { TestType, CrowdsourceAudit, AuditStatus, CrowdsourceList }, |
||||||
mixins: [mixin], |
mixins: [mixin], |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
open:false, |
open: false, |
||||||
// 遮罩层 |
// 遮罩层 |
||||||
loading: true, |
loading: true, |
||||||
applyId:0, |
applyId: 0, |
||||||
activeName: 'audit', |
activeName: 'audit', |
||||||
tasks: [], |
tasks: [], |
||||||
// 总条数 |
// 总条数 |
||||||
total: 0, |
total: 0, |
||||||
// 查询参数 |
// 查询参数 |
||||||
queryParams: { |
queryParams: { |
||||||
pageNum: 1, |
pageNum: 1, |
||||||
pageSize: 10, |
pageSize: 10, |
||||||
testType: undefined, |
testType: undefined, |
||||||
feeType: undefined |
feeType: undefined, |
||||||
}, |
}, |
||||||
} |
} |
||||||
}, |
}, |
||||||
methods: { |
methods: { |
||||||
/** 查询列表 */ |
/** 查询列表 */ |
||||||
getList() { |
getList() { |
||||||
this.loading = true; |
this.loading = true |
||||||
this.list(); |
this.list() |
||||||
}, |
}, |
||||||
list() { |
list() { |
||||||
listApply(this.queryParams).then(response => { |
listApply(this.queryParams).then((response) => { |
||||||
this.tasks = response.rows; |
this.tasks = response.rows |
||||||
this.total = response.total; |
this.total = response.total |
||||||
this.loading = false; |
this.loading = false |
||||||
} |
}) |
||||||
) |
}, |
||||||
}, |
auditTask(applyId) { |
||||||
auditTask(applyId) { |
this.$refs.crowdsourceAudit.openDialog(applyId) |
||||||
this.$refs.crowdsourceAudit.openDialog(applyId); |
}, |
||||||
}, |
closeDialog() { |
||||||
closeDialog(){ |
this.loading = true |
||||||
this.loading = true; |
this.list() |
||||||
this.list(); |
}, |
||||||
} |
|
||||||
}, |
}, |
||||||
watch: { |
watch: { |
||||||
activeName(newVal, oldVal) { |
activeName(newVal, oldVal) { |
||||||
store.commit('SET_ACTIVENAMEMANAGER', newVal); |
store.commit('SET_ACTIVENAMEMANAGER', newVal) |
||||||
} |
}, |
||||||
}, |
}, |
||||||
computed: {}, |
computed: {}, |
||||||
created() { |
created() { |
||||||
this.list(); |
this.list() |
||||||
if (store.getters.activeNameManager == 'audit' || store.getters.activeNameManager == 'tobeExpired' || store.getters.activeNameManager == 'allTask') |
if ( |
||||||
this.activeName = store.getters.activeNameManager; |
store.getters.activeNameManager == 'audit' || |
||||||
} |
store.getters.activeNameManager == 'tobeExpired' || |
||||||
} |
store.getters.activeNameManager == 'allTask' |
||||||
|
) |
||||||
|
this.activeName = store.getters.activeNameManager |
||||||
|
}, |
||||||
|
} |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style scoped> |
<style scoped> |
||||||
.type { |
.type { |
||||||
color: #1890FF; |
color: #1890ff; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
font-size: 14px; |
font-size: 14px; |
||||||
margin-right: 10px; |
margin-right: 10px; |
||||||
} |
} |
||||||
|
|
||||||
.tip { |
.tip { |
||||||
font-size: 13px; |
font-size: 13px; |
||||||
color: gray; |
color: gray; |
||||||
} |
} |
||||||
|
|
||||||
.el-link { |
.el-link { |
||||||
margin-right: 10px; |
margin-right: 10px; |
||||||
font-size: 13px; |
font-size: 13px; |
||||||
} |
} |
||||||
|
|
||||||
.active { |
.active { |
||||||
color: #1890FF; |
color: #1890ff; |
||||||
} |
} |
||||||
|
|
||||||
.el-row { |
.el-row { |
||||||
margin-bottom: 5px; |
margin-bottom: 5px; |
||||||
display: flex; |
display: flex; |
||||||
flex-wrap: wrap |
flex-wrap: wrap; |
||||||
} |
} |
||||||
|
|
||||||
.el-card { |
.el-card { |
||||||
min-width: 100%; |
min-width: 100%; |
||||||
height: 100%; |
height: 100%; |
||||||
margin-right: 20px; |
margin-right: 20px; |
||||||
transition: all .5s; |
transition: all 0.5s; |
||||||
} |
} |
||||||
</style> |
</style> |
||||||
|
Loading…
Reference in new issue