parent
159f4f39de
commit
ccd7b52542
12 changed files with 972 additions and 184 deletions
@ -0,0 +1,99 @@ |
||||
export const tableOption = { |
||||
index: true, |
||||
indexLabel: "序号", |
||||
indexWidth:120, |
||||
selection: false, |
||||
border: false, |
||||
gutter: 60, //设置input的大小
|
||||
headerAlign: "left", |
||||
align: "left", |
||||
menuAlign:'left', |
||||
menuHeaderAlign:'left', |
||||
menuBtn: true, |
||||
editBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
tip: false, |
||||
searchMenuSpan: 3, //控制搜索按钮
|
||||
columnBtn: false, |
||||
refreshBtn: false, |
||||
// dialogCustomClass: "custom",
|
||||
header: false, |
||||
menuWidth:120, |
||||
column: [ |
||||
{ |
||||
type: "input", |
||||
label: "任务父类", |
||||
prop: "taskParentName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "任务种类", |
||||
prop: "taskTypeName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "操作模块", |
||||
prop: "operateSysName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
|
||||
{ |
||||
type: "input", |
||||
label: "管理部门", |
||||
prop: "managementName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "运维公司", |
||||
prop: "maintenanceCompanyName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "发起人", |
||||
prop: "applyUserName", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "审批状态", |
||||
prop: "isFinish", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
label: "创建时间", |
||||
type: "datetime", |
||||
overHidden: true, |
||||
prop: "createTime", |
||||
format: "yyyy-MM-dd HH:mm", |
||||
valueFormat: "yyyy-MM-dd HH:mm:ss", |
||||
}, |
||||
{ |
||||
label: "结束时间", |
||||
type: "datetime", |
||||
overHidden: true, |
||||
prop: "finishTime", |
||||
format: "yyyy-MM-dd HH:mm", |
||||
valueFormat: "yyyy-MM-dd HH:mm:ss", |
||||
}, |
||||
{ |
||||
label: "期望完成时间", |
||||
type: "datetime", |
||||
overHidden: true, |
||||
prop: "expectedCompletionTime", |
||||
format: "yyyy-MM-dd HH:mm", |
||||
valueFormat: "yyyy-MM-dd HH:mm:ss", |
||||
}, |
||||
], |
||||
} |
||||
@ -1,71 +1,82 @@ |
||||
export default { |
||||
tabs: true, |
||||
tabsActive: 1, |
||||
column: [{ label: "头像", prop: "avatar",display:false}], |
||||
group: [ |
||||
{ |
||||
label: '个人信息', |
||||
prop: 'info', |
||||
column: [{ |
||||
label: '头像', |
||||
type: 'upload', |
||||
listType: 'picture-img', |
||||
propsHttp: { |
||||
res: 'data', |
||||
url: 'link', |
||||
label: "个人信息", |
||||
prop: "info", |
||||
column: [ |
||||
{ |
||||
label: "头像", |
||||
type: "upload", |
||||
listType: "picture-img", |
||||
propsHttp: { |
||||
res: "data", |
||||
url: "link", |
||||
}, |
||||
canvasOption: { |
||||
text: " ", |
||||
ratio: 0.1, |
||||
}, |
||||
action: "/api/blade-resource/oss/endpoint/put-file", |
||||
tip: "只能上传jpg/png用户头像,且不超过500kb", |
||||
span: 12, |
||||
row: true, |
||||
prop: "avatar", |
||||
}, |
||||
canvasOption: { |
||||
text: ' ', |
||||
ratio: 0.1 |
||||
{ |
||||
label: "姓名", |
||||
span: 12, |
||||
row: true, |
||||
prop: "realName", |
||||
}, |
||||
action: '/api/blade-resource/oss/endpoint/put-file', |
||||
tip: '只能上传jpg/png用户头像,且不超过500kb', |
||||
span: 12, |
||||
row: true, |
||||
prop: 'avatar' |
||||
}, { |
||||
label: '姓名', |
||||
span: 12, |
||||
row: true, |
||||
prop: 'realName' |
||||
}, { |
||||
label: '用户名', |
||||
span: 12, |
||||
row: true, |
||||
prop: 'name' |
||||
}, { |
||||
label: '手机号', |
||||
span: 12, |
||||
row: true, |
||||
prop: 'phone' |
||||
}, { |
||||
label: '邮箱', |
||||
prop: 'email', |
||||
span: 12, |
||||
row: true, |
||||
}] |
||||
{ |
||||
label: "用户名", |
||||
span: 12, |
||||
row: true, |
||||
prop: "name", |
||||
}, |
||||
{ |
||||
label: "手机号", |
||||
span: 12, |
||||
row: true, |
||||
prop: "phone", |
||||
}, |
||||
{ |
||||
label: "邮箱", |
||||
prop: "email", |
||||
span: 12, |
||||
row: true, |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '修改密码', |
||||
prop: 'password', |
||||
column: [{ |
||||
label: '原密码', |
||||
span: 12, |
||||
row: true, |
||||
type: 'password', |
||||
prop: 'oldPassword' |
||||
}, { |
||||
label: '新密码', |
||||
span: 12, |
||||
row: true, |
||||
type: 'password', |
||||
prop: 'newPassword' |
||||
}, { |
||||
label: '确认密码', |
||||
span: 12, |
||||
row: true, |
||||
type: 'password', |
||||
prop: 'newPassword1' |
||||
}] |
||||
} |
||||
label: "修改密码", |
||||
prop: "password", |
||||
column: [ |
||||
{ |
||||
label: "原密码", |
||||
span: 12, |
||||
row: true, |
||||
type: "password", |
||||
prop: "oldPassword", |
||||
}, |
||||
{ |
||||
label: "新密码", |
||||
span: 12, |
||||
row: true, |
||||
type: "password", |
||||
prop: "newPassword", |
||||
}, |
||||
{ |
||||
label: "确认密码", |
||||
span: 12, |
||||
row: true, |
||||
type: "password", |
||||
prop: "newPassword1", |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
} |
||||
}; |
||||
|
||||
@ -0,0 +1,305 @@ |
||||
<template> |
||||
<basic-container> |
||||
<avue-skeleton :loading="waiting" avatar :rows="8"> |
||||
<avue-form |
||||
v-model="form" |
||||
ref="form" |
||||
:option="option" |
||||
:upload-after="uploadAfter" |
||||
> |
||||
<template slot="uploadRecords"> |
||||
<el-table |
||||
v-if="form.uploadRecords && form.uploadRecords.length > 0" |
||||
:data="form.uploadRecords" |
||||
style="width: 100%" |
||||
> |
||||
<el-table-column prop="name" label="附件名称" width="250"> |
||||
<template slot-scope="scope"> |
||||
<span |
||||
style="color: blue; cursor: pointer" |
||||
@click="download(scope.row)" |
||||
>{{ scope.row.name }}</span |
||||
> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="createUser" label="上传人" width="180"> |
||||
</el-table-column> |
||||
<el-table-column prop="createTime" label="上传时间" width="240"> |
||||
</el-table-column> |
||||
<el-table-column label="操作"> |
||||
<template slot-scope="scope"> |
||||
<i |
||||
v-if="userInfo.real_name === scope.row.createUser && form.isFinish!==1" |
||||
class="el-icon-delete" |
||||
style="cursor: pointer" |
||||
@click="deleteFile(scope.$index)" |
||||
></i> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<span v-else></span> |
||||
</template> |
||||
</avue-form> |
||||
<div class="footer" v-if="form.isFinish === 0"> |
||||
<el-button type="success" @click="submit" :loading="subLoading" |
||||
>实施提交</el-button |
||||
> |
||||
</div> |
||||
</avue-skeleton> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
import { downloadFile } from "@/api/plugin/workflow/form.js"; |
||||
import { add } from "@/api/plugin/workflow/workorder.js"; |
||||
import { mapGetters } from "vuex"; |
||||
export default { |
||||
data() { |
||||
return { |
||||
waiting: false, |
||||
form: {}, |
||||
subLoading: false, |
||||
option: { |
||||
labelPosition: "left", |
||||
labelSuffix: ":", |
||||
labelWidth: 120, |
||||
gutter: 0, |
||||
submitBtn: false, |
||||
emptyBtn: false, |
||||
column: [ |
||||
{ |
||||
type: "input", |
||||
label: "运维公司", |
||||
span: 7, |
||||
display: true, |
||||
prop: "maintenanceCompanyName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "管理部门", |
||||
span: 7, |
||||
display: true, |
||||
prop: "managementName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "任务父类", |
||||
span: 7, |
||||
display: true, |
||||
prop: "taskParentName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "任务种类", |
||||
span: 7, |
||||
display: true, |
||||
prop: "taskTypeName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "任务等级", |
||||
span: 7, |
||||
display: true, |
||||
prop: "taskLevelName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
// dicUrl: "/api/blade-workflow//taskInfo/taskLevel", |
||||
// dicMethod: "get", |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "系统名称/数据库", |
||||
span: 7, |
||||
display: true, |
||||
prop: "operateSysName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "数据模块/数据表", |
||||
span: 7, |
||||
display: true, |
||||
prop: "operateModuleName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "datetime", |
||||
label: "期望完成时间", |
||||
span: 7, |
||||
display: true, |
||||
format: "yyyy-MM-dd HH:mm", |
||||
valueFormat: "yyyy-MM-dd HH:mm:ss", |
||||
prop: "expectedCompletionTime", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "重复模式", |
||||
span: 7, |
||||
display: true, |
||||
prop: "repeatModeName", |
||||
labelPosition: "top", |
||||
disabled: true, |
||||
// dicUrl: "/api/blade-system/dict-biz/dictionary?code=repeat_mode", |
||||
// dicMethod: "get", |
||||
}, |
||||
// { |
||||
// type: "textarea", |
||||
// label: "备注", |
||||
// span: 24, |
||||
// display: true, |
||||
// prop: "beizhu", |
||||
// labelPosition: "top", |
||||
// disabled: true, |
||||
// }, |
||||
{ |
||||
type: "upload", |
||||
propsHttp: { |
||||
res: "data", |
||||
url: "path", |
||||
name: "name", |
||||
}, |
||||
action: "/api/blade-workflow/database/upload", |
||||
display: JSON.parse(this.$route.query.form).isFinish === 0 ? true : false, |
||||
span: 24, |
||||
showFileList: true, |
||||
multiple: true, |
||||
limit: 10, |
||||
prop: "shangchuan", |
||||
labelPosition: "top", |
||||
dragFile: true, |
||||
label: "附件上传", |
||||
}, |
||||
{ |
||||
type: "input", |
||||
span: 24, |
||||
display: true, |
||||
prop: "uploadRecords", |
||||
labelPosition: "top", |
||||
}, |
||||
{ |
||||
type: "textarea", |
||||
label: "实施反馈", |
||||
span: 24, |
||||
display: true, |
||||
prop: "remark", |
||||
labelPosition: "top", |
||||
rules: [{ required: true, message: "请输入实施反馈" }], |
||||
disabled: JSON.parse(this.$route.query.form).isFinish === 1 ? true : false, |
||||
}, |
||||
], |
||||
}, |
||||
}; |
||||
}, |
||||
created() { |
||||
const { |
||||
maintenanceCompanyName, |
||||
managementName, |
||||
taskParentName, |
||||
taskTypeName, |
||||
taskLevelName, |
||||
operateSysName, |
||||
operateModuleName, |
||||
repeatModeName, |
||||
uploadRecords, |
||||
expectedCompletionTime, |
||||
isFinish, |
||||
id, |
||||
remark |
||||
} = JSON.parse(this.$route.query.form); |
||||
this.form = { |
||||
maintenanceCompanyName, |
||||
managementName, |
||||
taskParentName, |
||||
taskTypeName, |
||||
taskLevelName, |
||||
operateSysName, |
||||
operateModuleName, |
||||
repeatModeName, |
||||
uploadRecords, |
||||
expectedCompletionTime, |
||||
isFinish, |
||||
id, |
||||
remark |
||||
}; |
||||
}, |
||||
computed: { |
||||
...mapGetters(["userInfo"]), |
||||
}, |
||||
methods: { |
||||
// 下载 |
||||
async download(row) { |
||||
let res = await downloadFile({ |
||||
path: row.path, |
||||
}); |
||||
let blob = new Blob([res.data], { |
||||
type: res.type, |
||||
}); |
||||
let downloadElement = document.createElement("a"); |
||||
let href = window.URL.createObjectURL(blob); |
||||
downloadElement.href = href; |
||||
downloadElement.download = row.name; |
||||
document.body.appendChild(downloadElement); |
||||
downloadElement.click(); |
||||
window.URL.revokeObjectURL(href); |
||||
}, |
||||
// 文件上传后 |
||||
uploadAfter(res, done, loading, column) { |
||||
if (typeof this.form.uploadRecords == "string") { |
||||
this.form.uploadRecords = this.form.uploadRecords.split(""); |
||||
} |
||||
this.form.uploadRecords.push(res); |
||||
done(); |
||||
this.$message.success("上传成功!"); |
||||
}, |
||||
// 删除附件 |
||||
deleteFile(index) { |
||||
this.$confirm("确定要删除附件吗?", { |
||||
confirmButtonText: "确定", |
||||
cancelButtonText: "取消", |
||||
type: "warning", |
||||
}).then(() => { |
||||
this.form.uploadRecords.splice(index, 1); |
||||
}); |
||||
}, |
||||
submit() { |
||||
this.subLoading = true; |
||||
if (this.form.remark === "") { |
||||
this.$message.warning("请输入实施反馈!"); |
||||
this.subLoading = false; |
||||
return; |
||||
} |
||||
const { id, uploadRecords, remark } = this.form; |
||||
|
||||
add({ id, uploadRecords, remark }) |
||||
.then((res) => { |
||||
console.log(res) |
||||
this.subLoading = false; |
||||
this.$message.success("提交成功!"); |
||||
this.$router.replace("/plugin/workflow/process/implementation"); |
||||
}) |
||||
.catch((err) => { |
||||
this.subLoading = false; |
||||
this.$message.error("提交失败!"); |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style scoped lang="scss"> |
||||
.footer { |
||||
display: flex; |
||||
justify-content: center; |
||||
} |
||||
</style> |
||||
@ -0,0 +1,337 @@ |
||||
<template> |
||||
<div class="cus-container"> |
||||
<el-form :model="searchForm"> |
||||
<div class="search"> |
||||
<div> |
||||
<el-select |
||||
v-model="searchForm.taskParent" |
||||
placeholder="任务父类" |
||||
class="search-select" |
||||
clearable |
||||
> |
||||
<el-option |
||||
v-for="item in taskParent" |
||||
:key="item.id" |
||||
:label="item.dictValue" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.taskType" |
||||
placeholder="任务种类" |
||||
class="search-select" |
||||
clearable |
||||
> |
||||
<el-option |
||||
v-for="item in taskInfos" |
||||
:key="item.id" |
||||
:label="item.taskTypeName" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.management" |
||||
placeholder="管理部门" |
||||
class="search-select" |
||||
clearable |
||||
> |
||||
<el-option |
||||
v-for="item in depts" |
||||
:key="item.id" |
||||
:label="item.deptName" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.taskLevel" |
||||
placeholder="任务级别" |
||||
class="search-select" |
||||
clearable |
||||
> |
||||
<el-option |
||||
v-for="item in taskLevel" |
||||
:key="item.id" |
||||
:label="item.dictValue" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.isFinish" |
||||
placeholder="状态" |
||||
class="search-select" |
||||
clearable |
||||
> |
||||
<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 |
||||
v-for="item in users" |
||||
:key="item.id" |
||||
:label="item.realName" |
||||
:value="item.id" |
||||
> |
||||
</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" |
||||
@click="exportHandle" |
||||
>导出</el-button |
||||
> |
||||
</div> |
||||
</div> |
||||
</el-form> |
||||
<div style="margin-top: 30px"> |
||||
<avue-crud |
||||
id="avue-id" |
||||
ref="crud" |
||||
:option="option" |
||||
:data="tableData" |
||||
:page.sync="page" |
||||
:table-loading="loading" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
> |
||||
<template slot-scope="{ row }" slot="menu"> |
||||
<el-button @click="details(row)">详情 </el-button> |
||||
</template> |
||||
<template slot-scope="scope" slot="isFinish"> |
||||
<span |
||||
:style="{ |
||||
color: scope.row.isFinish === 0 ? '#FF9130' : '#2EE27C', |
||||
}" |
||||
>● {{ scope.row.isFinish === 0 ? "待实施" : "已完成" }}</span |
||||
> |
||||
</template> |
||||
</avue-crud> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import { |
||||
implementation as getList, |
||||
conditionalData, |
||||
workOrderExcel, |
||||
} from "@/api/plugin/workflow/workorder.js"; |
||||
import exForm from "../mixins/ex-form"; |
||||
import { tableOption } from "@/const/workflow/implementation.js"; |
||||
export default { |
||||
mixins: [exForm], |
||||
data() { |
||||
return { |
||||
searchForm: {}, |
||||
option: tableOption, |
||||
page: { |
||||
currentPage: 1, |
||||
total: 0, |
||||
pageSize: 10, |
||||
}, |
||||
// 表格数据 |
||||
tableData: [], |
||||
loading: false, |
||||
taskParent: [], |
||||
taskInfos: [], |
||||
depts: [], |
||||
users: [], |
||||
taskLevel: [], |
||||
statusList: [ |
||||
{ |
||||
label: "待实施", |
||||
value: 0, |
||||
}, |
||||
{ |
||||
label: "已完成", |
||||
value: 1, |
||||
}, |
||||
], |
||||
}; |
||||
}, |
||||
created() { |
||||
this.dictBiz(); |
||||
this.onLoad(); |
||||
}, |
||||
methods: { |
||||
dictBiz() { |
||||
conditionalData().then((res) => { |
||||
const { taskParent, taskInfos, depts, users, taskLevel } = |
||||
res.data.data; |
||||
this.taskParent = taskParent; |
||||
this.taskInfos = taskInfos; |
||||
this.depts = depts; |
||||
this.users = users; |
||||
this.taskLevel = taskLevel; |
||||
}); |
||||
}, |
||||
// 列表 |
||||
onLoad() { |
||||
this.loading = true; |
||||
const { currentPage, pageSize } = this.page; |
||||
if ( |
||||
this.searchForm.timeArr !== null && |
||||
this.searchForm.timeArr !== undefined |
||||
) { |
||||
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) => { |
||||
const { total, records } = res.data.data; |
||||
this.page.total = total; |
||||
this.tableData = records; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
// 分页 |
||||
currentChange(currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
this.onLoad(); |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
this.onLoad(); |
||||
}, |
||||
// 查询重置 |
||||
searchHandle(index) { |
||||
this.page.currentPage = 1; |
||||
if (index === 2) { |
||||
this.searchForm = { |
||||
timeArr: null, |
||||
timeArr2: null, |
||||
}; |
||||
} |
||||
this.onLoad(); |
||||
}, |
||||
// 导出 |
||||
exportHandle() { |
||||
if ( |
||||
this.searchForm.timeArr !== null && |
||||
this.searchForm.timeArr !== undefined |
||||
) { |
||||
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]; |
||||
} |
||||
workOrderExcel(this.searchForm).then((res) => { |
||||
const blob = res.data; |
||||
const link = document.createElement("a"); |
||||
let binaryData = []; |
||||
binaryData.push(blob); |
||||
link.href = window.URL.createObjectURL(new Blob(binaryData)); |
||||
link.download = "工单记录.xlsx"; |
||||
document.body.appendChild(link); |
||||
link.click(); |
||||
window.setTimeout(function () { |
||||
URL.revokeObjectURL(blob); |
||||
document.body.removeChild(link); |
||||
}, 0); |
||||
this.$message.success("导出成功!"); |
||||
}); |
||||
}, |
||||
// 详情 |
||||
details(row) { |
||||
this.$router.push({ |
||||
path: '/workflow/process/effect', |
||||
query: { |
||||
form: JSON.stringify(row) |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.search-line { |
||||
margin-top: 20px; |
||||
display: flex; |
||||
justify-content: space-between; |
||||
} |
||||
.search-select { |
||||
width: 150px; |
||||
margin-right: 20px; |
||||
} |
||||
.search-input { |
||||
width: 288px; |
||||
} |
||||
.search-btn { |
||||
width: 130px; |
||||
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; |
||||
} |
||||
</style> |
||||
Loading…
Reference in new issue