审批流程页面修改,新增元数据下载

main
mo 1 year ago
parent 4e2b97d372
commit eff22791d1

@ -52,3 +52,13 @@ export function exportFlowExcel(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 下载元数据
export function downloadXml(query) {
return request({
url: '/archives/flow/downloadXml',
method: 'get',
params: query,
responseType: 'blob'
})
}

@ -58,6 +58,17 @@
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-download"
size="mini"
@click="handleDownloadData"
v-hasPermi="['archives:flow:export']"
>下载元数据</el-button
>
</el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -69,16 +80,23 @@
<!-- <el-table-column label="主键Id" align="center" prop="id" /> --> <!-- <el-table-column label="主键Id" align="center" prop="id" /> -->
<el-table-column label="OA/ERP流程编号" align="center" prop="flowCode" /> <el-table-column label="OA/ERP流程编号" align="center" prop="flowCode" />
<el-table-column label="凭证号" align="center" prop="voucherNum" /> <el-table-column label="凭证号" align="center" prop="voucherNum" />
<el-table-column label="业务类型" align="center" prop="businessType" /> <el-table-column label="业务类型" align="center" prop="businessType">
<el-table-column label="业务实体" align="center" prop="company" /> <template v-slot="scope">
<el-table-column label="删除状态" align="center" prop="delStatus" /> <dict-tag
<el-table-column label="文件后缀" align="center" prop="suffix" /> :type="DICT_TYPE.ACCOUNTING_OTHER_TYPE"
<el-table-column label="文件地址" align="center" prop="fileUrl" /> :value="scope.row.businessType"
<el-table-column label="绝对路径" align="center" prop="fileAp" /> />
</template>
</el-table-column>
<el-table-column label="文件地址" align="center" prop="fileUrl">
<template slot-scope="scope">
<el-button type="text" @click="openLink(scope.row.fileUrl)">
{{ scope.row.fileUrl }}
</el-button>
</template>
</el-table-column>
<el-table-column label="流程号" align="center" prop="flowId" /> <el-table-column label="流程号" align="center" prop="flowId" />
<el-table-column label="摘要" align="center" prop="note" /> <el-table-column label="摘要" align="center" prop="note" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="归档状态" align="center" prop="archiveState" />
<el-table-column <el-table-column
label="创建时间" label="创建时间"
align="center" align="center"
@ -127,61 +145,96 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
width="500px" width="1000px"
v-dialogDrag
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-row>
<el-col :span="8">
<el-form-item label="OA/ERP流程编号" prop="flowCode"> <el-form-item label="OA/ERP流程编号" prop="flowCode">
<el-input <el-input
v-model="form.flowCode" v-model="form.flowCode"
placeholder="请输入OA/ERP流程编号" placeholder="请输入OA/ERP流程编号"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证号" prop="voucherNum"> <el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" /> <el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务类型" prop="businessType"> <el-form-item label="业务类型" prop="businessType">
<el-select v-model="form.businessType" placeholder="请选择业务类型"> <el-select
<el-option label="请选择字典生成" value="" /> v-model="queryParams.businessType"
placeholder="请选择业务类型"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(
DICT_TYPE.ACCOUNTING_OTHER_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="业务实体" prop="company"> </el-col>
<el-input v-model="form.company" placeholder="请输入业务实体" /> </el-row>
</el-form-item> <el-row>
<el-form-item label="删除状态" prop="delStatus"> <el-col :span="8">
<el-radio-group v-model="form.delStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="文件后缀" prop="suffix">
<el-input v-model="form.suffix" placeholder="请输入文件后缀" />
</el-form-item>
<el-form-item label="文件地址" prop="fileUrl"> <el-form-item label="文件地址" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件地址" /> <el-input v-model="form.fileUrl" placeholder="请输入文件地址" />
</el-form-item> </el-form-item>
<el-form-item label="绝对路径" prop="fileAp"> </el-col>
<el-input v-model="form.fileAp" placeholder="请输入绝对路径" /> <el-col :span="8">
</el-form-item>
<el-form-item label="流程号" prop="flowId"> <el-form-item label="流程号" prop="flowId">
<el-input v-model="form.flowId" placeholder="请输入流程号" /> <el-input v-model="form.flowId" placeholder="请输入流程号" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="摘要" prop="note"> <el-form-item label="摘要" prop="note">
<el-input v-model="form.note" placeholder="请输入摘要" /> <el-input v-model="form.note" placeholder="请输入摘要" />
</el-form-item> </el-form-item>
<el-form-item label="部门名称" prop="deptName"> </el-col>
<el-input v-model="form.deptName" placeholder="请输入部门名称" /> </el-row>
</el-form-item>
<el-form-item label="归档状态" prop="archiveState">
<el-input v-model="form.archiveState" placeholder="请输入归档状态" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 密码输入框-->
<el-dialog
:title="title"
:visible.sync="open1"
width="800px"
append-to-body
>
<el-form
ref="queryForm"
:model="queryParams"
:rules="rules"
label-width="140px"
>
<el-row>
<el-col :span="14">
<el-form-item label="密码" prop="inputPassword">
<el-input
v-model="queryParams.inputPassword"
placeholder="请输入密码"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm1"> </el-button>
<el-button @click="cancel1"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -193,6 +246,7 @@ import {
getFlow, getFlow,
getFlowPage, getFlowPage,
exportFlowExcel, exportFlowExcel,
downloadXml,
} from "@/api/accounting/flow"; } from "@/api/accounting/flow";
export default { export default {
@ -214,6 +268,7 @@ export default {
title: "", title: "",
// //
open: false, open: false,
open1: false,
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
@ -236,6 +291,7 @@ export default {
deptName: null, deptName: null,
archiveId: null, archiveId: null,
archiveState: null, archiveState: null,
inputPassword: null,
}, },
// //
form: {}, form: {},
@ -257,11 +313,19 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
openLink(fileUrl) {
window.open(fileUrl);
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
/** 取消按钮 */
cancel1() {
this.open1 = false;
},
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
this.form = { this.form = {
@ -367,6 +431,32 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
//
handleDownloadData() {
this.open1 = true;
this.queryParams.inputPassword = null;
},
submitForm1() {
this.$refs["queryForm"].validate((valid) => {
if (!valid) {
return;
}
//
let params = { ...this.queryParams };
downloadXml(params)
.then((response) => {
console.log(response.size);
if (response.size == 39) {
this.$modal.msgError("密码错误");
return false;
} else {
this.$download.excel(response, "审批流程元数据.xml");
this.open1 = false;
}
})
.catch(() => {});
});
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save