| | |
| | | <template> |
| | | <div class="system-edit-user-container"> |
| | | <el-dialog |
| | | :title="titles" |
| | | v-model="isShowDialog" |
| | | width="769px" |
| | | draggable |
| | | :fullscreen="full" |
| | | > |
| | | <el-dialog :title="titles" v-model="isShowDialog" width="769px" draggable :fullscreen="full"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form |
| | | ref="ruleFormRef" |
| | | :model="ruleForm" |
| | | size="default" |
| | | label-width="120px" |
| | | :disabled="disabled" |
| | | > |
| | | <el-form ref="ruleFormRef" :model="ruleForm" size="default" label-width="120px" :disabled="disabled"> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="申报人姓名" prop="declareUserName"> |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="申报人部门" placeholder="请选择"> |
| | | <el-tree-select |
| | | v-model="ruleForm.declareDepartmentId" |
| | | :data="data" class="w100" |
| | | placeholder="请选择"/> |
| | | <el-tree-select v-model="ruleForm.declareDepartmentId" :data="data" class="w100" placeholder="请选择" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="事故名称" prop="accidentExpressId"> |
| | | <el-input |
| | | v-model="ruleForm.accidentExpressId" |
| | | placeholder="请选择" |
| | | class="input-with-select" |
| | | > |
| | | <el-input v-model="ruleForm.accidentExpressId" placeholder="请选择" class="input-with-select"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="daiInpt"/> |
| | | </template> |
| | |
| | | action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
| | | :on-change="handleChange" |
| | | > |
| | | <el-button type="primary" |
| | | >点击上传</el-button> |
| | | <el-button type="primary">点击上传</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | 添加相关附件 |
| | | </div> |
| | | <div class="el-upload__tip">添加相关附件</div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <AccidentName ref="showRef"/> |
| | | <AccidentName @selectItem="onSelectItem" ref="showRef" /> |
| | | <userSelections ref="userRef"/> |
| | | <RegionsDialog ref="openRef"/> |
| | | </div> |
| | |
| | | import { |
| | | // reactive, |
| | | ref, |
| | | defineComponent |
| | | defineComponent, |
| | | } from 'vue'; |
| | | |
| | | import type { |
| | | UploadUserFile, |
| | | FormInstance, |
| | | } from 'element-plus' |
| | | import type { UploadUserFile, FormInstance } from 'element-plus'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { |
| | | Search, |
| | | FullScreen |
| | | } from '@element-plus/icons-vue' |
| | | import UserSelections from "/@/components/userSelections/index.vue" |
| | | import AccidentName from '/@/views/accidentManagementSystem/workInjuryDeclaration/component/accidentName.vue' |
| | | import RegionsDialog from '/@/components/regionsDialog/index.vue' |
| | | import {emergencySuppliesApi} from "/@/api/emergencyResources"; |
| | | import {accidentManagementSystemApi} from "/@/api/workInjuryDeclaration"; |
| | | import { Search, FullScreen } from '@element-plus/icons-vue'; |
| | | import UserSelections from '/@/components/userSelections/index.vue'; |
| | | import AccidentName from '/@/views/accidentManagementSystem/workInjuryDeclaration/component/accidentName.vue'; |
| | | import RegionsDialog from '/@/components/regionsDialog/index.vue'; |
| | | import { emergencySuppliesApi } from '/@/api/emergencyResources'; |
| | | import { accidentManagementSystemApi } from '/@/api/workInjuryDeclaration'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'openAdd', |
| | |
| | | RegionsDialog, |
| | | }, |
| | | setup(props, { emit }) { |
| | | const isShowDialog = ref(false) |
| | | const isShowDialog = ref(false); |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | //定义表单 |
| | | const ruleForm = ref ({ |
| | | declareUserName: '', |
| | |
| | | { |
| | | fileName: '', |
| | | fileUrl: '', |
| | | } |
| | | }, |
| | | ], |
| | | }); |
| | | const titles = ref(); |
| | |
| | | } |
| | | }; |
| | | //日期选择器 |
| | | const value1 = ref('') |
| | | const value1 = ref(''); |
| | | // 上传附件 |
| | | const fileList = ref<UploadUserFile[]>([]) |
| | | const fileList = ref<UploadUserFile[]>([]); |
| | | // 可选择树 |
| | | const treeSelect = ref() |
| | | const treeSelect = ref(); |
| | | const tree = [ |
| | | { |
| | | value: '1', |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | ]; |
| | | //定义树形下拉框 |
| | | const responsibleDepartment = ref() |
| | | const responsibleDepartment = ref(); |
| | | const data = [ |
| | | { |
| | | value: '1', |
| | |
| | | { |
| | | value: '21', |
| | | label: '灌装一班', |
| | | children: [] |
| | | children: [], |
| | | }, |
| | | { |
| | | value: '22', |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | ]; |
| | | // 必填项提示 |
| | | // const rules = reactive<FormRules>({ |
| | | // teamName: [ |
| | |
| | | // }) |
| | | |
| | | // 事故名称弹窗 |
| | | const showRef=ref() |
| | | const showRef = ref(); |
| | | const daiInpt=()=>{ |
| | | showRef.value.openDailog() |
| | | } |
| | | showRef.value.openDailog(); |
| | | }; |
| | | //事故快报回填 |
| | | const onSelectItem = (item: any) => { |
| | | alert(1); |
| | | console.log('item', item); |
| | | }; |
| | | // 表单提交验证必填项 |
| | | const submitForm = async (title: string, formEl: FormInstance | undefined) => { |
| | | if (title == '新建工伤申报') { |
| | |
| | | console.log('error submit!', fields); |
| | | } |
| | | }); |
| | | } |
| | | else if (title == '修改工伤申报') { |
| | | } else if (title == '修改工伤申报') { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | |
| | | { |
| | | fileName: '', |
| | | fileUrl: '', |
| | | } |
| | | }, |
| | | ], |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | const resetForm = (formEl: FormInstance | undefined) => { |
| | | isShowDialog.value = false; |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | }; |
| | | // 选择区域弹窗 |
| | | const openRef=ref() |
| | | const openRef = ref(); |
| | | const regionsDialog=()=>{ |
| | | openRef.value.openDailog() |
| | | } |
| | | openRef.value.openDailog(); |
| | | }; |
| | | // 打开用户选择弹窗 |
| | | const userRef = ref(); |
| | | const openUser = () => { |
| | |
| | | titles, |
| | | disabled, |
| | | emit, |
| | | onSelectItem, |
| | | }; |
| | | }, |
| | | }); |