|
|
|
@ -1,21 +1,38 @@ |
|
|
|
|
<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"> |
|
|
|
|
<span slot="label"><i class="el-icon-date"></i> 待审核</span> |
|
|
|
|
<el-table v-loading="loading" :data="this.tasks" style="height: 100%"> |
|
|
|
|
<el-table-column label="项目名称" align="center" key="projectName" prop="projectName" |
|
|
|
|
:show-overflow-tooltip="true"/> |
|
|
|
|
<el-table-column label="测试类型" align="center" key="testType" width="100" prop="testType" |
|
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
|
<el-table-column |
|
|
|
|
label="项目名称" |
|
|
|
|
align="center" |
|
|
|
|
key="projectName" |
|
|
|
|
prop="projectName" |
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="测试类型" |
|
|
|
|
align="center" |
|
|
|
|
key="testType" |
|
|
|
|
width="100" |
|
|
|
|
prop="testType" |
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel')}}</span> |
|
|
|
|
<span>{{ |
|
|
|
|
findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel') |
|
|
|
|
}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="联系人" align="center" key="contactName" prop="contactName" |
|
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
|
<el-table-column |
|
|
|
|
label="联系人" |
|
|
|
|
align="center" |
|
|
|
|
key="contactName" |
|
|
|
|
prop="contactName" |
|
|
|
|
:show-overflow-tooltip="true" |
|
|
|
|
> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="工期" align="center" key="period" prop="period" |
|
|
|
|
:show-overflow-tooltip="true"> |
|
|
|
|
<el-table-column label="工期" align="center" key="period" prop="period" :show-overflow-tooltip="true"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.period }}天</span> |
|
|
|
|
</template> |
|
|
|
@ -38,8 +55,15 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" key="applyId" prop="applyId"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span><el-button size="mini" type="text" |
|
|
|
|
icon="el-icon-edit" @click="auditTask(scope.row.applyId)">审核</el-button></span> |
|
|
|
|
<span |
|
|
|
|
><el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="auditTask(scope.row.applyId)" |
|
|
|
|
>审核</el-button |
|
|
|
|
></span |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -50,29 +74,43 @@ |
|
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
|
@pagination="getList" |
|
|
|
|
/> |
|
|
|
|
<crowdsource-audit ref="crowdsourceAudit" @closeDialog="closeDialog" :list="tasktypelist" ></crowdsource-audit> |
|
|
|
|
<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> |
|
|
|
|
<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> |
|
|
|
|
<crowdsource-list |
|
|
|
|
:list1="tasktypelist" |
|
|
|
|
type="allTask" |
|
|
|
|
v-if="activeName == 'allTask'" |
|
|
|
|
ref="allTask" |
|
|
|
|
></crowdsource-list> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import {listApply} from "@/api/crowdsource/crowdsource"; |
|
|
|
|
import CrowdsourceAudit from "@/views/components/CrowdsourceAudit"; |
|
|
|
|
import AuditStatus from "@/views/components/enum/AuditStatus"; |
|
|
|
|
import TestType from "@/views/components/enum/TestType"; |
|
|
|
|
import CrowdsourceList from "@/views/components/CrowdsourceList"; |
|
|
|
|
import store from "@/store"; |
|
|
|
|
import { listApply } from '@/api/crowdsource/crowdsource' |
|
|
|
|
import CrowdsourceAudit from '@/views/components/CrowdsourceAudit' |
|
|
|
|
import AuditStatus from '@/views/components/enum/AuditStatus' |
|
|
|
|
import TestType from '@/views/components/enum/TestType' |
|
|
|
|
import CrowdsourceList from '@/views/components/CrowdsourceList' |
|
|
|
|
import store from '@/store' |
|
|
|
|
import mixin from '@/mixin/index.js' |
|
|
|
|
export default { |
|
|
|
|
name: "CrowdsourceManage", |
|
|
|
|
name: 'CrowdsourceManage', |
|
|
|
|
components: { TestType, CrowdsourceAudit, AuditStatus, CrowdsourceList }, |
|
|
|
|
mixins: [mixin], |
|
|
|
|
data() { |
|
|
|
@ -90,49 +128,52 @@ |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
testType: undefined, |
|
|
|
|
feeType: undefined |
|
|
|
|
feeType: undefined, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
/** 查询列表 */ |
|
|
|
|
getList() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.list(); |
|
|
|
|
this.loading = true |
|
|
|
|
this.list() |
|
|
|
|
}, |
|
|
|
|
list() { |
|
|
|
|
listApply(this.queryParams).then(response => { |
|
|
|
|
this.tasks = response.rows; |
|
|
|
|
this.total = response.total; |
|
|
|
|
this.loading = false; |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
listApply(this.queryParams).then((response) => { |
|
|
|
|
this.tasks = response.rows |
|
|
|
|
this.total = response.total |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
auditTask(applyId) { |
|
|
|
|
this.$refs.crowdsourceAudit.openDialog(applyId); |
|
|
|
|
this.$refs.crowdsourceAudit.openDialog(applyId) |
|
|
|
|
}, |
|
|
|
|
closeDialog() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.list(); |
|
|
|
|
} |
|
|
|
|
this.loading = true |
|
|
|
|
this.list() |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
activeName(newVal, oldVal) { |
|
|
|
|
store.commit('SET_ACTIVENAMEMANAGER', newVal); |
|
|
|
|
} |
|
|
|
|
store.commit('SET_ACTIVENAMEMANAGER', newVal) |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
computed: {}, |
|
|
|
|
created() { |
|
|
|
|
this.list(); |
|
|
|
|
if (store.getters.activeNameManager == 'audit' || store.getters.activeNameManager == 'tobeExpired' || store.getters.activeNameManager == 'allTask') |
|
|
|
|
this.activeName = store.getters.activeNameManager; |
|
|
|
|
} |
|
|
|
|
this.list() |
|
|
|
|
if ( |
|
|
|
|
store.getters.activeNameManager == 'audit' || |
|
|
|
|
store.getters.activeNameManager == 'tobeExpired' || |
|
|
|
|
store.getters.activeNameManager == 'allTask' |
|
|
|
|
) |
|
|
|
|
this.activeName = store.getters.activeNameManager |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.type { |
|
|
|
|
color: #1890FF; |
|
|
|
|
color: #1890ff; |
|
|
|
|
font-weight: bold; |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin-right: 10px; |
|
|
|
@ -149,19 +190,19 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.active { |
|
|
|
|
color: #1890FF; |
|
|
|
|
color: #1890ff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-row { |
|
|
|
|
margin-bottom: 5px; |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-card { |
|
|
|
|
min-width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
transition: all .5s; |
|
|
|
|
transition: all 0.5s; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|