| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- <org-tree :data="companyInfo.deptList" />--> |
| | | <button @click="exportOrgChart">导出组织架构图</button> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <edit-dialog ref="dialogRef" @getList=getList></edit-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {delCompany, getCompany} from "@/api/onlineEducation/company"; |
| | | import {delUser, getUser} from "@/api/onlineEducation/user"; |
| | | import Cookies from "js-cookie"; |
| | | import editDialog from './components/editDialog.vue' |
| | | import {generateWordDocument} from './components/exportDoc.js' |
| | | |
| | | |
| | | import { |
| | | addIndustryTemp, |
| | | delIndustryTemp, |
| | | getIndustryTemp, |
| | | } from "@/api/staffManage/staff"; |
| | | // import OrgTree from 'vue-org-tree' |
| | | import html2canvas from 'html2canvas' |
| | | import { saveAs } from 'file-saver' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { |
| | | addStandardQuality, |
| | |
| | | getStandardDetail, |
| | | getStandardQuality |
| | | } from "@/api/standardSys/standardSys"; |
| | | import {getBasic} from "@/api/companyInfo/basicInfo"; |
| | | import {getCom} from "@/api/companyInfo/overview"; |
| | | |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | ] |
| | | }); |
| | | |
| | | const { queryParams, total, dataList,companyList, isAdmin } = toRefs(data); |
| | | const { queryParams, total, dataList,companyList, isAdmin, companyInfo } = toRefs(data); |
| | | const userInfo = ref() |
| | | onMounted(async ()=>{ |
| | | if(userStore.roles.includes('admin')){ |
| | |
| | | |
| | | }) |
| | | |
| | | const exportOrgChart=()=> { |
| | | const element = document.querySelector('.org-tree'); // 获取组织架构图的容器元素 |
| | | html2canvas(element).then(canvas => { |
| | | // 创建一个图片元素 |
| | | let img = new Image(); |
| | | img.src = canvas.toDataURL('image/png'); |
| | | |
| | | // 创建并触发下载 |
| | | img.onload = () => { |
| | | let w = img.width; |
| | | let h = img.height; |
| | | let canvas2 = document.createElement('canvas'); |
| | | let ctx = canvas2.getContext('2d'); |
| | | canvas2.width = w; |
| | | canvas2.height = h; |
| | | ctx.drawImage(img, 0, 0, w, h); |
| | | saveAs(canvas2.toDataURL('image/png'), '组织架构图.png'); |
| | | }; |
| | | }); |
| | | } |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardQuality(data.queryParams) |