From 00bae2110315cf9c9a533afea2c617d950f6768e Mon Sep 17 00:00:00 2001
From: 祖安之光 <11848914+light-of-zuan@user.noreply.gitee.com>
Date: 星期二, 18 十一月 2025 15:56:42 +0800
Subject: [PATCH] 修改新增
---
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue | 48 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 38 insertions(+), 10 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue
index 191794b..bb30cff 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/components/editDialog.vue
@@ -9,7 +9,7 @@
:close-on-click-modal="false"
>
<el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
- <el-form-item v-if="state.isAdmin" label="企业:" prop="companyId">
+ <el-form-item v-if="state.isAdmin" label="单位:" prop="companyId">
<el-select v-model="state.form.companyId" placeholder="请选择" clearable>
<el-option
v-for="item in state.companyList"
@@ -22,11 +22,21 @@
<el-form-item label="模板名称:" prop="templateName">
<el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="模板名称"></el-input>
</el-form-item>
+<!-- <el-form-item label="分类:" prop="classify">-->
+<!-- <el-select v-model="state.form.classify" placeholder="请选择" style="width: 100%">-->
+<!-- <el-option-->
+<!-- v-for="item in state.classifyList"-->
+<!-- :key="item.id"-->
+<!-- :label="item.name"-->
+<!-- :value="item.id"-->
+<!-- />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
<el-form-item label="模板文件:" prop="filePath">
- <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
+ <el-upload accept=".doc,.docx,.pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
<el-button type="primary">点击上传</el-button>
<template #tip>
- <div class="el-upload__tip">支持上传.doc、.docx格式文档,尺寸小于5M,最多可上传1张</div>
+ <div class="el-upload__tip">支持上传.doc、.docx、.pdf格式文档,尺寸小于30M,最多可上传1份</div>
</template>
</el-upload>
</el-form-item>
@@ -69,12 +79,14 @@
filePath: '',
format: '',
companyId: null,
- templateType: 1
+ templateType: 1,
+ classify: ''
},
formRules:{
companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
- filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }]
+ filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }],
+ classify: [{ required: true, message: '请选择分类', trigger: 'blur' }],
},
isAdmin: false,
companyList: [],
@@ -83,7 +95,21 @@
Authorization: getToken()
},
fileLimit: 1,
- fileList: []
+ fileList: [],
+ classifyList: [
+ {
+ id: 1,
+ name: '体系标准'
+ },
+ {
+ id: 2,
+ name: '安全标准'
+ },
+ {
+ id: 3,
+ name: '其他'
+ },
+ ]
})
onMounted(() => {
@@ -102,10 +128,11 @@
state.form[key] = value[key]
}
})
+ state.form.classify = !state.form.classify ? null: state.form.classify
if(value.filePath) {
const obj = {
url: value.filePath,
- name: '模板文件'
+ name: value.templateName+value.format
}
state.fileList = [obj]
}
@@ -162,10 +189,10 @@
});
}
const picSize = async (rawFile) => {
- if(rawFile.size / 1024 / 1024 > 5){
+ if(rawFile.size / 1024 / 1024 > 30){
ElMessage({
type: 'warning',
- message: '文件大小不能超过5M'
+ message: '文件大小不能超过30M'
});
return false
}
@@ -198,7 +225,8 @@
filePath: '',
format: '',
companyId: null,
- templateType: 1
+ templateType: 1,
+ classify: ''
}
state.fileList = []
superRef.value.clearValidate();
--
Gitblit v1.9.2