| | |
| | | "@wangeditor/editor-for-vue": "^5.1.12", |
| | | "@wangeditor/plugin-upload-attachment": "^1.1.0", |
| | | "axios": "0.27.2", |
| | | "docx-preview": "^0.3.5", |
| | | "docxtemplater": "^3.63.2", |
| | | "echarts": "5.4.0", |
| | | "element-plus": "2.2.27", |
| | |
| | | |
| | | import preReClick from "@/utils/preReClick"; |
| | | |
| | | import vue3JsonExcel from 'vue3-json-excel'; |
| | | import vue3JsonExcel from 'vue3-json-excel'; |
| | | |
| | | |
| | | import { Boot } from '@wangeditor/editor' |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | </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) |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | |
| | | }) |
| | | |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="名称" prop="templateName" align="center"/> |
| | | <el-table-column label="文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="行业" prop="industryName" align="center" /> |
| | | <el-table-column label="模板" prop="fileName" align="center"> |
| | | <template #default="scope"> |
| | | <el-link style="" type="primary" @click="downloadFile(scope.row)">{{scope.row.fileName}}</el-link> |
| | | <el-link style="" type="primary" @click="openFile(scope.row.filePath)">{{scope.row.fileName}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="分类" prop="type" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import axios from "axios"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {getIndustry} from "@/api/system/industry"; |
| | | import {renderAsync} from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank') |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getIndustryTemp(data.queryParams) |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="主要负责部门:" prop="parentId"> |
| | | <el-form-item label="主要负责部门:" prop="childDeptIds"> |
| | | <el-select |
| | | clearable |
| | | v-model="state.form.parentId" |
| | | v-model="state.form.childDeptIds" |
| | | :disabled="state.title =='查看'" |
| | | filterable |
| | | multiple |
| | | placeholder="主要负责部门" |
| | | style="width: 100%" |
| | | > |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否加入职能分配表" prop="responsType"> |
| | | <el-radio-group v-model="state.form.responsType" :disabled="disabled"> |
| | | <el-radio :label="1">是</el-radio> |
| | | <el-radio :label="2">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer v-if="state.title !='查看'"> |
| | | <span class="dialog-footer"> |
| | |
| | | parentId: null, |
| | | caluseVO1List: [], |
| | | delCaluseIds: [], |
| | | companyId: null |
| | | companyId: null, |
| | | responsType: 1, |
| | | childDeptIds: [] |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | |
| | | deptName: [{ required: true, message: '请输入部门名称', trigger: 'blur' }], |
| | | // leaderUserId: [{ required: true, message: '请选择负责人', trigger: 'blur' }], |
| | | // parentId: [{ required: true, message: '请选择负责部门', trigger: 'blur' }], |
| | | caluseVO1List: [{ required: true, message: '请选择涉及条款', trigger: 'blur' }], |
| | | // caluseVO1List: [{ required: true, message: '请选择涉及条款', trigger: 'blur' }], |
| | | } |
| | | }) |
| | | |
| | |
| | | } |
| | | }); |
| | | state.oldClauseList = value.caluseVO1List |
| | | console.log(state.oldClauseList,'old') |
| | | state.form.childDeptIds = value.sysDeptManageVoList?.map(i=>i.subDeptId) |
| | | state.form.responsType = Number(value.responsType) |
| | | }else{ |
| | | state.form.companyId = companyId |
| | | } |
| | |
| | | } |
| | | |
| | | const getUserList = async ()=> { |
| | | const res = await listUser() |
| | | const res = await listUser({pageIndex: 1,pageSize: 999}) |
| | | if(res.code == 200){ |
| | | state.userList = res.data.list?res.data.list:[] |
| | | }else{ |
| | |
| | | parentId: null, |
| | | caluseVO1List: [], |
| | | delCaluseIds: [], |
| | | companyId: null |
| | | companyId: null, |
| | | responsType: 1, |
| | | childDeptIds: [] |
| | | } |
| | | |
| | | superRef.value.clearValidate(); |
| | |
| | | oldResponsibilityList: [], |
| | | formRules:{ |
| | | personNum: [{ required: true, message: '请输入部门人数', trigger: 'blur' }], |
| | | internalAuditors: [{ required: true, message: '请选择内审员', trigger: 'blur' }], |
| | | // internalAuditors: [{ required: true, message: '请选择内审员', trigger: 'blur' }], |
| | | responsibilities: [{ required: true, message: '请输入部门职责', trigger: 'blur' }] |
| | | }, |
| | | firstFive: [ |
| | |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="部门名称" prop="deptName" align="center" /> |
| | | <el-table-column label="负责人" prop="leaderName" align="center" /> |
| | | <el-table-column label="主要负责部门" prop="parentName" align="center"/> |
| | | <el-table-column label="主要负责部门" prop="parentName" align="center"> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{scope.row.sysDeptManageVoList?.map(i=>i.subDeptName).join('、')}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="部门涉及条款" prop="userTypeName" align="center" width="150"> |
| | | <template #default="scope"> |
| | | <div v-if="scope.row.caluseVO1List"> |
| | | <div v-for="(item,index) in scope.row.caluseVO1List" :key="index"> |
| | | {{ item.clauseNum + ' ' + item.content}} |
| | | </div> |
| | | </div> |
| | | <span> |
| | | {{scope.row.caluseVO1List?.map(i=>i.clauseNum).join('、')}} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="部门职责表" prop="userTypeName" align="center" width="150"> |
| | |
| | | <el-table v-loading="loading" :data="caluseList" class="caluseTable" :border="true" :span-method="arraySpanMethod"> |
| | | <el-table-column label="条款号" prop="clauseNum" align="center"/> |
| | | <el-table-column label="条款内容/要素" prop="content" align="left"/> |
| | | <el-table-column label="总经理" prop="manage" align="center"> |
| | | <template #default="scope"> |
| | | <el-checkbox v-model="scope.row.manage" disabled size="large" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="管理者代表" prop="represent" align="center"> |
| | | <template #default="scope"> |
| | | <el-checkbox v-model="scope.row.represent" disabled size="large" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="总经理" prop="manage" align="center">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-checkbox v-model="scope.row.manage" disabled size="large" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="管理者代表" prop="represent" align="center">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <el-checkbox v-model="scope.row.represent" disabled size="large" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column v-for="column in deptList" :key="column.deptId" :prop="column.deptId" :label="column.deptName" align="center"> |
| | | <template #default="scope"> |
| | | <el-checkbox v-model="scope.row[column.deptId]" :disabled="!isEdit" size="large" @change="changeStatus(scope.row)"/> |
| | |
| | | {clauseNum: '7.1.3', content: '基础设施',manage: false,represent: true}, |
| | | {clauseNum: '7.1.4', content: '过程运行环境',manage: false,represent: true}, |
| | | {clauseNum: '7.1.5', content: '监视和测量资源',manage: false,represent: true}, |
| | | {clauseNum: '7.1.6', content: '组织的知识',manage: false,represent: true} |
| | | {clauseNum: '7.1.6', content: '组织的知识',manage: false,represent: true}, |
| | | {clauseNum: '7.2', content: '能力'}, |
| | | {clauseNum: '7.3', content: '意识'}, |
| | | {clauseNum: '7.4', content: '沟通'}, |
| | | {clauseNum: '7.5', content: '成文信息'}, |
| | | {clauseNum: '7.6', content: '质量信息'}, |
| | | {clauseNum: '8', content: '运行'}, |
| | | {clauseNum: '8.1', content: '运行策划和控制'}, |
| | | {clauseNum: '8.2', content: '产品和服务的要求'}, |
| | | {clauseNum: '8.2.1', content: '顾客沟通'}, |
| | | {clauseNum: '8.2.2', content: '与产品和服务有关的要求的确定'}, |
| | | {clauseNum: '8.2.3', content: '与产品和服务有关的要求的评审'}, |
| | | {clauseNum: '8.2.4', content: '产品和服务要求的更改'}, |
| | | {clauseNum: '8.3', content: '产品和服务的设计和开发'}, |
| | | {clauseNum: '8.3.1', content: '总则'}, |
| | | {clauseNum: '8.3.2', content: '设计和开发策划'}, |
| | | {clauseNum: '8.3.3', content: '设计和开发输入'}, |
| | | {clauseNum: '8.3.4', content: '设计和开发控制'}, |
| | | {clauseNum: '8.3.5', content: '设计和开发输出'}, |
| | | {clauseNum: '8.3.6', content: '设计和开发更改'}, |
| | | {clauseNum: '8.3.7', content: '新产品试制'}, |
| | | {clauseNum: '8.3.8', content: '设计和开发的试验控制'}, |
| | | {clauseNum: '8.4', content: '外部提供过程、产品和服务的控制'}, |
| | | {clauseNum: '8.4.1', content: '总则'}, |
| | | {clauseNum: '8.4.2', content: '控制类型和程度'}, |
| | | {clauseNum: '8.4.3', content: '提供给外部供方的信息'}, |
| | | {clauseNum: '8.5', content: '生产和服务提供'}, |
| | | {clauseNum: '8.5.1', content: '生产和服务提供的控制'}, |
| | | {clauseNum: '8.5.2', content: '标识和可追溯性'}, |
| | | {clauseNum: '8.5.3', content: '顾客或外部供方的财产'}, |
| | | {clauseNum: '8.5.4', content: '防护'}, |
| | | {clauseNum: '8.5.5', content: '交付后的活动'}, |
| | | {clauseNum: '8.5.6', content: '更改控制'}, |
| | | {clauseNum: '8.5.7', content: '关键过程'}, |
| | | {clauseNum: '8.6', content: '产品和服务的放行'}, |
| | | {clauseNum: '8.7', content: '不合格输出的控制'}, |
| | | {clauseNum: '9', content: '绩效评价'}, |
| | | {clauseNum: '9.1', content: '监视、测量、分析和评价'}, |
| | | {clauseNum: '9.1.1', content: '总则'}, |
| | | {clauseNum: '9.1.2', content: '顾客满意'}, |
| | | {clauseNum: '9.1.3', content: '分析和评价'}, |
| | | {clauseNum: '9.2', content: '内部审核'}, |
| | | {clauseNum: '9.3', content: '管理评审'}, |
| | | {clauseNum: '10', content: '持续改进'} |
| | | ], |
| | | form: { |
| | | companyId: null, |
| | |
| | | rowIndex, |
| | | columnIndex, |
| | | }) => { |
| | | if (rowIndex === 0 || rowIndex === 5 ||rowIndex === 9 ||rowIndex === 13) { |
| | | const mergeValues = ['4','5','6','7','7.1','8','8.2','8.3','8.4','8.5','9','9.1','10'] |
| | | if (mergeValues.includes(row.clauseNum)) { |
| | | if (columnIndex === 0) { |
| | | return [1, 1] |
| | | } else if(columnIndex === 1){ |
| | |
| | | <style lang="scss"> |
| | | .caluseTable{ |
| | | .el-table__cell{ |
| | | padding: 4px 0 !important; |
| | | padding: 0 !important; |
| | | .is-disabled{ |
| | | .el-checkbox__label{ |
| | | color: #606266 !important |
| | |
| | | } |
| | | } |
| | | .cell{ |
| | | padding: 0 6px !important; |
| | | padding: 0 4px !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="用户类型:" v-if="state.title !== '修改密码'" prop="userType"> |
| | | <el-radio-group v-model="state.form.userType" :disabled="disabled" @change="changeType" v-if="state.title == '新增'"> |
| | | <el-radio :label="0" v-if="state.currentUserType == 0">管理员</el-radio> |
| | | <el-radio :label="1" v-if="state.currentUserType == 0 ">企业级</el-radio> |
| | | <el-radio :label="2" v-if="state.currentUserType == 1 ">部门级</el-radio> |
| | | <el-radio :label="0" v-if="state.currentUserType == 0">系统管理员</el-radio> |
| | | <el-radio :label="1" v-if="state.currentUserType == 0 ">企业管理员</el-radio> |
| | | <el-radio :label="2" v-if="state.currentUserType == 1 ">企业用户</el-radio> |
| | | <el-radio :label="3" v-if="!state.isAdmin">车间(岗位)级</el-radio> |
| | | <el-radio :label="4" v-if="state.currentUserType == 0">其他</el-radio> |
| | | </el-radio-group> |
| | |
| | | companyId: null |
| | | }) |
| | | if(res.code == 200){ |
| | | data.expertData = res.data.list.map((item,index) => { |
| | | data.expertData = res.data.list?.map((item,index) => { |
| | | return { |
| | | ...item, |
| | | index: index + 1, |
| | |
| | | <el-table-column label="模板名称" prop="templateName" align="center"/> |
| | | <el-table-column label="模板文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName + '模板'}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import { renderAsync } from "docx-preview"; |
| | | |
| | | |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | | if(res.code == 200){ |
| | | console.log(res.data,'data') |
| | | data.dataList = res.data.list || [] |
| | | data.total = res.data.total |
| | | }else{ |
| | |
| | | window.open(import.meta.env.VITE_APP_BASE_API + '/' + path) |
| | | } |
| | | |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | dialogRef.value.openDialog(type, value, data.queryParams.companyId, data.isAdmin, data.companyList); |
| | | } |
| | |
| | | <el-table-column label="模板名称" prop="templateName" align="center"/> |
| | | <el-table-column label="模板文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName + '模板'}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <div id="docx-preview-container" style="width: 100%; height: auto; border: 1px solid #ccc;"></div> |
| | | <edit-dialog ref="dialogRef" @getList=getList></edit-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import { renderAsync } from "docx-preview"; |
| | | |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | |
| | | }) |
| | | |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank'); |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |
| | |
| | | <el-table-column label="模板名称" prop="templateName" align="center"/> |
| | | <el-table-column label="模板文件" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{scope.row.templateName + '模板'}}</el-button> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="downloadFile(scope.row.filePath)">下载</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | import editDialog from './components/editDialog.vue' |
| | | import useUserStore from "@/store/modules/user"; |
| | | import {getStandardTemp,delStandardTemp} from "@/api/standardSys/standardSys"; |
| | | import { renderAsync } from "docx-preview"; |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | const openFile = async(path)=>{ |
| | | try { |
| | | // 1. 获取文件 |
| | | const response = await fetch(import.meta.env.VITE_APP_BASE_API + '/' + path); |
| | | const arrayBuffer = await response.arrayBuffer(); |
| | | // 2. 创建新窗口 |
| | | const win = window.open('', '_blank') |
| | | win.document.write(` |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>预览</title> |
| | | <style> |
| | | body { margin: 20px; font-family: Arial; } |
| | | .docx-container { width: 100%; height: 100%; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div id="container" class="docx-container"></div> |
| | | </body> |
| | | </html> |
| | | `); |
| | | // 3. 渲染 DOCX |
| | | await renderAsync(arrayBuffer, win.document.getElementById('container')); |
| | | |
| | | } catch (error) { |
| | | console.error('预览失败:', error); |
| | | alert(`预览失败: ${error.message}`); |
| | | } |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getStandardTemp(data.queryParams) |