权限设计

This commit is contained in:
2025-08-15 19:14:20 +08:00
parent f2330cf965
commit d5092e7a58
7 changed files with 35 additions and 17 deletions

View File

@ -314,7 +314,7 @@ const uploadedSuccessfully = (res: any) => {
emit('update:modelValue', listToString(fileList.value));
proxy?.$modal.closeLoading();
}
if (props.autoUpload) {
if (props.autoUpload && props.limit === fileList.value.length) {
fileUploadRef.value?.clearFiles();
fileList.value = [];
emit('update:modelValue', ''); // 同步到外部 v-model

View File

@ -45,10 +45,26 @@
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看流程</el-button>
<el-button
link
type="warning"
icon="View"
v-if="scope.row.status != 'draft'"
v-hasPermi="['design:extract:query']"
@click="handleViewInfo(scope.row)"
>查看流程</el-button
>
</el-col>
<el-col :span="1.5">
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleFile(scope.row)">查看文件</el-button>
<el-button
link
type="warning"
icon="View"
v-if="scope.row.status != 'draft'"
v-hasPermi="['design:extract:query']"
@click="handleFile(scope.row)"
>查看文件</el-button
>
</el-col>
</el-row>
</template>

View File

@ -266,17 +266,19 @@ function importExcel(options) {
// 更新列表
if (state.work_order_type == 3) {
getVersionNums(false);
}else{
} else {
getVersionNums();
}
} else {
proxy.$modal.msgError(res.msg || '导入失败');
}
}).catch(()=>{
proxy.$modal.msgError(res.msg || '导入失败');
}).finally(() => {
state.loading.list = false;
})
.catch((err) => {
proxy.$modal.msgError(err.msg || '导入失败');
})
.finally(() => {
state.loading.list = false;
});
}
// 切换表名
function handleChange(sheet) {

View File

@ -106,7 +106,7 @@
link
icon="View"
v-hasPermi="['design:designChange:query']"
v-if="scope.row.status == 'draft' || scope.row.status == 'termination'"
v-if="scope.row.status == 'back' || scope.row.status == 'termination'"
@click="handleViewHistory(scope.row)"
>查看单据</el-button
>

View File

@ -29,7 +29,7 @@
>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
<file-upload :fileType="['pdf']" :fileSize="''" v-model="form.fileId" class="w-full"></file-upload>
<file-upload :fileType="['pdf']" v-model="form.fileId" class="w-full"></file-upload>
</el-form-item>
</div>
</el-form>

View File

@ -8,7 +8,7 @@
<el-input v-model="queryParams.fileName" placeholder="请输入文件名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="Search" v-hasPermi="['design:scheme:add']" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -48,7 +48,7 @@
v-if="scope.row.status !== 'draft'"
icon="Edit"
@click="handleView(scope.row)"
v-hasPermi="['design:PrelimScheme:edit']"
v-hasPermi="['design:PrelimScheme:query']"
>查看流程</el-button
>
<el-button
@ -60,7 +60,7 @@
v-hasPermi="['design:scheme:edit']"
>修改</el-button
>
<el-button
<!-- <el-button
link
type="primary"
v-if="scope.row.status === 'draft'"
@ -68,7 +68,7 @@
@click="handleDelete(scope.row)"
v-hasPermi="['design:scheme:remove']"
>删除</el-button
>
> -->
</template>
</el-table-column>
</el-table>

View File

@ -8,7 +8,7 @@
<el-input v-model="queryParams.subContent" placeholder="请输入分包内容" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="Search" @click="handleQuery" v-hasPermi="['design:subcontract:add']">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>