任务审核添加语言

main
lijingyu007 5 months ago
parent 8e35061e8f
commit db40a0c573
  1. 1
      src/views/components/CrowdsourceAudit.vue
  2. 307
      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-descriptions size="medium" border :column="1" class="pagedesc">
<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="测试类型">
<!-- <test-type :type="task.testType"></test-type> -->

@ -1,167 +1,208 @@
<template>
<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">
<template slot-scope="scope">
<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>
<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="price" prop="price" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{scope.row.price | currency('¥')}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"-->
<!-- :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <audit-status :status="scope.row.status"></audit-status>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</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>
</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>
<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"
>
<template slot-scope="scope">
<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>
<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="price" prop="price" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.price | currency('¥') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="任务状态" align="center" key="status" prop="status" width="100"-->
<!-- :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <audit-status :status="scope.row.status"></audit-status>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</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
>
</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>
<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 mixin from '@/mixin/index.js'
export default {
name: "CrowdsourceManage",
components: {TestType, CrowdsourceAudit, AuditStatus, CrowdsourceList},
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',
components: { TestType, CrowdsourceAudit, AuditStatus, CrowdsourceList },
mixins: [mixin],
data() {
return {
open:false,
//
loading: true,
applyId:0,
activeName: 'audit',
tasks: [],
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
testType: undefined,
feeType: undefined
},
}
return {
open: false,
//
loading: true,
applyId: 0,
activeName: 'audit',
tasks: [],
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
testType: undefined,
feeType: undefined,
},
}
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.list();
},
list() {
listApply(this.queryParams).then(response => {
this.tasks = response.rows;
this.total = response.total;
this.loading = false;
}
)
},
auditTask(applyId) {
this.$refs.crowdsourceAudit.openDialog(applyId);
},
closeDialog(){
this.loading = true;
this.list();
}
/** 查询列表 */
getList() {
this.loading = true
this.list()
},
list() {
listApply(this.queryParams).then((response) => {
this.tasks = response.rows
this.total = response.total
this.loading = false
})
},
auditTask(applyId) {
this.$refs.crowdsourceAudit.openDialog(applyId)
},
closeDialog() {
this.loading = true
this.list()
},
},
watch: {
activeName(newVal, oldVal) {
store.commit('SET_ACTIVENAMEMANAGER', newVal);
}
activeName(newVal, oldVal) {
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;
.type {
color: #1890ff;
font-weight: bold;
font-size: 14px;
margin-right: 10px;
}
}
.tip {
.tip {
font-size: 13px;
color: gray;
}
}
.el-link {
.el-link {
margin-right: 10px;
font-size: 13px;
}
}
.active {
color: #1890FF;
}
.active {
color: #1890ff;
}
.el-row {
.el-row {
margin-bottom: 5px;
display: flex;
flex-wrap: wrap
}
flex-wrap: wrap;
}
.el-card {
.el-card {
min-width: 100%;
height: 100%;
margin-right: 20px;
transition: all .5s;
}
transition: all 0.5s;
}
</style>

Loading…
Cancel
Save