报告单设置
This commit is contained in:
parent
15608dcc80
commit
36826154e0
@ -272,7 +272,7 @@ async function loadApiDict() {
|
||||
if (response.code === 200 && Array.isArray(response.data)) {
|
||||
dictOptions.value = response.data.map(item => ({
|
||||
label: item.reportName || "",
|
||||
value: item.reportId || ""
|
||||
value: item.reportBgdh || ""
|
||||
}));
|
||||
} else {
|
||||
ElMessage.warning("模板无有效数据");
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编号" align="center" prop="reportId" width="50" show-overflow-tooltip/>
|
||||
<el-table-column label="编号" align="center" prop="reportBgdh" width="50" show-overflow-tooltip/>
|
||||
<el-table-column label="模板文件名" align="center" prop="reportCode" width="150" show-overflow-tooltip />
|
||||
<el-table-column :label="`${menuname}名称`" align="left" prop="reportName" show-overflow-tooltip />
|
||||
<el-table-column label="排版类别" align="center" prop="reportOptiontype"width="80">
|
||||
@ -193,7 +193,7 @@
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".jrxml" :headers="upload.headers"
|
||||
:action="upload.url + '?reportId=' + upload.reportId" :disabled="upload.isUploading"
|
||||
:action="upload.url + '?reportBgdh=' + upload.reportBgdh" :disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
@ -261,7 +261,7 @@ const upload = reactive({
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 更新的模板号
|
||||
reportId: 0,
|
||||
reportBgdh: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
@ -315,7 +315,7 @@ function cancel() {
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
reportId: undefined,
|
||||
reportBgdh: undefined,
|
||||
reportCode: undefined,
|
||||
reportName: undefined,
|
||||
reportType: reportTypeOptions.value[0]?.value || "",
|
||||
@ -339,21 +339,21 @@ function resetQuery() {
|
||||
}
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.reportId);
|
||||
ids.value = selection.map(item => item.reportBgdh);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
upload.reportId=0;
|
||||
upload.reportBgdh=0;
|
||||
upload.title = "新增模板";
|
||||
upload.open = true;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const reportId = row.reportId || ids.value;
|
||||
getreportdict(reportId).then(response => {
|
||||
const reportBgdh = row.reportBgdh || ids.value;
|
||||
getreportdict(reportBgdh).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改"+menuname.value;
|
||||
@ -364,7 +364,7 @@ function submitForm() {
|
||||
proxy.$refs["reportdictRef"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
if (form.value.reportId != undefined) {
|
||||
if (form.value.reportBgdh != undefined) {
|
||||
updatereportdict(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
@ -398,7 +398,7 @@ function submitFileForm() {
|
||||
};
|
||||
/** 导入按钮操作 */
|
||||
function uploadfile(row) {
|
||||
upload.reportId= row.reportId;
|
||||
upload.reportBgdh= row.reportBgdh;
|
||||
upload.title = "模板上传";
|
||||
upload.open = true;
|
||||
};
|
||||
@ -411,10 +411,10 @@ function downloadfile(row) {
|
||||
};
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const reportIds = row.reportId || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + reportIds + '"的数据项?').then(function() {
|
||||
const reportBgdhs = row.reportBgdh || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除"' + menuname.value + '"编号为"' + reportBgdhs + '"的数据项?').then(function() {
|
||||
|
||||
return delreportdict(reportIds);
|
||||
return delreportdict(reportBgdhs);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user