zhouwx
2025-11-26 f7b5bcf402dcfb264cda9e09784fd0705c58b216
src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/components/editDialog.vue
@@ -19,15 +19,16 @@
            </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 label="所属部门:" prop="department">
          <el-input v-model.trim="state.form.department" :disabled="state.title =='查看'" placeholder="部门名称"></el-input>
<!--          <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">
@@ -45,10 +46,10 @@
          </el-select>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
          <el-upload accept=".doc,.docx,.pdf,.xlsx" :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、.pdf、.xlsx格式文档,尺寸小于30M,最多可上传1份</div>
              <div class="el-upload__tip">支持上传.doc、.docx、.pdf、.xlsx、.xls格式文档,尺寸小于30M,最多可上传1份</div>
            </template>
          </el-upload>
        </el-form-item>
@@ -94,14 +95,16 @@
    companyId: null,
    industryTypeId: null,
    industryTypeName: '',
    deptId:null,
    // deptId:null,
    department:'',
    templateType: 2
  },
  formRules:{
    companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
    templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
    filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }],
    deptId: [{ required: true, message: '请选择部门', trigger: 'blur' }],
    // deptId: [{ required: true, message: '请选择部门', trigger: 'blur' }],
    department: [{ required: true, message: '请输入部门名称', trigger: 'blur' }],
    industryTypeId: [{ required: true, message: '请选择行业类别', trigger: 'blur' }]
  },
  isAdmin: false,
@@ -133,6 +136,7 @@
        state.form[key] = value[key]
      }
    })
    state.form.industryTypeId = value.industryTypeId ? value.industryTypeId:null
    if(value.filePath) {
      const obj = {
        url: value.filePath,
@@ -247,6 +251,7 @@
    industryTypeId: null,
    industryTypeName: '',
    deptId:null,
    department:'',
    templateType: 2
  }
  state.fileList = []