任务列表界面代码备份

master
1178634255 2 years ago
parent 96de507476
commit 1167bb217f

@ -4,21 +4,40 @@
<el-form label-width="110px" v-show="showSearch" size="mini"> <el-form label-width="110px" v-show="showSearch" size="mini">
<el-row type="flex"> <el-row type="flex">
<el-col type="flex"> <el-col type="flex">
<!-- <el-form-item label="任务类型:" prop="taskType" class="query-form-item">-->
<!-- <el-input v-model="filterQuery.taskType"-->
<!-- style="width: 200px"-->
<!-- placeholder="请选择任务类型"-->
<!-- @keyup.native="onSubmit"-->
<!-- ></el-input>-->
<!--&lt;!&ndash; <el-select v-model="filterQuery.taskType" placeholder="请选择任务类型">&ndash;&gt;-->
<!--&lt;!&ndash; <el-option label="关联关系" value="1"></el-option>&ndash;&gt;-->
<!--&lt;!&ndash; <el-option label="入库" value="2"></el-option>&ndash;&gt;-->
<!--&lt;!&ndash; <el-option label="出库" value="3"></el-option>&ndash;&gt;-->
<!--&lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- </el-form-item>-->
<el-form-item label="任务类型:" prop="taskType" class="query-form-item"> <el-form-item label="任务类型:" prop="taskType" class="query-form-item">
<el-input v-model="filterQuery.taskType" <el-select v-model="filterQuery.taskType" placeholder="请选择任务类型" style="width: 200px" @change="onSubmit" clearable>
style="width: 200px" <el-option label="关联关系" value="1"></el-option>
placeholder="请选择任务类型" <el-option label="入库" value="2"></el-option>
@keyup.native="onSubmit" <el-option label="出库" value="3"></el-option>
></el-input> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col type="flex"> <el-col type="flex">
<el-form-item label="任务状态:" prop="status" class="query-form-item"> <el-form-item label="任务状态:" prop="status" class="query-form-item">
<el-input v-model="filterQuery.status" <!-- <el-input v-model="filterQuery.status"-->
style="width: 200px" <!-- style="width: 200px"-->
placeholder="请选择任务状态" <!-- placeholder="请选择任务状态"-->
@keyup.native="onSubmit" <!-- @keyup.native="onSubmit"-->
></el-input> <!-- clearable-->
<!-- ></el-input>-->
<el-select v-model="filterQuery.status" placeholder="请选择任务状态" style="width: 200px" @change="onSubmit" clearable>
<el-option label="未处理" value="1"></el-option>
<el-option label="正在处理" value="2"></el-option>
<el-option label="已处理" value="3"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -62,9 +81,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="8"> <!--时间筛选-->
<el-row>
<el-col :span="8" v-show='false'>
<el-form-item class="query-form-item" label="创建时间:"> <el-form-item class="query-form-item" label="创建时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
@ -81,7 +101,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-show='false'>
<el-form-item class="query-form-item" label="更新时间:"> <el-form-item class="query-form-item" label="更新时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
@ -93,6 +113,7 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
style="width: 90%" style="width: 90%"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -117,8 +138,19 @@
style="width: 100%" style="width: 100%"
highlight-current-row border> highlight-current-row border>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="任务类型" prop="taskType" width="120"></el-table-column> <!-- <el-table-column label="任务类型" prop="taskType" width="120"></el-table-column>-->
<el-table-column label="任务状态" prop="status" width="120"></el-table-column> <el-table-column label="任务类型" prop="taskType" width="120">
<template slot-scope="scope">
{{ formatTaskType(scope.row) }}
</template>
</el-table-column>
<!-- <el-table-column label="任务状态" prop="status" width="120"></el-table-column>-->
<el-table-column label="任务状态" prop="status" width="120">
<template slot-scope="scope">
{{ formatTaskType1(scope.row) }}
</template>
</el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" width="180"></el-table-column> <el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc" width="180"></el-table-column>
<el-table-column label="医疗器械注册人统一社会信用号" prop="creditNum" width="220"></el-table-column> <el-table-column label="医疗器械注册人统一社会信用号" prop="creditNum" width="220"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" width="180"></el-table-column> <el-table-column label="产品名称" prop="cpmctymc" width="180"></el-table-column>
@ -168,6 +200,10 @@ export default {
ylqxzcrbarmc: null, ylqxzcrbarmc: null,
page: 1, page: 1,
limit: 10, limit: 10,
startTime: null,
endTime: null,
startAduditTime: null,
endAduditTime: null,
}, },
total: 0, total: 0,
codeRelTotal: 0, codeRelTotal: 0,
@ -180,6 +216,40 @@ export default {
formView: {}, formView: {},
formViewCodeRel: {}, formViewCodeRel: {},
showSearch: true, showSearch: true,
actDateRange: [],
auditDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
} }
}, },
methods: { methods: {
@ -187,6 +257,30 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
formatTaskType(row) {
switch (row.taskType) {
case 1:
return '关联关系';
case 2:
return '入库';
case 3:
return '出库';
default:
return '任务类型有误!!';
}
},
formatTaskType1(row) {
switch (row.status) {
case 1:
return '未处理';
case 2:
return '正在处理';
case 3:
return '已处理';
default:
return '任务状态有误!!';
}
},
// // // //
// handleSelectionChange(val) { // handleSelectionChange(val) {
// this.currentRow = val; // this.currentRow = val;
@ -249,12 +343,34 @@ export default {
ylqxzcrbarmc: null, ylqxzcrbarmc: null,
page: 1, page: 1,
limit: 10, limit: 10,
startTime: null,
endTime: null,
startAduditTime: null,
endAduditTime: null,
}; };
this.listCodeRel = null, this.listCodeRel = null,
this.getTaskList(); this.auditDateRange = [];
this.actDateRange = [];
this.getTaskList();
}, },
// //
onSubmit(){ onSubmit(){
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
if (this.auditDateRange !== null) {
this.filterQuery.startAduditTime = this.auditDateRange[0];
this.filterQuery.endAduditTime = this.auditDateRange[1];
} else {
this.filterQuery.startAduditTime = null;
this.filterQuery.endAduditTime = null;
}
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getTaskList() this.getTaskList()
}, },

Loading…
Cancel
Save