Commit 097f0b61 authored by 沈翠玲's avatar 沈翠玲

修复管理

parent 1ffbde17
......@@ -156,6 +156,20 @@
// labelWidth: 95,
// },
},
{
field: 'repairStatus',
title: '是否修复',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return (
<>
{row.repairStatus === 'Y' ? '是' : '否'}
</>
);
},
},
},
{
field: 'flowStatus',
showOverflow: 'tooltip',
......
......@@ -93,7 +93,8 @@
newPhone: [],
kinship: form.kinship,
flowStatus: 'pending',
status: 'Y',
status: 'enable',
repairStatus: 'Y',
tenantId: 0,
}).then((res) => {
console.log('sadas', res);
......
......@@ -2,17 +2,38 @@
<div class="table-box">
<div class="table-inner">
<ProTable :config="config" ref="caseLRef" :api="getRepairRecord">
<!-- <ProTable :config="config" ref="caseLRef" :data="data"> -->
<!-- <template #table_top>
<div class="topgrp">
<div class="topbox">
<div class="topinner">
<p>统计值</p>
<p>111</p>
<template #left_buttons>
<div class="flex items-center justify-center h-8">
<el-button
v-permission="'repair_admin_export'"
type="primary"
@click="admindownload"
class="mb-2"
>导出</el-button
>
<el-button
v-permission="'repair_te_export'"
type="primary"
class="mb-2 mr-2"
@click="download"
>导出</el-button
>
<el-upload
class="avatar-uploader"
ref="uploadRef"
:action="upload.url"
:disabled="upload.isUploading"
accept=".xls, .xlsx"
:limit="1"
:on-success="handleFileSuccess"
:on-remove="handleRemove"
:auto-upload="true"
:on-progress="uploadVideoProcess"
>
<el-button type="primary" plain :icon="Upload">批量修复上传</el-button>
</el-upload>
</div>
</div>
</div>
</template> -->
</template>
</ProTable>
</div>
</div>
......@@ -20,12 +41,18 @@
<script setup name="case-manage" lang="jsx">
import { useRouter } from 'vue-router';
import { getAppEnvConfig } from '@/utils/env';
import { reactive, ref } from 'vue';
import { getRepairRecord } from '@/api/property';
import { Upload } from '@element-plus/icons-vue';
const caseLRef = ref();
import { onMounted } from 'vue';
import { inject } from 'vue';
const downloadfile = inject('download');
const router = useRouter();
const envs = getAppEnvConfig();
const onCellClick = (row) => {
router.push({
path: '/property/case-detail',
......@@ -38,6 +65,43 @@
{ label: '通过', value: 'pass' },
{ label: '未通过', value: 'fail' },
];
const upload = reactive({
// 是否禁用上传
isUploading: false,
// 上传的地址
url: envs.VITE_GLOB_API_URL_PREFIX + '/RepairRecord/importExcel',
});
console.log('upload', upload);
const uploadVideoProcess = (event, file, fileList) => {
upload.isUploading = true;
};
const download = () => {
downloadfile('/RepairRecord/downloadByTenant', {}, '修复.xls');
}
const admindownload = () => {
downloadfile('/RepairRecord/download', {}, '修复.xls');
}
const handleFileSuccess = (response, file, fileList) => {
if (!response.success) {
ElMessage.error({
message: response.message || '检查失败',
plain: true,
});
upload.isUploading = false;
uploadRef.value.clearFiles();
}
if (response.success) {
ElMessage.success({
message: '上传成功',
plain: true,
});
form.path = response.message;
upload.isUploading = false;
}
};
const handleRemove = () => {
form.path = '';
};
const config = reactive({
columns: [
......@@ -101,6 +165,20 @@
labelWidth: 95,
},
},
{
field: 'repairStatus',
title: '是否修复',
showOverflow: 'tooltip',
slots: {
default: ({ row }) => {
return (
<>
{row.repairStatus === 'Y' ? '是' : '否'}
</>
);
},
},
},
{
field: 'kinship',
title: '与债权人关系',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment