397f5b5d8f6f15270b158a91ba3b173d00051df5..1d66f43353524889999bbd9ac0b331c557ff98f7
5 天以前 zhouwx
修改
1d66f4 对比 | 目录
5 天以前 zhouwx
修改
79f2fd 对比 | 目录
已修改17个文件
已添加25个文件
2193 ■■■■■ 文件已修改
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/components/basicInfoDialog.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/overview/components/overviewDialog.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/overview/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/qualifications/components/qualificationsDialog.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/qualifications/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/industryTemplate/components/editDialog.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/industryTemplate/index.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/designManage/catalogDesign/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/designManage/design/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/environmentManage/catalogEnvironment/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/environmentManage/environment/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/fileManage/catalogFile/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/fileManage/file/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/improveManage/catalogImprove/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/improveManage/improve/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/leaderManage/catalogLeader/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/leaderManage/leader/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/performanceManage/catalogPerformance/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/performanceManage/performance/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/catalogRange/components/editDialog.vue 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/catalogRange/index.vue 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/components/dataDialog.vue 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/components/recordDialog.vue 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/index.vue 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/runManage/catalogRun/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/runManage/run/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/supportManage/catalogSupport/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/supportManage/support/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/termManage/catalogTerm/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityManage/termManage/term/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/components/objectiveDialog.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/reportsituation/components/stationCompanyDialog.vue 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/reportsituation/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/table/components/tableCompanyDialog.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/table/components/tableDeptDialog.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/industryManage/components/editDialog.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/industryManage/index.vue 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/components/basicInfoDialog.vue
@@ -65,7 +65,7 @@
  </div>
</template>
<script setup>
import {reactive, ref, toRefs} from 'vue'
import {onMounted, reactive, ref, toRefs} from 'vue'
import Editor from "@/components/Editor/index.vue";
import {ElMessage} from "element-plus";
import {addNotice} from "@/api/backManage/notice";
@@ -109,10 +109,17 @@
  companyList: []
})
onMounted(() => {
})
const openDialog = async (type, value) => {
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  state.isAdmin = userInfo.userType === 0;
  if(state.isAdmin){
    await   getCompanyList()
  }
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
@@ -197,7 +204,7 @@
  })
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -208,6 +215,19 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
src/views/build/conpanyFunctionConsult/companyInfo/basicInfo/index.vue
@@ -113,6 +113,11 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -142,10 +147,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -177,6 +196,7 @@
  choosedData.value = []
  data.companyList = [];
  getList();
  getCompanyList()
}
const exportData = () => {
  if(choosedData.value && choosedData.value.length === 0){
src/views/build/conpanyFunctionConsult/companyInfo/overview/components/overviewDialog.vue
@@ -89,11 +89,14 @@
})
onMounted(() => {
});
const openDialog = async (type, value) => {
    const userInfo = JSON.parse(Cookies.get('userInfo'))
    state.isAdmin = userInfo.userType === 0;
  if(state.isAdmin){
    await   getCompanyList()
  }
    isReview.value = false;
    showEditor.value = false
    title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
@@ -156,7 +159,7 @@
    }
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -164,6 +167,17 @@
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
@@ -250,7 +264,6 @@
      companyId:null,
      companyName: ''
    }
  state.companyList = []
}
defineExpose({
src/views/build/conpanyFunctionConsult/companyInfo/overview/index.vue
@@ -102,6 +102,9 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -132,10 +135,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -167,6 +184,7 @@
  data.companyName = ''
  data.companyList = [];
  getList();
  getCompanyList()
}
const handleDelete = (val) => {
  ElMessageBox.confirm(
src/views/build/conpanyFunctionConsult/companyInfo/policy/components/policyDialog.vue
@@ -95,6 +95,9 @@
const openDialog = async (type, value) => {
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  state.isAdmin = userInfo.userType === 0;
  if(state.isAdmin){
    await   getCompanyList()
  }
  isReview.value = false;
  showEditor.value = false
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
@@ -158,6 +161,7 @@
}
const onSubmit = async () => {
  state.noticeForm.policy = tinyMCE.activeEditor.getContent();
  if(!state.isAdmin){
    const userInfo = JSON.parse(Cookies.get('userInfo'))
@@ -228,7 +232,6 @@
    companyId:null,
    companyName: ''
  }
  state.companyList = []
}
const selectValue = (val) => {
  state.companyList.forEach(item => {
@@ -238,7 +241,7 @@
  })
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -249,6 +252,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
src/views/build/conpanyFunctionConsult/companyInfo/policy/index.vue
@@ -103,6 +103,9 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -133,10 +136,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -168,6 +185,7 @@
  data.companyName = ''
  data.companyList = [];
  getList();
  getCompanyList()
}
const handleDelete = (val) => {
  ElMessageBox.confirm(
src/views/build/conpanyFunctionConsult/companyInfo/qualifications/components/qualificationsDialog.vue
@@ -125,6 +125,9 @@
const openDialog = async (type, value) => {
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  state.isAdmin = userInfo.userType === 0;
  if(state.isAdmin){
    await   getCompanyList()
  }
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
@@ -253,7 +256,7 @@
  })
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -264,6 +267,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
src/views/build/conpanyFunctionConsult/companyInfo/qualifications/index.vue
@@ -121,6 +121,9 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -155,10 +158,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -190,6 +207,7 @@
  choosedData.value = []
  data.companyList = [];
  getList();
}
const exportData = () => {
  if(data.isAdmin && !data.queryParams.companyId){
src/views/build/conpanyFunctionConsult/industryTemplate/components/editDialog.vue
@@ -3,14 +3,14 @@
    <el-dialog
        v-model="dialogVisible"
        :title="state.title"
        width="700px"
        width="600px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item v-if="state.isAdmin" label="企业:" prop="companyId">
          <el-select v-model="state.form.companyId" placeholder="请选择" clearable>
          <el-select v-model="state.form.companyId" placeholder="请选择" clearable style="width: 100%">
            <el-option
                v-for="item in state.companyList"
                :key="item.id"
@@ -23,9 +23,13 @@
          <el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="模板名称"></el-input>
        </el-form-item>
        <el-form-item label="行业:" prop="industryType">
          <el-select v-model="state.form.industryType" placeholder="请选择" clearable>
            <el-option key="1" label="化工" :value="1"></el-option>
            <el-option key="2" label="安防" :value="2"></el-option>
          <el-select v-model="state.form.industryId" placeholder="请选择" clearable style="width: 100%">
            <el-option
                v-for="item in state.industryList"
                :key="item.id"
                :label="item.name"
                :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
@@ -71,7 +75,7 @@
  form: {
    id: null,
    templateName: '',
    industryType: '',
    industryId: '',
    filePath: '',
    format: '',
    companyId: null
@@ -79,11 +83,12 @@
  formRules:{
    companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
    templateName: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
    industryType: [{ required: true, message: '请选择行业类型', trigger: 'blur' }],
    industryId: [{ required: true, message: '请选择行业类型', trigger: 'blur' }],
    filePath: [{ required: true, validator: checkFiles, trigger: 'blur' }]
  },
  isAdmin: false,
  companyList: [],
  industryList: [],
  uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
  header: {
    Authorization: getToken()
src/views/build/conpanyFunctionConsult/industryTemplate/index.vue
@@ -21,9 +21,13 @@
          </el-select>
        </el-form-item>
        <el-form-item v-if="isAdmin" label="行业:" >
          <el-select v-model="data.queryParams.companyId" placeholder="请选择" clearable>
            <el-option key="1" label="化工" :value="1"></el-option>
            <el-option key="2" label="安防" :value="2"></el-option>
          <el-select v-model="data.queryParams.industryId" placeholder="请选择" clearable>
            <el-option
                v-for="item in industryList"
                :key="item.id"
                :label="item.name"
                :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item >
@@ -43,7 +47,7 @@
      </el-table-column>
      <el-table-column label="模板文件" prop="fileName" align="center">
        <template #default="scope">
          <el-button link type="primary" @click="downloadFile(scope.row.filePath)">{{getName(scope.row.industryType) + '模板'}}</el-button>
          <el-button link type="primary" @click="downloadFile(scope.row)">{{getName(scope.row.industryType) + '模板'}}</el-button>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
@@ -78,6 +82,8 @@
  getIndustryTemp,
} from "@/api/staffManage/staff";
import useUserStore from "@/store/modules/user";
import axios from "axios";
import {getToken} from "@/utils/auth";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const loading = ref(false);
@@ -86,11 +92,13 @@
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    companyId: null
    companyId: null,
    industryId: null
  },
  total: 0,
  dataList: [],
  companyList: [],
  industryList: [],
  isAdmin: false,
  typeList: [
    {
@@ -104,11 +112,12 @@
  ]
});
const { queryParams, total, dataList,companyList, isAdmin } = toRefs(data);
const { queryParams, total, dataList,companyList,industryList, isAdmin } = toRefs(data);
const userInfo = ref()
onMounted(async ()=>{
  if(userStore.roles.includes('admin')){
    data.isAdmin = true
    data.queryParams.companyId = null
    await getCompanyList()
  }else{
    data.isAdmin = false
@@ -147,8 +156,21 @@
  }
}
const downloadFile = (path)=>{
  window.open(import.meta.env.VITE_APP_BASE_API + '/' + path)
const downloadFile = (e)=>{
  axios.get(import.meta.env.VITE_APP_BASE_API + '/' +e.filePath,{headers:{'Content-Type': 'application/json','Authorization': `${getToken()}`},responseType: 'blob'}).then(res=>{
    if (res) {
      const link = document.createElement('a')
      let blob = new Blob([res.data],{type: res.data.type})
      link.style.display = "none";
      link.href = URL.createObjectURL(blob); // 创建URL
      window.open(link.href)
    } else {
      ElMessage({
        type: 'warning',
        message: '文件读取失败'
      });
    }
  })
}
const getName =(type)=>{
@@ -164,7 +186,8 @@
  data.queryParams = {
    pageNum: 1,
    pageSize: 10,
    companyId: null
    companyId: null,
    industryId: null
  }
  await getCompanyList()
  await getList()
src/views/build/conpanyFunctionConsult/qualityManage/designManage/catalogDesign/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
策划目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/designManage/design/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
策划
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/environmentManage/catalogEnvironment/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
  组织环境目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/environmentManage/environment/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
组织环境
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/fileManage/catalogFile/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
规范性目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/fileManage/file/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
规范性
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/improveManage/catalogImprove/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
  改进目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/improveManage/improve/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
改进
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/leaderManage/catalogLeader/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
领导目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/leaderManage/leader/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
领导
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/performanceManage/catalogPerformance/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
  绩效目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/performanceManage/performance/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
绩效
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/catalogRange/components/editDialog.vue
对比新文件
@@ -0,0 +1,259 @@
<template>
  <div class="notice">
    <el-dialog
        v-model="dialogVisible"
        :title="state.title"
        width="600px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item v-if="state.isAdmin" label="企业:" prop="companyId">
          <el-select
              v-model="state.form.companyName"
              filterable
              remote
              @change="selectValue"
              reserve-keyword
              placeholder="请输入企业名称"
              remote-show-suffix
              :remote-method="getCompanyList"
              style="width: 100%"
          >
            <el-option
                v-for="item in state.companyList"
                :key="item.id"
                :label="item.name"
                :value="item.name"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="序号:" prop="num">
          <el-input v-model.trim="state.form.num" :disabled="state.title =='查看'" placeholder="序号"></el-input>
        </el-form-item>
        <el-form-item label="上级分支:" prop="parentId">
          <el-tree-select
              v-model="state.form.parentId"
              :data="state.menuOptions"
              :props="{ value: 'id', label: 'label', children: 'children' }"
              value-key="id"
              placeholder="上级分支"
              check-strictly
              style="width: 100%"
          />
        </el-form-item>
        <el-form-item label="目录名称:" prop="name">
          <el-input v-model.trim="state.form.name" :disabled="state.title =='查看'" placeholder="目录名称"></el-input>
        </el-form-item>
      </el-form>
      <template #footer v-if="state.title !='查看'">
        <span class="dialog-footer">
            <el-button @click="handleClose" size="default">取 消</el-button>
            <el-button type="primary"  @click="onSubmit" size="default" v-preReClick>确认</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs, defineEmits, nextTick, onMounted} from 'vue'
import {ElMessage} from "element-plus";
import {addUser, editUser, getUserById, resetPwd} from "@/api/onlineEducation/user"
import {Base64} from "js-base64"
import {getCompany} from "@/api/onlineEducation/company";
import {addIndustryTemp, updateIndustryTemp, updateInfoPlatforms} from "@/api/staffManage/staff";
import {getToken} from "@/utils/auth";
import {delPic} from "@/api/onlineEducation/banner";
import {listMenu} from "@/api/system/menu";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
const superRef = ref()
const state = reactive({
  title: '',
  form: {
    id: null,
    name: '',
    num:'',
    companyId: null,
    parentId: null
  },
  formRules:{
    companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }],
    name: [{ required: true, message: '请输入目录名称', trigger: 'blur' }],
    num: [{ required: true, message: '请输入序号', trigger: 'blur' }],
    parentId:[{ required: true, message: '请选择上级分支', trigger: 'blur' }],
  },
  isAdmin: false,
  companyList: [],
  menuOptions: []
})
onMounted(() => {
});
const openDialog = async (type, value,companyId, isAdmin,flag) => {
  state.isAdmin = isAdmin
  if(isAdmin){
    await getCompanyList()
    await getTreeselect()
  }
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
  if(state.title == '新增' && flag == 2){
    state.form.parentId = value.id
  }else if(state.title == '新增' && flag == 1){
    state.form.parentId = 0
  }
  if(state.title == '编辑'||state.title == '查看'){
    Object.keys(state.form).forEach(key => {
      if (key in value) {
        state.form[key] = value[key]
      }
    })
  }
  dialogVisible.value = true
}
const onSubmit = async () => {
  const valid = await superRef.value.validate();
  console.log('state.form',state.form)
  if(valid){
    if(state.title == '新增'){
      const {id,...data} = state.form
      const res = await addIndustryTemp(data)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }else{
      const res = await updateIndustryTemp(state.form)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }
  }
}
const getTreeselect =async ()=> {
  // state.menuOptions = [];
  // const res = await addIndustryTemp()
  // if(res.code == 200){
  //   const menu = { id: 0, name: "1范围", children: [] };
  //   menu.children = response.data
  //   state.menuOptions.push(menu);
  // }else{
  //   ElMessage.warning(res.message)
  // }
  state.menuOptions = [];
    const menu = { id: 0, label: "1范围", children: [] };
    menu.children = [
      {
        id: 1,
        label: '1.1规范范围管理',
        children: [
          {
            id: 2,
            label: 'Level three 1-1-1',
            children: [
              {
                id: 3,
                label: 'Level three 1-1-1',
                children: [
                  {
                    id: 4,
                    label: 'Level three 1-1-1',
                  },
                ],
              },
            ],
          },
        ],
      },
      {
        id: 5,
        label: '1.2收集需求',
      },
      {
        id: 6,
        label: '1.3定义范围',
      },
    ]
    state.menuOptions.push(menu);
}
const handleClose = () => {
  state.form = {
    id: null,
    name: '',
    num:'',
    companyId: null,
    parentId: null
  }
  superRef.value.clearValidate();
  superRef.value.resetFields()
  dialogVisible.value = false;
}
const selectValue = (val) => {
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
}
const getCompanyList = async (val)=>{
  if(val){
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
  openDialog
});
</script>
<style scoped lang="scss">
.notice{
  :deep(.el-form .el-form-item__label) {
    font-size: 15px;
  }
  .file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/catalogRange/index.vue
对比新文件
@@ -0,0 +1,242 @@
<template>
  <div class="app-container">
    <div style="display: flex;justify-content: space-between">
      <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" >
        <el-form-item>
          <el-button
              type="primary"
              plain
              icon="Plus"
              @click="openDialog('add','',1)"
          >新增</el-button>
        </el-form-item>
        <el-form-item v-if="isAdmin" label="企业:" >
          <el-select
              v-model="data.queryParams.companyName"
              filterable
              remote
              @change="selectValue"
              reserve-keyword
              placeholder="请输入企业名称"
              remote-show-suffix
              :remote-method="getCompanyList"
              :loading="loadingCompany"
              style="width: 240px"
          >
            <el-option
                v-for="item in data.companyList"
                :key="item.id"
                :label="item.name"
                :value="item.name"
            />
          </el-select>
        </el-form-item>
        <el-form-item >
          <el-button v-if="isAdmin" type="primary" @click="getList">查询</el-button>
          <el-button v-if="isAdmin" type="primary" plain @click="reset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格数据 -->
    <el-table v-loading="loading"
              :data="dataList"
              :border="true"
              row-key="id"
              :default-expand-all="false"
              :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
    >
      <el-table-column label="目录名称" prop="label" align="center"></el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template #default="scope">
          <el-button link type="primary" @click="openDialog('add',scope.row,2)">新增</el-button>
          <el-button link type="primary" @click="openDialog('edit',scope.row,null)">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
        v-show="total > 0"
        :total="total"
        v-model:page="queryParams.pageNum"
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
    />
    <edit-dialog ref="dialogRef" @getList=getList></edit-dialog>
  </div>
</template>
<script setup>
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 {
  delIndustryTemp,
  getIndustryTemp,
} from "@/api/staffManage/staff";
import useUserStore from "@/store/modules/user";
import axios from "axios";
import {getToken} from "@/utils/auth";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const loading = ref(false);
const loadingCompany = ref(false)
const dialogRef = ref();
const data = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    companyId: null,
  },
  total: 0,
  dataList: [],
  companyList: [],
  industryList: [],
  isAdmin: false,
});
const { queryParams, total, dataList,companyList,industryList, isAdmin } = toRefs(data);
const userInfo = ref()
onMounted(async ()=>{
  if(userStore.roles.includes('admin')){
    data.isAdmin = true
    data.queryParams.companyId = null
    await getCompanyList()
  }else{
    data.isAdmin = false
    data.queryParams.companyId = userStore.companyId
  }
  await getList()
})
onUnmounted(()=>{
})
const getList = async () => {
  loading.value = true
  // const res = await getIndustryTemp(data.queryParams)
  // if(res.code == 200){
  //   data.dataList = res.data.list || []
  //   data.total = res.data.total
  // }else{
  //   ElMessage.warning(res.message)
  // }
  data.dataList = [
      {
        parentId: 0,
        id:1,
        label: '1.1规范范围管理',
        children: [
          {
            parentId: 1,
            id:2,
            label: 'Level three 1-1-1',
            children: [
              {
                parentId: 2,
                id:3,
                label: 'Level three 1-1-1',
                children: [
                  {
                    parentId: 3,
                    id:4,
                    label: 'Level three 1-1-1',
                  },
                ],
              },
            ],
          },
        ],
      },
      {
        parentId: 0,
        id:5,
        label: '1.2收集需求',
      },
      {
        parentId: 0,
        id:6,
        label: '1.3定义范围',
      },
  ]
  loading.value = false
}
const openDialog = (type, value,flag) => {
  dialogRef.value.openDialog(type, value, data.queryParams.companyId, data.isAdmin,flag);
}
/** 重置新增的表单以及其他数据  */
const reset= async()=> {
  data.queryParams = {
    pageNum: 1,
    pageSize: 10,
    companyId: null,
  }
  await getCompanyList()
  await getList()
}
const handleDelete = (val) => {
  ElMessageBox.confirm(
      '确定删除此条数据?',
      '提示',
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
      .then( async() => {
        const res = await delIndustryTemp({companyRosterId: val.id})
        if(res.code == 200){
          ElMessage.success('数据删除成功')
          await getList()
        }else{
          ElMessage.warning(res.message)
        }
      })
}
const selectValue = (val) => {
  data.companyList.forEach(item => {
    if(item.name === val){
      data.queryParams.companyId = item.id
    }
  })
}
const getCompanyList = async (val)=>{
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
</script>
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/components/dataDialog.vue
对比新文件
@@ -0,0 +1,205 @@
<template>
  <div class="notice">
    <el-dialog
        v-model="dialogVisible"
        :title="state.title"
        width="600px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item label="材料名称:" prop="templateName">
          <el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="材料名称"></el-input>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
          <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx格式文档,尺寸小于5M,最多可上传1张</div>
            </template>
          </el-upload>
        </el-form-item>
      </el-form>
      <template #footer v-if="state.title !='查看'">
        <span class="dialog-footer">
            <el-button @click="handleClose" size="default">取 消</el-button>
            <el-button type="primary"  @click="onSubmit" size="default" v-preReClick>确认</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs, defineEmits, nextTick, onMounted} from 'vue'
import {ElMessage} from "element-plus";
import {addUser, editUser, getUserById, resetPwd} from "@/api/onlineEducation/user"
import {Base64} from "js-base64"
import {getCompany} from "@/api/onlineEducation/company";
import {addIndustryTemp, updateIndustryTemp, updateInfoPlatforms} from "@/api/staffManage/staff";
import {getToken} from "@/utils/auth";
import {delPic} from "@/api/onlineEducation/banner";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
const superRef = ref()
const state = reactive({
  title: '',
  form: {
    id: null,
    templateName: '',
    filePath: '',
    format: '',
    companyId: null
  },
  formRules:{
    templateName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
  },
  isAdmin: false,
  companyList: [],
  industryList: [],
  uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
  header: {
    Authorization: getToken()
  },
  fileLimit: 1,
  fileList: []
})
onMounted(() => {
});
const openDialog = async (type, value,companyId, isAdmin, companyList) => {
  state.isAdmin = isAdmin
  if(isAdmin){
    state.companyList = companyList
  }
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
  if(state.title == '编辑'||state.title == '查看'){
    Object.keys(state.form).forEach(key => {
      if (key in value) {
        state.form[key] = value[key]
      }
    })
    if(value.filePath) {
      const obj = {
        url: value.filePath,
        name: '模板文件'
      }
      state.fileList = [obj]
    }
  }
  dialogVisible.value = true
}
const onSubmit = async () => {
  const valid = await superRef.value.validate();
  if(valid){
    if(state.title == '新增'){
      const {id,...data} = state.form
      const res = await addIndustryTemp(data)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }else{
      const res = await updateIndustryTemp(state.form)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }
  }
}
const handleAvatarSuccess = (res, uploadFile) => {
  if(res.code == 200){
    state.form.filePath = res.data.path
    state.form.format = '.' + res.data.filename.split('.')[1]
  }else{
    state.fileList = []
    ElMessage({
      type: 'warning',
      message: '文件上传失败'
    })
  }
}
const showTip =()=>{
  ElMessage({
    type: 'warning',
    message: '超出文件上传数量'
  });
}
const picSize = async (rawFile) => {
  if(rawFile.size / 1024 / 1024 > 5){
    ElMessage({
      type: 'warning',
      message: '文件大小不能超过5M'
    });
    return false
  }
};
const handleRemove = async (file, uploadFiles) => {
  let path = state.form.filePath;
  await delPic({path: path}).then(res => {
    if(res.code == 200){
      // ElMessage({
      //   type: 'success',
      //   message: '文件已删除'
      // })
      state.form.filePath = ''
      state.form.format = ''
    }else{
      ElMessage({
        type: 'warning',
        message: res.message
      })
    }
  }).catch(() => {
    state.form.imgUrl = ''
  });
}
const handleClose = () => {
  state.form = {
    id: null,
    templateName: '',
    industryType: '',
    filePath: '',
    format: '',
    companyId: null
  }
  superRef.value.clearValidate();
  superRef.value.resetFields()
  dialogVisible.value = false;
}
defineExpose({
  openDialog
});
</script>
<style scoped lang="scss">
.notice{
  :deep(.el-form .el-form-item__label) {
    font-size: 15px;
  }
  .file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/components/recordDialog.vue
对比新文件
@@ -0,0 +1,205 @@
<template>
  <div class="notice">
    <el-dialog
        v-model="dialogVisible"
        :title="state.title"
        width="600px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="superRef" :rules="state.formRules" label-width="150px" >
        <el-form-item label="记录名称:" prop="templateName">
          <el-input v-model.trim="state.form.templateName" :disabled="state.title =='查看'" placeholder="材料名称"></el-input>
        </el-form-item>
        <el-form-item label="模板文件:" prop="filePath">
          <el-upload accept=".doc,.docx" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :limit='state.fileLimit' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)" >
            <el-button type="primary">点击上传</el-button>
            <template #tip>
              <div class="el-upload__tip">支持上传.doc、.docx格式文档,尺寸小于5M,最多可上传1张</div>
            </template>
          </el-upload>
        </el-form-item>
      </el-form>
      <template #footer v-if="state.title !='查看'">
        <span class="dialog-footer">
            <el-button @click="handleClose" size="default">取 消</el-button>
            <el-button type="primary"  @click="onSubmit" size="default" v-preReClick>确认</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs, defineEmits, nextTick, onMounted} from 'vue'
import {ElMessage} from "element-plus";
import {addUser, editUser, getUserById, resetPwd} from "@/api/onlineEducation/user"
import {Base64} from "js-base64"
import {getCompany} from "@/api/onlineEducation/company";
import {addIndustryTemp, updateIndustryTemp, updateInfoPlatforms} from "@/api/staffManage/staff";
import {getToken} from "@/utils/auth";
import {delPic} from "@/api/onlineEducation/banner";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
const superRef = ref()
const state = reactive({
  title: '',
  form: {
    id: null,
    templateName: '',
    filePath: '',
    format: '',
    companyId: null
  },
  formRules:{
    templateName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
  },
  isAdmin: false,
  companyList: [],
  industryList: [],
  uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
  header: {
    Authorization: getToken()
  },
  fileLimit: 1,
  fileList: []
})
onMounted(() => {
});
const openDialog = async (type, value,companyId, isAdmin, companyList) => {
  state.isAdmin = isAdmin
  if(isAdmin){
    state.companyList = companyList
  }
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
  if(state.title == '编辑'||state.title == '查看'){
    Object.keys(state.form).forEach(key => {
      if (key in value) {
        state.form[key] = value[key]
      }
    })
    if(value.filePath) {
      const obj = {
        url: value.filePath,
        name: '模板文件'
      }
      state.fileList = [obj]
    }
  }
  dialogVisible.value = true
}
const onSubmit = async () => {
  const valid = await superRef.value.validate();
  if(valid){
    if(state.title == '新增'){
      const {id,...data} = state.form
      const res = await addIndustryTemp(data)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }else{
      const res = await updateIndustryTemp(state.form)
      if(res.code == 200){
        ElMessage.success(res.message)
        emit('getList')
        handleClose()
        dialogVisible.value = false;
      }else{
        ElMessage.warning(res.message)
      }
    }
  }
}
const handleAvatarSuccess = (res, uploadFile) => {
  if(res.code == 200){
    state.form.filePath = res.data.path
    state.form.format = '.' + res.data.filename.split('.')[1]
  }else{
    state.fileList = []
    ElMessage({
      type: 'warning',
      message: '文件上传失败'
    })
  }
}
const showTip =()=>{
  ElMessage({
    type: 'warning',
    message: '超出文件上传数量'
  });
}
const picSize = async (rawFile) => {
  if(rawFile.size / 1024 / 1024 > 5){
    ElMessage({
      type: 'warning',
      message: '文件大小不能超过5M'
    });
    return false
  }
};
const handleRemove = async (file, uploadFiles) => {
  let path = state.form.filePath;
  await delPic({path: path}).then(res => {
    if(res.code == 200){
      // ElMessage({
      //   type: 'success',
      //   message: '文件已删除'
      // })
      state.form.filePath = ''
      state.form.format = ''
    }else{
      ElMessage({
        type: 'warning',
        message: res.message
      })
    }
  }).catch(() => {
    state.form.imgUrl = ''
  });
}
const handleClose = () => {
  state.form = {
    id: null,
    templateName: '',
    industryType: '',
    filePath: '',
    format: '',
    companyId: null
  }
  superRef.value.clearValidate();
  superRef.value.resetFields()
  dialogVisible.value = false;
}
defineExpose({
  openDialog
});
</script>
<style scoped lang="scss">
.notice{
  :deep(.el-form .el-form-item__label) {
    font-size: 15px;
  }
  .file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
src/views/build/conpanyFunctionConsult/qualityManage/rangeManage/range/index.vue
对比新文件
@@ -0,0 +1,338 @@
<template>
  <div class="app-container">
    <div style="margin-bottom: 10px">
      <el-form style="display: flex;flex-wrap: wrap;">
        <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px">
          <el-select
              v-model="data.queryParams.companyName"
              filterable
              remote
              @change="selectValue"
              reserve-keyword
              placeholder="请输入企业名称"
              remote-show-suffix
              :remote-method="getCompanyList"
              :loading="loadingCompany"
              style="width: 240px"
          >
            <el-option
                v-for="item in data.companyList"
                :key="item.id"
                :label="item.name"
                :value="item.name"
            />
          </el-select>
        </el-form-item>
        <el-form-item v-if="data.isAdmin">
          <el-button type="primary" style="margin-left: 30px" @click="searchClick">查询</el-button>
          <el-button plain @click="reset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="bottom">
      <div class="left">
        <span style="font-weight: 600;font-size: 24px">目录</span>
        <el-tree
            style="max-width: 600px;margin-top: 20px"
            :data="data.treeData"
            :props="data.defaultProps"
            :default-expand-all="true"
            :expand-on-click-node="false"
            @node-click="handleNodeClick"
        />
      </div>
      <div class="right">
        <el-form :model="data.form" size="default" ref="noticeRef" :rules="data.formRules" label-position="left" label-width="125px" >
          <el-form-item label="具体内容" prop="content" >
            <el-input v-model="data.form.content" :rows="4" type="textarea" />
          </el-form-item>
          <el-form-item label="标准分析" prop="analysis" >
            <el-input v-model="data.form.analysis" :rows="4" type="textarea" />
          </el-form-item>
          <el-form-item label="应准备材料" prop="dataList">
            <el-button type="primary" @click="openDataDialog('add',{})">新增</el-button>
          </el-form-item>
          <el-table style="margin:15px 0;width: 80%" :data="data.form.dataList" :border="true" >
            <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
            <el-table-column label="材料名称" prop="companyName" align="center"  />
            <el-table-column label="材料模板" prop="companyName" align="center"  />
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
              <template #default="scope">
                <el-button link type="primary"  @click="openDataDialog('edit',scope.row)" >编辑</el-button>
                <el-button link type="danger"  @click="handleDataDelete(scope.row)" >删除</el-button>
              </template>
            </el-table-column>
          </el-table>
          <el-form-item label="记录上传" prop="recordList">
            <el-button type="primary" @click="openRecordDialog('add',{})">新增</el-button>
          </el-form-item>
          <el-table style="margin-top: 15px;width: 80%" :data="data.form.recordList" :border="true" >
            <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
            <el-table-column label="记录名称" prop="companyName" align="center"  />
            <el-table-column label="记录模板" prop="companyName" align="center"  />
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
              <template #default="scope">
                <el-button link type="primary"  @click="openRecordDialog('edit',scope.row)" >编辑</el-button>
                <el-button link type="danger"  @click="handleRecordDelete(scope.row)" >删除</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
        <el-button type="primary" style="margin-top: 20px;text-align: right;float: right">保存</el-button>
      </div>
    </div>
    <dataDialog ref="dialogRef" @getList="getList"></dataDialog>
    <record-dialog ref="dialogRecordRef" @getList="getList"></record-dialog>
  </div>
</template>
<script setup>
import {getCurrentInstance, onMounted, reactive, ref, toRefs} from "vue";
import Cookies from "js-cookie";
import {ElMessage, ElMessageBox} from "element-plus";
import {getCompany} from "@/api/onlineEducation/company";
import {getToken} from "@/utils/auth";
import {delPic} from "@/api/onlineEducation/banner";
import dataDialog from "./components/dataDialog.vue"
import recordDialog from "./components/recordDialog.vue"
import {delSysClause} from "@/api/staffManage/staff";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const noticeRef = ref();
const dialogRef = ref();
const dialogRecordRef = ref();
const loadingCompany = ref(false)
const choosedData = ref([])
const data = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    companyId: null,
  },
  form: {
    id: '',
    companyId: null,
    content: '',
    analysis: '',
    dataList: [],
    recordList: []
  },
  formRules: {
    content: [{ required: true, message: '请输入具体内容', trigger: 'blur' }],
    analysis: [{ required: true, message: '请输入标准分析', trigger: 'blur' }],
    dataList: [{ required: true, message: '请输入标准分析', trigger: 'blur' }],
    recordList: [{ required: true, message: '请输入标准分析', trigger: 'blur' }]
  },
  companyList: [],
  isAdmin: false,
  defaultProps: {
    children: 'children',
    label: 'label',
  },
  treeData: [
    {
      label: '1范围',
      children: [
        {
          label: '1.1规范范围管理',
          children: [
            {
              label: 'Level three 1-1-1',
              children: [
                {
                  label: 'Level three 1-1-1',
                  children: [
                    {
                      label: 'Level three 1-1-1',
                    },
                  ],
                },
              ],
            },
          ],
        },
        {
          label: '1.2收集需求',
        },
        {
          label: '1.3定义范围',
        },
      ],
    },
  ],
  dataVisible: false,
  dataTitle: '',
  uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile',
  header: {
    Authorization: getToken()
  },
  fileLimit: 1,
  fileDataList: []
});
const dataList = ref([]);
const total = ref(0);
const { queryParams } = toRefs(data);
onMounted(async () => {
  const userInfo = JSON.parse(Cookies.get('userInfo'))
  console.log("userInfo",userInfo)
  data.isAdmin = userInfo.userType === 0;
  if(data.isAdmin){
    await getCompanyList()
    data.queryParams.companyId = data.companyList[0].id
    data.queryParams.companyName = data.companyList[0].name
    data.form.companyId = data.companyList[0].id
  }else {
    data.queryParams.companyId = userInfo.companyId
  }
  await getList();
})
const getList = async () => {
  loading.value = true;
  // const res = await getBasic(data.queryParams);
  // if(res.code === 200){
  //   dataList.value = res.data.list
  //   total.value = res.data.total
  // }else{
  //   ElMessage.warning(res.message)
  // }
  loading.value = false;
}
const getCompanyList = async (val)=>{
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
  data.companyList.forEach(item => {
    if(item.name === val){
      data.queryParams.companyId = item.id
    }
  })
}
const searchClick = () => {
  getList();
}
function reset() {
  data.queryParams = {
    companyId: '',
    pageNum: 1,
    pageSize: 10,
  }
  choosedData.value = []
  data.companyList = [];
  getList();
  getCompanyList()
}
const handleNodeClick = (val) => {
  console.log('node',val)
}
const openDataDialog = (type, value) => {
  dialogRef.value.openDialog(type, value, data.queryParams.companyId, data.isAdmin, data.companyList);
}
const openRecordDialog = (type, value) => {
  dialogRecordRef.value.openDialog(type, value, data.queryParams.companyId, data.isAdmin, data.companyList);
}
const handleDataDelete = (val) => {
  ElMessageBox.confirm(
      '确定删除此条数据?',
      '提示',
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
      .then( async() => {
        const res = await delSysClause({id: val.id})
        if(res.code == 200){
          ElMessage.success('数据删除成功')
          await getList()
        }else{
          ElMessage.warning(res.message)
        }
      })
}
const handleRecordDelete = (val) => {
  ElMessageBox.confirm(
      '确定删除此条数据?',
      '提示',
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
      .then( async() => {
        const res = await delSysClause({id: val.id})
        if(res.code == 200){
          ElMessage.success('数据删除成功')
          await getList()
        }else{
          ElMessage.warning(res.message)
        }
      })
}
</script>
<style scoped lang="scss">
.app-container{
  .bottom{
    display: flex;
    width: auto;
    height: auto;
    border: 1px solid #c3c3c3;
    margin: 20px;
    .left{
      border-right: 1px solid darkgray;
      display: flex;
      min-width: 240px;
      margin: 20px 20px 20px 50px;
      flex-direction: column;
      :deep(.el-tree){
        background: none;
      }
    }
    .right{
      margin: 20px 20px 20px 10px;
      flex: 1;
      :deep(.el-form-item__label){
        font-weight: 600;font-size: 20px
      }
    }
  }
}
</style>
src/views/build/conpanyFunctionConsult/qualityManage/runManage/catalogRun/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
  运行目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/runManage/run/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
运行
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/supportManage/catalogSupport/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
  支持目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/supportManage/support/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
支持
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/termManage/catalogTerm/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
术语目录
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityManage/termManage/term/index.vue
对比新文件
@@ -0,0 +1,11 @@
<script setup>
</script>
<template>
术语
</template>
<style scoped lang="scss">
</style>
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/components/objectiveDialog.vue
@@ -345,7 +345,6 @@
  state.isAdmin = userInfo.userType === 0;
  state.form.companyName = userInfo.companyName
  state.form.companyId = userInfo.companyId
  await getDeptList()
  title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
@@ -354,13 +353,23 @@
      state.form.companyName = value.companyName
    }
  }
  await getDeptList()
  if(state.isAdmin){
    await   getCompanyList()
  }
  await   getPeopleList()
  dialogVisible.value = true;
}
const addObject = () => {
  state.form.qualityTargets.push({})
}
const getDeptList = async () => {
  const res = await getDept()
  const param = {
    pageNum: 1,
    pageSize: 999,
    companyId: state.form.companyId
  }
  const res = await getDept(param)
  if(res.code === 200){
    state.deptList = res.data
  }
@@ -434,10 +443,10 @@
  state.form.qualityTargets = state.form.qualityTargets.filter(item=> item != val)
}
const getPeopleList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val,
      companyId: state.form.companyId
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
@@ -446,6 +455,20 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
      state.peopleList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
@@ -478,19 +501,27 @@
  }
}
const selectValueCom = (val) => {
  state.form.leadBy = null
  state.form.qualityBy = null
  state.form.compilationBy = null
  state.form.leadName = null
  state.form.qualityName = null
  state.form.compilationName = null
  state.form.departId = null
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
  getDeptList()
  getPeopleList()
}
const changeLevel = () => {
  // state.form.companyName = ''
  state.form.departId = null
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -501,6 +532,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/index.vue
@@ -198,6 +198,9 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -227,10 +230,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -274,6 +291,7 @@
    }
  }
  getList();
  getCompanyList()
}
const exportData = () => {
  if(choosedData.value && choosedData.value.length === 0){
src/views/build/conpanyFunctionConsult/qualityObjectives/reportsituation/components/stationCompanyDialog.vue
@@ -239,6 +239,10 @@
    state.form = JSON.parse(JSON.stringify(value));
    chooseQuality(state.form.qualityId)
  }
  if(state.isAdmin){
    await   getCompanyList()
  }
  await   getPeopleList()
  dialogVisible.value = true;
}
@@ -329,9 +333,9 @@
  state.qualityList = []
}
const getPeopleList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      companyId: state.form.companyId,
      companyId: state.form.companyId == 0 ? null : state.form.companyId,
      name: val
    }
    const res = await getUser(queryParams)
@@ -341,6 +345,20 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
      state.peopleList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
@@ -371,15 +389,18 @@
  state.qualityList = []
  state.form.qualityTargets = []
  state.message = ''
  state.form.chargeId = null
  state.form.chargeName = ''
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
  getQualityList()
  getPeopleList()
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -390,6 +411,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
src/views/build/conpanyFunctionConsult/qualityObjectives/reportsituation/index.vue
@@ -237,6 +237,9 @@
    data.queryParams.companyId = userInfo.companyId
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -282,10 +285,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -332,6 +349,7 @@
    }
  }
  getList();
  getCompanyList()
}
const exportData = () => {
  if(choosedData.value && choosedData.value.length === 0){
src/views/build/conpanyFunctionConsult/qualityObjectives/table/components/tableCompanyDialog.vue
@@ -312,6 +312,10 @@
      state.form.companyName = value.companyName
    }
  }
  if(state.isAdmin){
    await   getCompanyList()
  }
  await   getPeopleList()
  dialogVisible.value = true;
}
@@ -403,9 +407,9 @@
  state.qualityList = []
}
const getPeopleList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      companyId: state.form.companyId,
      companyId: state.form.companyId == 0 ? null : state.form.companyId,
      name: val
    }
    const res = await getUser(queryParams)
@@ -415,6 +419,20 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
      state.peopleList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
@@ -459,15 +477,22 @@
  state.form.qualityId = null
  state.qualityList = []
  state.form.qualityTargets = []
  state.form.fictionId = null
  state.form.fictionName = ''
  state.form.checkId = null
  state.form.checkName = ''
  state.form.ratifyId = null
  state.form.ratifyName = ''
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
  getQualityList()
  getPeopleList()
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -478,6 +503,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
src/views/build/conpanyFunctionConsult/qualityObjectives/table/components/tableDeptDialog.vue
@@ -298,6 +298,10 @@
  if(type === 'edit' || type === 'review') {
    state.form = JSON.parse(JSON.stringify(value));
  }
  if(state.isAdmin){
    await   getCompanyList()
  }
  await   getPeopleList()
  dialogVisible.value = true;
}
@@ -388,9 +392,9 @@
  state.companyList = []
}
const getPeopleList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      companyId: state.form.companyId,
      companyId: state.form.companyId == 0 ? null : state.form.companyId,
      name: val
    }
    const res = await getUser(queryParams)
@@ -400,6 +404,20 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageNum: 1,
      pageSize: 10,
      companyId: state.form.companyId == 0 ? null : state.form.companyId
    }
    const res = await getUser(queryParams)
    if (res.code == 200) {
      state.peopleList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
const selectValue = (val) => {
@@ -444,15 +462,22 @@
  state.form.qualityId = null
  state.qualityList = []
  state.form.qualityTargets = []
  state.form.fictionId = null
  state.form.fictionName = ''
  state.form.checkId = null
  state.form.checkName = ''
  state.form.ratifyId = null
  state.form.ratifyName = ''
  state.companyList.forEach(item => {
    if(item.name === val){
      state.form.companyId = item.id
    }
  })
  getQualityList()
  getPeopleList()
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    const queryParams = {
      name: val
    }
@@ -463,6 +488,17 @@
    } else {
      ElMessage.warning(res.message)
    }
  }else {
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      state.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }
}
defineExpose({
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue
@@ -216,6 +216,9 @@
  }
  getList();
  if(data.isAdmin){
    getCompanyList()
  }
});
const getList = async () => {
  loading.value = true;
@@ -253,10 +256,24 @@
}
const getCompanyList = async (val)=>{
  if(val != ""){
  if(val){
    loadingCompany.value = true;
    const queryParams = {
      name: val
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
      loadingCompany.value = false;
      data.companyList = res.data.list
    } else {
      ElMessage.warning(res.message)
    }
  }else{
    loadingCompany.value = true;
    const queryParams = {
      pageSize: 10,
      pageNum: 1,
    }
    const res = await getCompany(queryParams)
    if (res.code == 200) {
@@ -303,6 +320,7 @@
    }
  }
  getList();
  getCompanyList()
}
const exportData = () => {
  if(choosedData.value && choosedData.value.length === 0){
@@ -329,8 +347,12 @@
    const year = now.getFullYear()
    const month = (now.getMonth() +1).toString().padStart(2, '0');
    item.nowDate = year + '-' + month
    item.year = year
    item.tableData = item.qualityTargets
    item.tableData = item.qualityTargets.map((i,index) => {
      return {
        ...i,
        nuum: index+1
      }
    })
    try {
      generateWordDocument(templatePath.value, item, name+'_质量目标分解表.docx');
    } catch (error){
src/views/system/industryManage/components/editDialog.vue
对比新文件
@@ -0,0 +1,136 @@
<template>
  <div class="notice">
    <el-dialog
        v-model="dialogVisible"
        :title="state.title"
        width="550px"
        :before-close="handleClose"
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="150px" >
        <el-form-item label="行业名称:" prop="name">
          <el-input v-model.trim="state.form.name" :disabled="state.title =='查看'" placeholder="行业名称"></el-input>
        </el-form-item>
      </el-form>
      <template #footer v-if="state.title !='查看'">
        <span class="dialog-footer">
            <el-button @click="handleClose" size="default">取 消</el-button>
            <el-button type="primary"  @click="onSubmit" size="default" v-preReClick>确认</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import {reactive, ref, toRefs, defineEmits, nextTick, onMounted} from 'vue'
import {ElMessage} from "element-plus";
import {addUser, editUser, getUserById, resetPwd} from "@/api/onlineEducation/user"
import {Base64} from "js-base64"
import {getCompany} from "@/api/onlineEducation/company";
import {updateInfoPlatforms, updateSysClause} from "@/api/staffManage/staff";
import Cookies from "js-cookie";
import {addBasic, editBasic} from "@/api/companyInfo/basicInfo";
const emit = defineEmits(["getList"]);
const dialogVisible = ref(false)
const busRef = ref();
const state = reactive({
  title: '',
  form: {
    id: null,
    name: '',
  },
  formRules:{
    name: [{ required: true, message: '请输入行业名称', trigger: 'blur' }],
  }
})
onMounted(() => {
});
const openDialog = async (type, value,companyId) => {
  state.title = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看'
  state.form.companyId = companyId
  if(state.title == '编辑'||state.title == '查看'){
    Object.keys(state.form).forEach(key => {
      if (key in value) {
        state.form[key] = value[key]
      }
    })
  }
  dialogVisible.value = true
}
const onSubmit = async () => {
  const valid = await busRef.value.validate();
  if(valid){
    if(title.value === '新增'){
      const {id, ...data} = JSON.parse(JSON.stringify(state.form))
      const res = await addBasic(data)
      if(res.code === 200){
        ElMessage({
          type: 'success',
          message: '新增成功'
        });
      }else{
        ElMessage.warning(res.message)
      }
      emit("getList")
      busRef.value.clearValidate();
      reset();
      dialogVisible.value = false;
    }else if(title.value === '编辑'){
      const {...data} = JSON.parse(JSON.stringify(state.form))
      const res = await editBasic(data)
      if(res.code === 200){
        ElMessage({
          type: 'success',
          message: '编辑成功'
        });
      }else{
        ElMessage.warning(res.message)
      }
      emit("getList")
      busRef.value.clearValidate();
      reset();
      dialogVisible.value = false;
    }
  }
}
const handleClose = () => {
  busRef.value.clearValidate();
  reset();
  dialogVisible.value = false;
  emit("getList")
}
const reset = () => {
  state.form = {
    id: null,
    clauseNum: '',
    name: '',
    companyId: null
  }
}
defineExpose({
  openDialog
});
</script>
<style scoped lang="scss">
.notice{
  :deep(.el-form .el-form-item__label) {
    font-size: 15px;
  }
  .file {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
src/views/system/industryManage/index.vue
对比新文件
@@ -0,0 +1,149 @@
<template>
  <div class="app-container">
    <div style="display: flex;justify-content: space-between">
      <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" >
        <el-form-item>
          <el-button
              type="primary"
              plain
              icon="Plus"
              @click="openDialog('add',{})"
          >新增</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格数据 -->
    <el-table v-loading="loading" :data="dataList" :border="true">
      <el-table-column label="序号" type="index" align="center" width="80"/>
      <el-table-column label="行业名称" prop="clauseNum" align="center"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
        <template #default="scope">
          <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button>
          <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
        v-show="total > 0"
        :total="total"
        v-model:page="queryParams.pageNum"
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
    />
    <edit-dialog ref="dialogRef" @getList=getList></edit-dialog>
  </div>
</template>
<script setup>
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 {
  delInfoPlatforms,
  delRoster,
  delSysClause,
  getInfoPlatforms,
  getRosterList,
  getSysClause
} from "@/api/staffManage/staff";
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
const { proxy } = getCurrentInstance();
const loading = ref(false);
const dialogRef = ref();
const data = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    companyId: null
  },
  total: 0,
  dataList: [],
  companyList: [],
  isAdmin: false
});
const { queryParams, total, dataList,companyList, isAdmin } = toRefs(data);
const userInfo = ref()
onMounted(async ()=>{
  userInfo.value = JSON.parse(Cookies.get('userInfo'))
  data.isAdmin = userInfo.userType === 0;
  if(data.isAdmin){
    data.queryParams.companyId = null
  }else {
    data.queryParams.companyId = userInfo.companyId
  }
  await getList()
})
onUnmounted(()=>{
})
const getList = async () => {
  loading.value = true
  // const res = await getSysClause(data.queryParams)
  // if(res.code == 200){
  //   data.dataList = res.data || []
  //   data.total = res.data.total
  // }else{
  //   ElMessage.warning(res.message)
  // }
  loading.value = false
}
const getCompanyList = async ()=>{
  const queryParams = {
    pageNum: 1,
    pageSize: 999
  }
  const res = await getCompany(queryParams)
  if (res.code == 200) {
    data.companyList = res.data.list?res.data.list:[]
    data.queryParams.companyId = data.companyList[0].id
  } else {
    ElMessage.warning(res.message)
  }
}
const openDialog = (type, value) => {
  dialogRef.value.openDialog(type, value, data.queryParams.companyId);
}
/** 重置新增的表单以及其他数据  */
const reset= async()=> {
  data.queryParams = {
    pageNum: 1,
    pageSize: 10,
    companyId: null
  }
  await getCompanyList()
  await getList()
}
const handleDelete = (val) => {
  ElMessageBox.confirm(
      '确定删除此条数据?',
      '提示',
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
      .then( async() => {
        const res = await delSysClause({id: val.id})
        if(res.code == 200){
          ElMessage.success('数据删除成功')
          await getList()
        }else{
          ElMessage.warning(res.message)
        }
      })
}
</script>