|
|
|
|
@ -2,140 +2,128 @@ |
|
|
|
|
<div class="cus-container"> |
|
|
|
|
<el-form :model="searchForm"> |
|
|
|
|
<div class="search"> |
|
|
|
|
<div> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskParent" |
|
|
|
|
placeholder="任务父类" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskParent" |
|
|
|
|
placeholder="任务父类" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskParent" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskParent" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskType" |
|
|
|
|
placeholder="任务种类" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskType" |
|
|
|
|
placeholder="任务种类" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskInfos" |
|
|
|
|
:key="item.taskTypeName" |
|
|
|
|
:label="item.taskTypeName" |
|
|
|
|
:value="item.taskTypeName" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskInfos" |
|
|
|
|
:key="item.taskTypeName" |
|
|
|
|
:label="item.taskTypeName" |
|
|
|
|
:value="item.taskTypeName" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.currentResponsiblePerson" |
|
|
|
|
placeholder="当前责任人" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.currentResponsiblePerson" |
|
|
|
|
placeholder="当前责任人" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in users" |
|
|
|
|
:key="item.realName" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.realName" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in users" |
|
|
|
|
:key="item.realName" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.realName" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.management" |
|
|
|
|
placeholder="管理部门" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.management" |
|
|
|
|
placeholder="管理部门" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in depts" |
|
|
|
|
:key="item.deptName" |
|
|
|
|
:label="item.deptName" |
|
|
|
|
:value="item.deptName" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in depts" |
|
|
|
|
:key="item.deptName" |
|
|
|
|
:label="item.deptName" |
|
|
|
|
:value="item.deptName" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskLevel" |
|
|
|
|
placeholder="任务级别" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.taskLevel" |
|
|
|
|
placeholder="任务级别" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskLevel" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in taskLevel" |
|
|
|
|
:key="item.dictValue" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictValue" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.approvalStatus" |
|
|
|
|
placeholder="审批状态" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.approvalStatus" |
|
|
|
|
placeholder="审批状态" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in statusList" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in statusList" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.applyUser" |
|
|
|
|
placeholder="发起人" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select |
|
|
|
|
v-model="searchForm.applyUser" |
|
|
|
|
placeholder="发起人" |
|
|
|
|
class="search-select" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in users" |
|
|
|
|
:key="item.realName" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.realName" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-date-picker |
|
|
|
|
style="width: 336px;" |
|
|
|
|
v-model="searchForm.timeArr" |
|
|
|
|
format="yyyy-MM-dd HH:mm" |
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
class="search-picker" |
|
|
|
|
type="datetimerange" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="创建开始日期" |
|
|
|
|
end-placeholder="创建结束日期" |
|
|
|
|
></el-date-picker> |
|
|
|
|
<div style="margin-left:auto;"> |
|
|
|
|
<el-button class="search-btn" @click="searchHandle(1)" |
|
|
|
|
>查询</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
class="search-btn" |
|
|
|
|
@click="searchHandle(2)" |
|
|
|
|
style="background: #ff9130" |
|
|
|
|
>重置</el-button |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in users" |
|
|
|
|
:key="item.realName" |
|
|
|
|
:label="item.realName" |
|
|
|
|
:value="item.realName" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-date-picker |
|
|
|
|
style="width: 314px; margin-right: 20px" |
|
|
|
|
v-model="searchForm.timeArr" |
|
|
|
|
format="yyyy-MM-dd HH:mm" |
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
class="search-picker" |
|
|
|
|
type="datetimerange" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="创建开始日期" |
|
|
|
|
end-placeholder="创建结束日期" |
|
|
|
|
></el-date-picker> |
|
|
|
|
</div> |
|
|
|
|
<div class="search-line"> |
|
|
|
|
<div style="display: flex"> |
|
|
|
|
<el-date-picker |
|
|
|
|
style="width: 314px; margin-right: 20px" |
|
|
|
|
v-model="searchForm.timeArr2" |
|
|
|
|
format="yyyy-MM-dd HH:mm" |
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
class="search-picker" |
|
|
|
|
type="datetimerange" |
|
|
|
|
range-separator="至" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
></el-date-picker> |
|
|
|
|
<el-button class="search-btn" @click="searchHandle(1)" |
|
|
|
|
>查询</el-button |
|
|
|
|
> |
|
|
|
|
<div class="search-reset" @click="searchHandle(2)"> |
|
|
|
|
<i class="el-icon-refresh-right" style="font-size: 20px"></i> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<el-button |
|
|
|
|
class="search-btn" |
|
|
|
|
style="margin: 0; background: #2ee27c" |
|
|
|
|
style="background: #2ee27c" |
|
|
|
|
@click="exportHandle" |
|
|
|
|
>导出</el-button |
|
|
|
|
> |
|
|
|
|
@ -162,21 +150,25 @@ |
|
|
|
|
color: |
|
|
|
|
scope.row.status == '审批中' |
|
|
|
|
? '#FF9130' |
|
|
|
|
: scope.row.status == '进行中' |
|
|
|
|
? '#4CA3FB' |
|
|
|
|
: scope.row.status == '已驳回' |
|
|
|
|
? '#FD4D66' |
|
|
|
|
: scope.row.status == '已完成' |
|
|
|
|
? '#2EE27C' |
|
|
|
|
: '#000', |
|
|
|
|
: '#ccc', |
|
|
|
|
}" |
|
|
|
|
>●{{ scope.row.status }}</span |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
</avue-crud> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getList, conditionalData, exportExcel } from "@/api/plugin/workflow/workorder.js"; |
|
|
|
|
import { |
|
|
|
|
getList, |
|
|
|
|
conditionalData, |
|
|
|
|
exportExcel, |
|
|
|
|
} from "@/api/plugin/workflow/workorder.js"; |
|
|
|
|
import exForm from "../mixins/ex-form"; |
|
|
|
|
import { tableOption } from "@/const/workflow/workorder.js"; |
|
|
|
|
export default { |
|
|
|
|
@ -203,11 +195,15 @@ export default { |
|
|
|
|
label: "审批中", |
|
|
|
|
value: "审批中", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "已驳回", |
|
|
|
|
value: "已驳回", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "已完成", |
|
|
|
|
value: "已完成", |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
@ -217,12 +213,13 @@ export default { |
|
|
|
|
methods: { |
|
|
|
|
dictBiz() { |
|
|
|
|
conditionalData().then((res) => { |
|
|
|
|
const { taskParent, taskInfos, depts, users, taskLevel } = res.data.data; |
|
|
|
|
const { taskParent, taskInfos, depts, users, taskLevel } = |
|
|
|
|
res.data.data; |
|
|
|
|
this.taskParent = taskParent; |
|
|
|
|
this.taskInfos = taskInfos; |
|
|
|
|
this.depts = depts; |
|
|
|
|
this.users = users; |
|
|
|
|
this.taskLevel = taskLevel |
|
|
|
|
this.taskLevel = taskLevel; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 列表 |
|
|
|
|
@ -236,15 +233,12 @@ export default { |
|
|
|
|
this.searchForm.startTime = this.searchForm.timeArr[0]; |
|
|
|
|
this.searchForm.endTime = this.searchForm.timeArr[1]; |
|
|
|
|
} |
|
|
|
|
if ( |
|
|
|
|
this.searchForm.timeArr2 !== null && |
|
|
|
|
this.searchForm.timeArr2 !== undefined |
|
|
|
|
) { |
|
|
|
|
this.searchForm.startTime2 = this.searchForm.timeArr2[0]; |
|
|
|
|
this.searchForm.endTime2 = this.searchForm.timeArr2[1]; |
|
|
|
|
} |
|
|
|
|
getList({ current:currentPage, size:pageSize ,...this.searchForm }).then((res) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getList({ |
|
|
|
|
current: currentPage, |
|
|
|
|
size: pageSize, |
|
|
|
|
...this.searchForm, |
|
|
|
|
}).then((res) => { |
|
|
|
|
const { total, records } = res.data.data; |
|
|
|
|
this.page.total = total; |
|
|
|
|
this.tableData = records; |
|
|
|
|
@ -266,7 +260,6 @@ export default { |
|
|
|
|
if (index === 2) { |
|
|
|
|
this.searchForm = { |
|
|
|
|
timeArr: null, |
|
|
|
|
timeArr2: null, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
this.onLoad(); |
|
|
|
|
@ -280,13 +273,6 @@ export default { |
|
|
|
|
this.searchForm.startTime = this.searchForm.timeArr[0]; |
|
|
|
|
this.searchForm.endTime = this.searchForm.timeArr[1]; |
|
|
|
|
} |
|
|
|
|
if ( |
|
|
|
|
this.searchForm.timeArr2 !== null && |
|
|
|
|
this.searchForm.timeArr2 !== undefined |
|
|
|
|
) { |
|
|
|
|
this.searchForm.startTime2 = this.searchForm.timeArr2[0]; |
|
|
|
|
this.searchForm.endTime2 = this.searchForm.timeArr2[1]; |
|
|
|
|
} |
|
|
|
|
exportExcel(this.searchForm).then((res) => { |
|
|
|
|
const blob = res.data; |
|
|
|
|
const link = document.createElement("a"); |
|
|
|
|
@ -307,35 +293,27 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.search-line { |
|
|
|
|
margin-top: 20px; |
|
|
|
|
.search { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
.search-select { |
|
|
|
|
width: 150px; |
|
|
|
|
width: 160px; |
|
|
|
|
margin-right: 20px; |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
} |
|
|
|
|
.search-input { |
|
|
|
|
width: 288px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.search-btn { |
|
|
|
|
width: 130px; |
|
|
|
|
width: 100px; |
|
|
|
|
height: 46px !important; |
|
|
|
|
background: #2e92f6; |
|
|
|
|
color: #fff; |
|
|
|
|
margin: 0 20px; |
|
|
|
|
} |
|
|
|
|
.search-reset { |
|
|
|
|
width: 46px; |
|
|
|
|
height: 44px !important; |
|
|
|
|
background: #ff9130; |
|
|
|
|
color: #fff; |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 46px; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
/deep/ .el-input__inner { |
|
|
|
|
height: 46px; |
|
|
|
|
} |
|
|
|
|
/deep/ .el-button+.el-button { |
|
|
|
|
margin-left: 20px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|