From 4e3ea127d1000b0f615b860e553acc409d926e18 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 27 十一月 2025 09:57:27 +0800
Subject: [PATCH] 修改
---
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue b/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue
index df9ab2a..6982bc7 100644
--- a/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue
+++ b/src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/components/editDialog.vue
@@ -19,14 +19,27 @@
</el-option>
</el-select>
</el-form-item>
+ <el-form-item label="阶段:" prop="stage">
+ <el-input v-model.trim="state.form.stage" :disabled="state.title =='查看'" placeholder="阶段"></el-input>
+ </el-form-item>
+ <el-form-item label="行业:" prop="industryTypeId">
+ <el-select v-model="state.form.industryTypeId" placeholder="请选择" clearable style="width: 100%">
+ <el-option
+ v-for="item in state.industryList"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
+ </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="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格式文档,尺寸小于30M,最多可上传1份</div>
+ <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
</template>
</el-upload>
</el-form-item>
@@ -50,6 +63,7 @@
import {getToken} from "@/utils/auth";
import {delPic} from "@/api/onlineEducation/banner";
import {saveStandardTemp, updateStandardTemp} from "@/api/standardSys/standardSys";
+import {getIndustry} from "@/api/system/industry";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
@@ -68,16 +82,21 @@
templateName: '',
filePath: '',
format: '',
+ stage:'',
+ industryTypeId:'',
companyId: null,
templateType: 3
},
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' }],
+ stage: [{ required: true, message: '请输入阶段', trigger: 'blur' }],
+ industryTypeId: [{ required: true, message: '请选择行业', trigger: 'blur' }],
},
isAdmin: false,
companyList: [],
+ industryList: [],
uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
header: {
Authorization: getToken()
@@ -96,12 +115,14 @@
}
state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
state.form.companyId = companyId
+ await getIndustryList()
if(state.title == '编辑'||state.title == '查看'){
Object.keys(state.form).forEach(key => {
if (key in value) {
state.form[key] = value[key]
}
})
+ state.form.industryTypeId = value.industryTypeId ? value.industryTypeId : null
if(value.filePath) {
const obj = {
url: value.filePath,
@@ -112,7 +133,14 @@
}
dialogVisible.value = true
}
-
+const getIndustryList = async () => {
+ const res = await getIndustry()
+ if(res.code == 200){
+ state.industryList = res.data.data
+ }else{
+ ElMessage.warning(res.message)
+ }
+}
const onSubmit = async () => {
const valid = await superRef.value.validate();
@@ -197,6 +225,8 @@
templateName: '',
filePath: '',
format: '',
+ industryTypeId:'',
+ stage:'',
companyId: null,
templateType: 3
}
--
Gitblit v1.9.2