任务审核添加语言

main
lijingyu007 10 months ago
parent 8e35061e8f
commit db40a0c573
  1. 1
      src/views/components/CrowdsourceAudit.vue
  2. 179
      src/views/manage/crowdsource/list.vue

@ -3,6 +3,7 @@
<el-dialog :title="title" :visible.sync="open" width="800px" class="dialogax" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" class="dialogax" append-to-body>
<el-descriptions size="medium" border :column="1" class="pagedesc"> <el-descriptions size="medium" border :column="1" class="pagedesc">
<el-descriptions-item label="项目名称">{{ task.projectName }}</el-descriptions-item> <el-descriptions-item label="项目名称">{{ task.projectName }}</el-descriptions-item>
<el-descriptions-item label="语言">{{ task.language }}</el-descriptions-item>
<el-descriptions-item label="需要人数">{{ task.needPerson }}</el-descriptions-item> <el-descriptions-item label="需要人数">{{ task.needPerson }}</el-descriptions-item>
<el-descriptions-item label="测试类型"> <el-descriptions-item label="测试类型">
<!-- <test-type :type="task.testType"></test-type> --> <!-- <test-type :type="task.testType"></test-type> -->

@ -1,28 +1,45 @@
<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"
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"> <template slot-scope="scope">
<span>{{ findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel')}}</span> <span>{{
findLabelValueByProp(tasktypelist, scope.row.testType, 'dictValue', 'dictLabel')
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="联系人" align="center" key="contactName" prop="contactName" <el-table-column
:show-overflow-tooltip="true"> label="联系人"
align="center"
key="contactName"
prop="contactName"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center" key="period" prop="period" <el-table-column label="工期" align="center" key="period" prop="period" :show-overflow-tooltip="true">
:show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.period}}</span> <span>{{ scope.row.period }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true"> <el-table-column label="金额" align="center" key="price" prop="price" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.price | currency('¥')}}</span> <span>{{ scope.row.price | currency('¥') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"--> <!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"-->
@ -31,56 +48,77 @@
<!-- <audit-status :status="scope.row.status"></audit-status>--> <!-- <audit-status :status="scope.row.status"></audit-status>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime" > <el-table-column label="创建时间" align="center" key="createTime" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" key="applyId" prop="applyId" > <el-table-column label="操作" align="center" key="applyId" prop="applyId">
<template slot-scope="scope"> <template slot-scope="scope">
<span><el-button size="mini" type="text" <span
icon="el-icon-edit" @click="auditTask(scope.row.applyId)">审核</el-button></span> ><el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="auditTask(scope.row.applyId)"
>审核</el-button
></span
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @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>
<el-tab-pane name="tobeExpired" label="即将到期"> <el-tab-pane name="tobeExpired" label="即将到期">
<span slot="label"><i class="el-icon-date"></i>即将到期的任务</span> <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>
<el-tab-pane name="allTask"> <el-tab-pane name="allTask">
<span slot="label"><i class="el-icon-date"></i>所有任务</span> <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-tab-pane>
</el-tabs> </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: [],
// //
@ -90,78 +128,81 @@
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() {
this.loading = true
this.list()
}, },
closeDialog(){
this.loading = true;
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…
Cancel
Save