| | |
| | | <el-dialog |
| | | :title="titles" |
| | | v-model="isShowDialog" |
| | | width="769px" |
| | | width="40%" |
| | | draggable |
| | | :fullscreen="full" |
| | | > |
| | |
| | | <el-form-item label="适用部门" prop="responsibleDepartment"> |
| | | <el-tree-select |
| | | v-model="ruleForm.treeSelect" |
| | | :data="tree" |
| | | :data="data" |
| | | multiple |
| | | :render-after-expand="true" |
| | | :props="propse" |
| | | show-checkbox |
| | | clearable |
| | | /> |
| | | <el-divider /> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="编写部门" prop="authorDeptId"> |
| | | <el-tree-select |
| | | v-model="ruleForm.authorDeptId" |
| | | check-strictly |
| | | :data="data" |
| | | class="w100" |
| | | :props="propse" |
| | | clearable |
| | | :render-after-expand="false" |
| | | placeholder="请选择"/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <script lang="ts"> |
| | | import { |
| | | ref, |
| | | defineComponent |
| | | defineComponent, |
| | | onMounted, |
| | | } from 'vue'; |
| | | |
| | | import type { |
| | |
| | | import CheckTemplate from '/@/components/checkTemplate/index.vue' |
| | | import RegionsDialog from '/@/components/regionsDialog/index.vue' |
| | | import {emergencyPlanApi} from "/@/api/emergencyPlan"; |
| | | import {goalManagementApi} from "/@/api/goalManagement"; |
| | | |
| | | export default defineComponent({ |
| | | name: 'openAdd', |
| | |
| | | const releaseDate = ref('') |
| | | // 上传附件 |
| | | const fileList = ref<UploadUserFile[]>([]) |
| | | // 可选择树 |
| | | //部门树 |
| | | const department = () => { |
| | | goalManagementApi() |
| | | .getTreedepartment() |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | data.value = res.data.data; |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | }; |
| | | const treeSelect = ref() |
| | | const tree = [ |
| | | { |
| | | value: '1', |
| | | label: 'Level one 1', |
| | | children: [ |
| | | { |
| | | value: '11', |
| | | label: 'Level two 1-1', |
| | | children: [ |
| | | { |
| | | value: '111', |
| | | label: 'Level three 1-1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: 'Level one 2', |
| | | children: [ |
| | | { |
| | | value: '21', |
| | | label: 'Level two 2-1', |
| | | children: [ |
| | | { |
| | | value: '211', |
| | | label: 'Level three 2-1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '22', |
| | | label: 'Level two 2-2', |
| | | children: [ |
| | | { |
| | | value: '221', |
| | | label: 'Level three 2-2-1', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: 'Level one 3', |
| | | children: [ |
| | | { |
| | | value: '31', |
| | | label: 'Level two 3-1', |
| | | children: [ |
| | | { |
| | | value: '311', |
| | | label: 'Level three 3-1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '32', |
| | | label: 'Level two 3-2', |
| | | children: [ |
| | | { |
| | | value: '321', |
| | | label: 'Level three 3-2-1', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | // const trees = ref(); |
| | | const propse = { |
| | | label: 'depName', |
| | | children: 'children', |
| | | value: 'depId', |
| | | }; |
| | | onMounted(() => { |
| | | department(); |
| | | }); |
| | | // const tree = [ |
| | | // { |
| | | // value: '1', |
| | | // label: 'Level one 1', |
| | | // children: [ |
| | | // { |
| | | // value: '11', |
| | | // label: 'Level two 1-1', |
| | | // children: [ |
| | | // { |
| | | // value: '111', |
| | | // label: 'Level three 1-1-1', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // value: '2', |
| | | // label: 'Level one 2', |
| | | // children: [ |
| | | // { |
| | | // value: '21', |
| | | // label: 'Level two 2-1', |
| | | // children: [ |
| | | // { |
| | | // value: '211', |
| | | // label: 'Level three 2-1-1', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // value: '22', |
| | | // label: 'Level two 2-2', |
| | | // children: [ |
| | | // { |
| | | // value: '221', |
| | | // label: 'Level three 2-2-1', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // value: '3', |
| | | // label: 'Level one 3', |
| | | // children: [ |
| | | // { |
| | | // value: '31', |
| | | // label: 'Level two 3-1', |
| | | // children: [ |
| | | // { |
| | | // value: '311', |
| | | // label: 'Level three 3-1-1', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // value: '32', |
| | | // label: 'Level two 3-2', |
| | | // children: [ |
| | | // { |
| | | // value: '321', |
| | | // label: 'Level three 3-2-1', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // ] |
| | | //定义树形下拉框 |
| | | const responsibleDepartment = ref() |
| | | const data = [ |
| | | { |
| | | value: '1', |
| | | label: '广汇能源综合物流发展有限责任公司', |
| | | children: [ |
| | | { |
| | | value: '11', |
| | | label: '经营班子', |
| | | children: [], |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '生产运行部', |
| | | children: [ |
| | | { |
| | | value: '21', |
| | | label: '灌装一班', |
| | | children: [] |
| | | }, |
| | | { |
| | | value: '22', |
| | | label: '工艺四班', |
| | | children: [], |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '3', |
| | | label: '设备部', |
| | | children: [ |
| | | { |
| | | value: '31', |
| | | label: '仪表班', |
| | | children: [], |
| | | }, |
| | | { |
| | | value: '32', |
| | | label: '机修班', |
| | | children: [], |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | const data = ref(); |
| | | |
| | | const submitForm = async (title: string, formEl: FormInstance | undefined) => { |
| | | if (title == '新建应急预案管理') { |
| | |
| | | Search, |
| | | releaseDate, |
| | | treeSelect, |
| | | tree, |
| | | // trees, |
| | | propse, |
| | | department, |
| | | daiInpt, |
| | | Shows, |
| | | submitForm, |