This commit is contained in:
dhr
2025-08-29 19:54:27 +08:00
parent 8682b0d8b8
commit 2815b7d6b0
8 changed files with 39 additions and 30 deletions

View File

@ -49,7 +49,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button v-hasPermi="['design:subcontract:add']" :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>

View File

@ -47,16 +47,16 @@
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:listOfFormalities:add']">新增</el-button> <el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:formalitiesAreConsolidated:getTree']"
>新增</el-button
>
<span style="margin-left: 10px" <span style="margin-left: 10px"
><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增" placement="top"> ><el-tooltip class="box-item" effect="dark" content="从原有模板列表选择新增" placement="top">
<el-icon color="#409efc"><WarningFilled /></el-icon> </el-tooltip <el-icon color="#409efc"><WarningFilled /></el-icon> </el-tooltip
></span> ></span>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5" v-hasPermi="['formalities:listOfFormalities:list']">
<el-button type="primary" plain icon="Plus" @click="addTemplate()" v-hasPermi="['formalities:formalitiesAreConsolidated:addFormalities']" <el-button type="primary" plain icon="Plus" @click="addTemplate()">新增数据</el-button>
>新增数据</el-button
>
<span style="margin-left: 10px"> <span style="margin-left: 10px">
<el-tooltip class="box-item" effect="dark" content="创建新模板并添加数据" placement="top"> <el-tooltip class="box-item" effect="dark" content="创建新模板并添加数据" placement="top">
<el-icon color="#409efc"><WarningFilled /></el-icon> <el-icon color="#409efc"><WarningFilled /></el-icon>

View File

@ -31,7 +31,13 @@
<el-button type="success" plain icon="Plus" @click="downloadTemplate" v-hasPermi="['land:enterRoad:import']">模板下载</el-button> <el-button type="success" plain icon="Plus" @click="downloadTemplate" v-hasPermi="['land:enterRoad:import']">模板下载</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-upload ref="uploadRef" class="upload-demo" :http-request="handleImport" :show-file-list="false"> <el-upload
ref="uploadRef"
v-hasPermi="['land:enterRoad:upload']"
class="upload-demo"
:http-request="handleImport"
:show-file-list="false"
>
<template #trigger> <template #trigger>
<el-button plain type="primary">导入excel</el-button> <el-button plain type="primary">导入excel</el-button>
</template> </template>
@ -93,7 +99,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" v-hasPermi="['land:enterRoad:add']" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>
@ -270,15 +276,18 @@ const handleImport = (options: any) => {
loading.value = true; loading.value = true;
let formData = new FormData(); let formData = new FormData();
formData.append('file', options.file); formData.append('file', options.file);
importEnterRoad(currentProject.value?.id,formData).then((res) => { importEnterRoad(currentProject.value?.id, formData)
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
proxy.$modal.msgSuccess(res.msg || '导入成功'); proxy.$modal.msgSuccess(res.msg || '导入成功');
getListLand(); getListLand();
getList(); getList();
} }
}).catch((err) => { })
.catch((err) => {
proxy.$modal.msgError(err.msg || '导入失败'); proxy.$modal.msgError(err.msg || '导入失败');
}).finally(() => { })
.finally(() => {
loading.value = false; loading.value = false;
}); });
}; };

View File

@ -99,7 +99,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm" v-hasPermi="['land:landBlock:add']"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>

View File

@ -208,7 +208,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button v-hasPermi="['land:landTransferLedger:add']" :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>

View File

@ -142,7 +142,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button v-hasPermi="['land:landTransferLedger:add']" :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>

View File

@ -145,7 +145,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" v-hasPermi="['land:landTransferLedger:add']" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>

View File

@ -119,7 +119,7 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button v-hasPermi="['design:subcontract:add']" :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</template> </template>