祖安之光
2 天以前 b7ebccdbc4f29cc7663582213886579091c84dd5
修改新增
已修改19个文件
511 ■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/qualityManual/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/industryTemplate/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/orgStructure/departManage/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/orgStructure/dutyDistributeChart/index.vue 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/staffManage/staffRegister/components/staffDialog.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/staffManage/staffRegister/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -23,6 +23,7 @@
    "@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",
src/main.js
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/appFile/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/qualityManual/index.vue
@@ -42,7 +42,8 @@
        </template>
      </el-table-column>
    </el-table>
<!--    <org-tree :data="companyInfo.deptList" />-->
    <button @click="exportOrgChart">导出组织架构图</button>
    <pagination
        v-show="total > 0"
        :total="total"
@@ -50,8 +51,6 @@
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
    />
    <edit-dialog ref="dialogRef" @getList=getList></edit-dialog>
  </div>
</template>
@@ -59,17 +58,10 @@
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,
@@ -77,8 +69,6 @@
  getStandardDetail,
  getStandardQuality
} from "@/api/standardSys/standardSys";
import {getBasic} from "@/api/companyInfo/basicInfo";
import {getCom} from "@/api/companyInfo/overview";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
@@ -126,7 +116,7 @@
  ]
});
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')){
@@ -143,6 +133,27 @@
})
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/recordSheets/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -97,6 +99,37 @@
})
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/manageType/workInstruct/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/otherIntellFile/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/productType/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)
src/views/build/conpanyFunctionConsult/digitalFileDep/techType/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)
src/views/build/conpanyFunctionConsult/industryTemplate/index.vue
@@ -48,13 +48,14 @@
      <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>
@@ -122,6 +123,7 @@
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);
@@ -181,7 +183,36 @@
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)
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/departDialog.vue
@@ -32,12 +32,13 @@
            />
          </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%"
          >
@@ -68,6 +69,12 @@
            />
          </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">
@@ -96,7 +103,9 @@
    parentId: null,
    caluseVO1List: [],
    delCaluseIds: [],
    companyId: null
    companyId: null,
    responsType: 1,
    childDeptIds: []
  },
  isAdmin: false,
  companyList: [],
@@ -109,7 +118,7 @@
    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' }],
  }
})
@@ -135,7 +144,8 @@
      }
    });
    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
  }
@@ -143,7 +153,7 @@
}
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{
@@ -215,7 +225,9 @@
    parentId: null,
    caluseVO1List: [],
    delCaluseIds: [],
    companyId: null
    companyId: null,
    responsType: 1,
    childDeptIds: []
  }
  superRef.value.clearValidate();
src/views/build/conpanyFunctionConsult/orgStructure/departManage/components/dutyDialog.vue
@@ -203,7 +203,7 @@
  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: [
src/views/build/conpanyFunctionConsult/orgStructure/departManage/index.vue
@@ -27,14 +27,18 @@
      <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">
src/views/build/conpanyFunctionConsult/orgStructure/dutyDistributeChart/index.vue
@@ -38,16 +38,16 @@
    <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)"/>
@@ -97,7 +97,50 @@
    {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,
@@ -170,7 +213,8 @@
     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){
@@ -287,7 +331,7 @@
<style lang="scss">
.caluseTable{
  .el-table__cell{
    padding: 4px 0 !important;
    padding: 0 !important;
    .is-disabled{
      .el-checkbox__label{
        color: #606266 !important
@@ -313,7 +357,7 @@
    }
  }
  .cell{
    padding: 0 6px !important;
    padding: 0 4px !important;
  }
}
</style>
src/views/build/conpanyFunctionConsult/staffManage/staffRegister/components/staffDialog.vue
@@ -43,9 +43,9 @@
        </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>
src/views/build/conpanyFunctionConsult/staffManage/staffRegister/index.vue
@@ -214,7 +214,7 @@
    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,
src/views/build/conpanyFunctionConsult/standardSysTemp/appStandardModule/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,9 @@
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);
@@ -101,7 +105,6 @@
  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{
@@ -128,6 +131,37 @@
  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);
}
src/views/build/conpanyFunctionConsult/standardSysTemp/sysStandardModule/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -50,7 +51,7 @@
        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>
@@ -63,6 +64,8 @@
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);
@@ -97,6 +100,38 @@
})
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)
src/views/build/conpanyFunctionConsult/standardSysTemp/techStandardModule/index.vue
@@ -32,11 +32,12 @@
      <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>
@@ -63,6 +64,7 @@
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);
@@ -96,7 +98,36 @@
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)