From 97a84b500fb1d5418d8a72a7fc8af2829c83ece5 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期五, 28 十一月 2025 15:16:19 +0800
Subject: [PATCH] 修改
---
src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue | 54 ++++++++++++++++++++++++++++++++++++------------------
1 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue
index d9847d3..7217c12 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/programStanderdModule/components/editDialog.vue
@@ -19,25 +19,35 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="所属部门:" prop="deptId">
- <el-select v-model="state.form.deptId" placeholder="请选择" style="width: 100%" clearable>
- <el-option
- v-for="item in state.deptList"
- :key="item.deptId"
- :label="item.deptName"
- :value="item.deptId">
- </el-option>
- </el-select>
- </el-form-item>
-
+<!-- <el-form-item label="所属部门:" prop="deptId">-->
+<!-- <el-select v-model="state.form.deptId" placeholder="请选择" style="width: 100%" clearable>-->
+<!-- <el-option-->
+<!-- v-for="item in state.deptList"-->
+<!-- :key="item.deptId"-->
+<!-- :label="item.deptName"-->
+<!-- :value="item.deptId">-->
+<!-- </el-option>-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
<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="industryTypeId">-->
+<!-- <el-select v-model="state.form.industryTypeId" filterable placeholder="请选择" clearable>-->
+<!-- <el-option-->
+<!-- v-for="item in state.typeList"-->
+<!-- :key="item.id"-->
+<!-- style="width: 100%"-->
+<!-- :label="item.name"-->
+<!-- :value="item.id">-->
+<!-- </el-option>-->
+<!-- </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,.xlsx,.xls" :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、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
</template>
</el-upload>
</el-form-item>
@@ -81,6 +91,8 @@
filePath: '',
format: '',
companyId: null,
+ industryTypeId: null,
+ industryTypeName: '',
deptId:null,
templateType: 10
},
@@ -89,6 +101,7 @@
templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }],
deptId: [{ required: true, message: '请选择部门', trigger: 'blur' }],
+ industryTypeId: [{ required: true, message: '请选择行业类别', trigger: 'blur' }]
},
isAdmin: false,
companyList: [],
@@ -98,17 +111,19 @@
},
fileLimit: 1,
fileList: [],
- deptList: []
+ deptList: [],
+ typeList: []
})
onMounted(() => {
});
-const openDialog = async (type, value,companyId, isAdmin, companyList) => {
+const openDialog = async (type, value,companyId, isAdmin, companyList,typeList) => {
state.isAdmin = isAdmin
if(isAdmin){
state.companyList = companyList
}
+ state.typeList = typeList
state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
state.form.companyId = companyId
if(state.title == '编辑'||state.title == '查看'){
@@ -120,7 +135,7 @@
if(value.filePath) {
const obj = {
url: value.filePath,
- name: '模板文件'
+ name: value.templateName+value.format
}
state.fileList = [obj]
}
@@ -146,6 +161,7 @@
const onSubmit = async () => {
const valid = await superRef.value.validate();
if(valid){
+ state.form.industryTypeName = state.typeList.find(i=>i.id == state.form.industryTypeId)?.name || ''
if(state.title == '新增'){
const {id,...data} = state.form
const res = await saveStandardTemp(data)
@@ -191,10 +207,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
}
@@ -227,6 +243,8 @@
filePath: '',
format: '',
companyId: null,
+ industryTypeId: null,
+ industryTypeName: '',
deptId:null,
templateType: 10
}
--
Gitblit v1.9.2