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

main
mo 1 year ago
parent 4e2b97d372
commit eff22791d1

@ -52,3 +52,13 @@ export function exportFlowExcel(query) {
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-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
:showSearch.sync="showSearch"
@queryTable="getList"
@ -69,16 +80,23 @@
<!-- <el-table-column label="主键Id" align="center" prop="id" /> -->
<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="businessType" />
<el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="删除状态" align="center" prop="delStatus" />
<el-table-column label="文件后缀" align="center" prop="suffix" />
<el-table-column label="文件地址" align="center" prop="fileUrl" />
<el-table-column label="绝对路径" align="center" prop="fileAp" />
<el-table-column label="业务类型" align="center" prop="businessType">
<template v-slot="scope">
<dict-tag
:type="DICT_TYPE.ACCOUNTING_OTHER_TYPE"
:value="scope.row.businessType"
/>
</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="note" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="归档状态" align="center" prop="archiveState" />
<el-table-column
label="创建时间"
align="center"
@ -127,61 +145,96 @@
<el-dialog
:title="title"
:visible.sync="open"
width="500px"
v-dialogDrag
width="1000px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="OA/ERP流程编号" prop="flowCode">
<el-input
v-model="form.flowCode"
placeholder="请输入OA/ERP流程编号"
/>
</el-form-item>
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
<el-form-item label="业务类型" prop="businessType">
<el-select v-model="form.businessType" placeholder="请选择业务类型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" />
</el-form-item>
<el-form-item label="删除状态" prop="delStatus">
<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-input v-model="form.fileUrl" placeholder="请输入文件地址" />
</el-form-item>
<el-form-item label="绝对路径" prop="fileAp">
<el-input v-model="form.fileAp" placeholder="请输入绝对路径" />
</el-form-item>
<el-form-item label="流程号" prop="flowId">
<el-input v-model="form.flowId" placeholder="请输入流程号" />
</el-form-item>
<el-form-item label="摘要" prop="note">
<el-input v-model="form.note" placeholder="请输入摘要" />
</el-form-item>
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
</el-form-item>
<el-form-item label="归档状态" prop="archiveState">
<el-input v-model="form.archiveState" placeholder="请输入归档状态" />
</el-form-item>
<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-input
v-model="form.flowCode"
placeholder="请输入OA/ERP流程编号"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="凭证号" prop="voucherNum">
<el-input v-model="form.voucherNum" placeholder="请输入凭证号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务类型" prop="businessType">
<el-select
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-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="文件地址" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="流程号" prop="flowId">
<el-input v-model="form.flowId" placeholder="请输入流程号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="摘要" prop="note">
<el-input v-model="form.note" placeholder="请输入摘要" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</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>
</template>
@ -193,6 +246,7 @@ import {
getFlow,
getFlowPage,
exportFlowExcel,
downloadXml,
} from "@/api/accounting/flow";
export default {
@ -214,6 +268,7 @@ export default {
title: "",
//
open: false,
open1: false,
//
queryParams: {
pageNo: 1,
@ -236,6 +291,7 @@ export default {
deptName: null,
archiveId: null,
archiveState: null,
inputPassword: null,
},
//
form: {},
@ -257,11 +313,19 @@ export default {
this.loading = false;
});
},
openLink(fileUrl) {
window.open(fileUrl);
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 取消按钮 */
cancel1() {
this.open1 = false;
},
/** 表单重置 */
reset() {
this.form = {
@ -367,6 +431,32 @@ export default {
})
.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>

Loading…
Cancel
Save