| | |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form :model="form" ref="ruleFormRef" :rules="rules" :disabled="disabled" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="标题" size="default" prop="caseTitle"> |
| | | <el-input v-model="form.caseTitle" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" offset="2"> |
| | | <el-col :xs="24" :sm="11" :md="11" :lg="11" :xl="11" class="mb20"> |
| | | <el-form-item label="发布时间" size="default" prop="caseTime"> |
| | | <el-date-picker |
| | | v-model="form.caseTime" |
| | |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="23" :md="23" :lg="23" :xl="23" class="mb20"> |
| | | <el-form-item label="内容" size="default" prop="caseContent"> |
| | | <Wangeditor v-if="dialogVisible" style="width: 100%" :value="form.caseContent" |
| | | @change="changeCaseContent" showTop=""></Wangeditor> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | import { Search, FullScreen } from '@element-plus/icons-vue'; |
| | | import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext } from 'element-plus'; |
| | | import { accidentManagementSystemApi } from '/@/api/accidentManagementSystem'; |
| | | import Wangeditor from './wangEditor/index.vue'; |
| | | |
| | | |
| | | export default defineComponent({ |
| | | components: {MdEditor}, |
| | | components: {Wangeditor}, |
| | | setup(props, { emit }) { |
| | | const getWangEditorValue = (str:string) => { |
| | | console.log(str); |
| | | } |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | const dialogVisible = ref<boolean>(false); |
| | | const form = ref({ |
| | | caseTitle: '',///案例标题 |
| | | caseContent: '案例内容',///案例内容 |
| | | caseContent: '',///案例内容 |
| | | caseTime: '', |
| | | }); |
| | | const changeCaseContent = (e) => { |
| | | form.value.caseContent = e |
| | | } |
| | | const targetType = ref(); |
| | | const disabled = ref(false); |
| | | const titles = ref(); |
| | | const titleT = ref(); |
| | | const openDailog = (title: string, id: number) => { |
| | | dialogVisible.value = true; |
| | | titles.value = `${title}目标分解`; |
| | | titles.value = `${title}事故案例`; |
| | | titleT.value = title; |
| | | // targetType.value = type; |
| | | disabled.value = title == '查看' ? true : false; |
| | |
| | | const resetForm = (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | form.value = {} |
| | | console.log(form.value) |
| | | dialogVisible.value = false; |
| | | }; |
| | | //全屏 |
| | |
| | | targetType, |
| | | disabled, |
| | | titles, |
| | | changeCaseContent |
| | | }; |
| | | }, |
| | | }); |