spring
2025-02-22 0590bdfc0fa9f803d74207d9835b65191b20e576
完成记录的控制搬迁
已修改9个文件
2326 ■■■■■ 文件已修改
src/api/cnas/systemManagement/documentRecords.js 299 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Preview/filePreview.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue 315 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue 329 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue 438 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue 332 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue 396 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/index.vue 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/documentRecords.js
@@ -63,3 +63,302 @@
    params: query,
  });
}
// 外来文件确认记录-新增
export function addManageRecordVerify(data) {
  return request({
    url: "/manageRecordVerify/addManageRecordVerify",
    method: "post",
    data: data,
  });
}
//外来文件确认记录-填写--列表
export function pageManageRecordVerify(query) {
  return request({
    url: "/manageRecordVerify/pageManageRecordVerify",
    method: "get",
    params: query,
  });
}
// 外来文件确认记录-历史--提交
export function submitManageRecordTotal(data) {
  return request({
    url: "/manageRecordTotal/submitManageRecordTotal",
    method: "post",
    data: data,
  });
}
// 外来文件确认记录-历史--审核
export function ratifyManageRecordTotal(data) {
  return request({
    url: "/manageRecordTotal/ratifyManageRecordTotal",
    method: "post",
    data: data,
  });
}
//外来文件确认记录-填写--删除
export function delManageRecordVerify(query) {
  return request({
    url: "/manageRecordVerify/delManageRecordVerify",
    method: "delete",
    params: query,
  });
}
//外来文件确认记录-历史--列表
export function pageManageRecordTotal(query) {
  return request({
    url: "/manageRecordTotal/pageManageRecordTotal",
    method: "get",
    params: query,
  });
}
// 外来文件确认记录-填写--修改
export function doManageRecordVerify(data) {
  return request({
    url: "/manageRecordVerify/doManageRecordVerify",
    method: "post",
    data: data,
  });
}
//文件发放回收记录-导出
export function exportOutManageRecordIssueRecycle(query) {
  return request({
    url: "/manageRecordIssueRecycle/exportOutManageRecordIssueRecycle",
    method: "get",
    params: query,
  });
}
// 文件发放回收记录-新增
export function addManageRecordIssueRecycle(data) {
  return request({
    url: "/manageRecordIssueRecycle/addManageRecordIssueRecycle",
    method: "post",
    data: data,
  });
}
// 文件发放回收记录-编辑
export function doManageRecordIssueRecycle(data) {
  return request({
    url: "/manageRecordIssueRecycle/doManageRecordIssueRecycle",
    method: "post",
    data: data,
  });
}
//查询CNAS人员侧边栏
export function selectCNSAPersonTree(query) {
  return request({
    url: "/personBasicInfo/selectCNSAPersonTree",
    method: "get",
    params: query,
  });
}
//文件发放回收记录-列表
export function pageManageRecordIssueRecycle(query) {
  return request({
    url: "/manageRecordIssueRecycle/pageManageRecordIssueRecycle",
    method: "get",
    params: query,
  });
}
//文件发放回收记录-删除
export function delManageRecordIssueRecycle(query) {
  return request({
    url: "/manageRecordIssueRecycle/delManageRecordIssueRecycle",
    method: "delete",
    params: query,
  });
}
//文件修订-导出列表
export function exportOutManageRecordAudit(query) {
  return request({
    url: "/manageRecordAudit/exportOutManageRecordAudit",
    method: "get",
    params: query,
  });
}
// 文件修订-新增
export function addManageRecordAudit(data) {
  return request({
    url: "/manageRecordAudit/addManageRecordAudit",
    method: "post",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    data: data,
  });
}
// 文件修订-编辑
export function doManageRecordAudit(data) {
  return request({
    url: "/manageRecordAudit/doManageRecordAudit",
    method: "post",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    data: data,
  });
}
// 文件修订-批准
export function ratifyManageRecordAudit(data) {
  return request({
    url: "/manageRecordAudit/ratifyManageRecordAudit",
    method: "post",
    data: data,
  });
}
//文件修订-列表
export function pageManageRecordAudit(query) {
  return request({
    url: "/manageRecordAudit/pageManageRecordAudit",
    method: "get",
    params: query,
  });
}
//文件修订-删除
export function delManageRecordAudit(query) {
  return request({
    url: "/manageRecordAudit/delManageRecordAudit",
    method: "delete",
    params: query,
  });
}
//文件定期审查记录-导出
export function exportOutManageRecordIntervals(query) {
  return request({
    url: "/manageRecordIntervals/exportOutManageRecordIntervals",
    method: "get",
    params: query,
  });
}
// 文件定期审查记录-新增
export function addManageRecordIntervals(data) {
  return request({
    url: "/manageRecordIntervals/addManageRecordIntervals",
    method: "post",
    data: data,
  });
}
// 文件定期审查记录-编辑
export function doManageRecordIntervals(data) {
  return request({
    url: "/manageRecordIntervals/doManageRecordIntervals",
    method: "post",
    data: data,
  });
}
// 文件定期审查记录-历史记录-批准
export function ratifyManageRecordIntervalsTotal(data) {
  return request({
    url: "/manageRecordIntervalsTotal/ratifyManageRecordIntervalsTotal",
    method: "post",
    data: data,
  });
}
// 文件定期审查记录-历史记录-提交
export function submitManageRecordIntervalsTotal(data) {
  return request({
    url: "/manageRecordIntervalsTotal/submitManageRecordIntervalsTotal",
    method: "post",
    data: data,
  });
}
//文件定期审查记录-列表
export function pageManageRecordIntervals(query) {
  return request({
    url: "/manageRecordIntervals/pageManageRecordIntervals",
    method: "get",
    params: query,
  });
}
//文件定期审查记录-历史记录-列表
export function pageManageRecordIntervalsTotal(query) {
  return request({
    url: "/manageRecordIntervalsTotal/pageManageRecordIntervalsTotal",
    method: "get",
    params: query,
  });
}
//文件定期审查记录-删除
export function delManageRecordIntervals(query) {
  return request({
    url: "/manageRecordIntervals/delManageRecordIntervals",
    method: "delete",
    params: query,
  });
}
//文件作废记录-导出
export function exportOutManageRecordCancel(query) {
  return request({
    url: "/manageRecordCancel/exportOutManageRecordCancel",
    method: "get",
    params: query,
  });
}
// 文件作废记录-新增
export function addManageRecordCancel(data) {
  return request({
    url: "/manageRecordCancel/addManageRecordCancel",
    method: "post",
    data: data,
  });
}
// 文件作废记录-编辑
export function doManageRecordCancel(data) {
  return request({
    url: "/manageRecordCancel/doManageRecordCancel",
    method: "post",
    data: data,
  });
}
// 文件作废记录-批准
export function ratifyManageRecordCancel(data) {
  return request({
    url: "/manageRecordCancel/ratifyManageRecordCancel",
    method: "post",
    data: data,
  });
}
//文件作废记录-删除
export function delManageRecordCancel(query) {
  return request({
    url: "/manageRecordCancel/delManageRecordCancel",
    method: "delete",
    params: query,
  });
}
//文件作废记录-列表
export function pageManageRecordCancel(query) {
  return request({
    url: "/manageRecordCancel/pageManageRecordCancel",
    method: "get",
    params: query,
  });
}
src/components/Preview/filePreview.vue
@@ -5,7 +5,7 @@
    </div>
    <div v-if="isPdf">
      <object :data="fileUrl" type="application/pdf" width="100%" height="750px">
        <p>您的浏览器不支持 PDF 预览。<a :href="fileUrl">下载 PDF 文件</a></p>
        <p>您的浏览器不支持 PDF 预览。<a :href="fileUrl" style="color: #3a7bfa;">下载 PDF 文件</a></p>
      </object>
    </div>
    <div v-if="isDoc">
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -27,7 +27,7 @@
        :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
    </div>
    <el-dialog :title="'添加' + radio + '记录'" :visible.sync="addDialogVisible" top="10vh" width="800px">
      <el-row>
      <el-row v-if="addDialogVisible">
        <el-col :span="12" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>申请编号:</div>
@@ -152,7 +152,7 @@
          <div class="search_thing">
            <div class="search_label">上传附件:</div>
            <div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload"
                accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
                accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
                <el-button size="small" type="primary">上传附件</el-button>
              </el-upload></div>
          </div>
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -1,28 +1,16 @@
<template>
  <!-- 作废文件销毁记录 -->
  <div class="ObsoleteDocumentDestructionRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">作废文件销毁记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentName"
            @keyup.enter.native="refreshTable()"></el-input></div>
      </div>
      <div class="search_thing">
        <div class="search_label">文件编号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +18,19 @@
        <el-button size="small" @click="refresh()">重 置</el-button>
        <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
      </div>
      <div class="btn">
        <el-button size="small" type="primary" @click="openAdd">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="small">导入</el-button></el-upload>
        <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </div>
    </div>
    <div class="table">
      <ValueTable ref="ValueTable" :url="$api.manageRecordCancel.pageManageRecordCancel"
        :delUrl="$api.manageRecordCancel.delManageRecordCancel" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
        :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
    </div>
    <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
      <el-row>
@@ -89,11 +85,25 @@
</template>
<script>
import ValueTable from '@/components/Table//value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import { getToken } from "@/utils/auth";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
import {
  exportOutManageRecordCancel,
  addManageRecordCancel,
  doManageRecordCancel,
  ratifyManageRecordCancel,
  delManageRecordCancel,
  pageManageRecordCancel
} from '@/api/cnas/systemManagement/documentRecords.js'
import {
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
export default {
  components: {
    ValueTable
    limsTable
  },
  data() {
    return {
@@ -102,78 +112,71 @@
      upPower: true,
      outLoading: false,
      addLoading: false,
      componentData: {
        entity: {
          documentName: null,
          documentCode: null,
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'handleEdit0',
          font: '修改',
          type: 'text',
          method: 'handleEdit0',
          field: [],
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        }, {
          id: 'handleRatify',
          font: '批准',
          type: 'text',
          method: 'handleRatify',
          field: [],
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return row.ratifyState == '通过'
          }
        },],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      addInfo: {},
      title: '新增',
      addInfo: {},
      addDialogVisible: false,
      fileList: [],
      personList: [],
      queryParams: {},
      tableData: [],
      column: [
        { label: "文件编号", prop: "documentCode" },
        { label: "文件名称", prop: "documentName", width: "120px" },
        {
          label: "数量",
          prop: "qty",
        },
        { label: "销毁原因", prop: "reason" },
        { label: "申请人", prop: "createUserName" },
        { label: "申请日期", prop: "createTime" },
        { label: "批准人", prop: "ratifyUserName" },
        { label: "批准日期", prop: "ratifyTime" },
        { label: "备注", prop: "remark" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleEdit0(row);
              },
              disabled: (row) => {
                return row.ratifyState == '通过'
              },
            },
            {
              name: "批准",
              type: "text",
              clickFun: (row) => {
                this.handleRatify(row);
              },
              disabled: (row) => {
                return row.ratifyState == '通过'
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
              disabled: (row) => {
                return row.ratifyState == '通过'
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
    }
  },
  // 用于上传文件的信息
@@ -184,12 +187,12 @@
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordCancel.exportInManageRecordCancel
      return this.javaApi + '/manageRecordCancel/exportInManageRecordCancel'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getAuthorizedPerson()
    this.getFileList()
  },
@@ -232,7 +235,6 @@
      this.upPower = up
    },
    openAdd() {
      // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
      this.addInfo = {}
      this.title = '新增'
      this.addDialogVisible = true;
@@ -245,24 +247,43 @@
    // 导出
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordCancel.exportOutManageRecordCancel, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordCancel(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '作废文件销毁记录';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "作废文件销毁记录");
      })
    },
    refreshTable() {
      this.refreshTable()()
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageManageRecordCancel({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
@@ -289,23 +310,11 @@
    },
    // 获取文件列表--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -321,18 +330,33 @@
        let { id, documentCode, documentName, qty, reason, remark } = this.addInfo
        obj = { id, documentCode, documentName, qty, reason, remark }
      }
      this.$axios.post(this.$api.manageRecordCancel[this.title == '新增' ? 'addManageRecordCancel' : 'doManageRecordCancel'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      if (this.title == '新增') {
        addManageRecordCancel(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      } else {
        doManageRecordCancel(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      }
    },
    getCurrentFile(e) {
      let obj = this.fileList.find(m => m.documentCode == e)
@@ -341,7 +365,7 @@
      }
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -349,8 +373,6 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
@@ -364,7 +386,7 @@
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            // 点击“确定”按钮,允许关闭
            this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '通过' }).then(res => {
            ratifyManageRecordCancel({ id: row.id, ratifyState: '通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
@@ -378,7 +400,7 @@
              })
          } else if (action === 'cancel') {
            // 点击“取消”按钮,不允许关闭
            this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, { id: row.id, ratifyState: '不通过' }).then(res => {
            ratifyManageRecordCancel({ id: row.id, ratifyState: '不通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
@@ -398,7 +420,22 @@
          }
        }
      })
    }
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delManageRecordCancel({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });
        })
        .catch(() => { });
    },
  }
}
</script>
@@ -435,8 +472,14 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  padding-top: 0;
}
.btn {
  position: absolute;
  right: 20px;
  top: 16px;
}
</style>
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -1,28 +1,16 @@
<template>
  <!-- 所有文件(内、外部文件)的发放与回收记录 -->
  <div class="DistributionRetrievalRecordsAllDocuments">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">所有文件(内、外部文件)的发放与回收记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentName"
            @keyup.enter.native="refreshTable()"></el-input></div>
      </div>
      <div class="search_thing">
        <div class="search_label">文件编号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +18,19 @@
        <el-button size="small" @click="refresh()">重 置</el-button>
        <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
      </div>
      <div class="btn">
        <el-button size="small" type="primary" @click="openAdd">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="small">导入</el-button></el-upload>
        <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </div>
    </div>
    <div class="table">
      <ValueTable ref="ValueTable" :url="$api.manageRecordIssueRecycle.pageManageRecordIssueRecycle"
        :delUrl="$api.manageRecordIssueRecycle.delManageRecordIssueRecycle" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
        :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
    </div>
    <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
      <el-row>
@@ -133,14 +129,29 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import {
  getYearAndMonthAndDays
} from '@/utils/date'
import { getToken } from "@/utils/auth";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
import {
  exportOutManageRecordIssueRecycle,
  doManageRecordIssueRecycle,
  addManageRecordIssueRecycle,
  selectCNSAPersonTree,
  pageManageRecordIssueRecycle,
  delManageRecordIssueRecycle,
} from '@/api/cnas/systemManagement/documentRecords.js'
import {
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
import { mapGetters } from "vuex";
export default {
  components: {
    ValueTable
    limsTable
  },
  data() {
    return {
@@ -149,78 +160,74 @@
      upPower: true,
      outLoading: false,
      addLoading: false,
      componentData: {
        entity: {
          documentName: null,
          documentCode: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }, {
          id: 'handleEdit',
          font: '修改',
          type: 'text',
          method: 'handleEdit',
          field: [],
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }, {
          id: 'handleBack',
          font: '回收',
          type: 'text',
          method: 'handleBack',
          disabFun: (row, index) => {
            return !!row.signedUser
          }
        }],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      title: '新增',
      addDialogVisible: false,
      addInfo: {},
      personList: [],
      fileType: [],
      fileList: [],
      list: []
      list: [],
      queryParams: {},
      tableData: [],
      column: [
        { label: "文件编号", prop: "documentCode" },
        { label: "文件名称", prop: "documentName", width: "120px" },
        {
          label: "版号",
          prop: "documentVersion",
        },
        { label: "份数", prop: "pages" },
        { label: "文件类别", prop: "documentType" },
        { label: "分发号", prop: "number" },
        { label: "接受人", prop: "receiveUserName" },
        { label: "接收部门", prop: "departLims" },
        { label: "接受日期", prop: "receiveDate" },
        { label: "签收人", prop: "signedUserName" },
        { label: "签收日期", prop: "signedDate" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleEdit(row);
              },
              disabled: (row) => {
                return !!row.signedUser
              },
            },
            {
              name: "回收",
              type: "text",
              clickFun: (row) => {
                this.handleBack(row);
              },
              disabled: (row) => {
                return !!row.signedUser
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
              disabled: (row) => {
                return !!row.signedUser
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
    }
  },
  // 用于上传文件的信息
@@ -231,16 +238,18 @@
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordIssueRecycle.exportInManageRecordIssueRecycle
    }
      return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
    },
    ...mapGetters(["userId"]),
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getAuthorizedPerson()
    this.selectEnumByCategory()
    this.getFileList()
    this.selectTreeList()
    // TODO 部门接口需要重写
    // this.selectTreeList()
  },
  methods: {
    getPower() {
@@ -295,27 +304,46 @@
    // 导出
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordIssueRecycle.exportOutManageRecordIssueRecycle, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件发放与回收记录';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '文件发放与回收记录')
      })
    },
    refreshTable() {
      this.refreshTable()()
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageManageRecordIssueRecycle({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -323,8 +351,6 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
@@ -352,33 +378,18 @@
      }
    },
    selectEnumByCategory() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "文件类别"
      }).then(res => {
        // this.componentData.tagField.documentType.select = res.data
        // this.componentData.selectField.documentType.select = res.data
        this.fileType = res.data
      })
      // 文件类别
      this.getDicts("document_type").then((response) => {
        this.fileType = this.dictToValue(response.data);
      });
    },
    // 获取文件列表--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -402,18 +413,33 @@
        let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = this.addInfo
        obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims }
      }
      this.$axios.post(this.$api.manageRecordIssueRecycle[this.title == '新增' ? 'addManageRecordIssueRecycle' : 'doManageRecordIssueRecycle'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      if (this.title == '新增') {
        addManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      } else {
        doManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      }
    },
    // 回收
    handleBack(row) {
@@ -424,8 +450,8 @@
      }).then(() => {
        let obj = {}
        let { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims } = row
        obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: JSON.parse(localStorage.getItem("user")).userId }
        this.$axios.post(this.$api.manageRecordIssueRecycle.doManageRecordIssueRecycle, obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId }
        doManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
@@ -441,9 +467,24 @@
    },
    // 查询树形列表
    selectTreeList() {
      this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
      selectCNSAPersonTree().then((res) => {
        this.list = res.data[0].children;
      });
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delManageRecordIssueRecycle({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });
        })
        .catch(() => { });
    },
  }
}
@@ -481,8 +522,8 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  padding-top: 0;
}
</style>
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -1,23 +1,21 @@
<template>
  <!-- 外来文件确认记录 -->
  <div class="ExternalDocumentConfirmationRecords">
    <el-row class="title">
      <el-col :span="20" style="padding-left: 20px;text-align: left;">外来文件确认记录</el-col>
    </el-row>
    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
      <el-tab-pane label="填写" name="填写" style="height: 100%;">
        <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
          <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;"
            v-if="addPower">新增</el-button>
          <el-button size="small" type="primary" @click="openAdd('新增')" style="margin-left: 20px;">新增</el-button>
          <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
            :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
            :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
            style="display:inline-block;margin-left: 20px;">
            <el-button size="small" type="primary" :loading="upLoading">导入</el-button></el-upload>
        </div>
        <div class="table" style="height: calc(100% - 200px)">
          <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
            :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify"
            :upUrl="$api.manageRecordTotal.doManageRecordVerify" />
            :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> -->
          <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
            :height="'calc(100vh - 270px)'" @pagination="pagination0"></lims-table>
        </div>
      </el-tab-pane>
      <el-tab-pane label="历史记录" name="历史记录" style="height: 100%;">
@@ -25,8 +23,8 @@
          <div class="search_thing">
            <div class="search_label">年:</div>
            <div class="search_input">
              <el-date-picker v-model="componentData.entity.year" type="year" placeholder="选择年" format="yyyy"
                value-format="yyyy" size="small" @change="refreshTable()">
              <el-date-picker v-model="queryParams.year" type="year" placeholder="选择年" format="yyyy" value-format="yyyy"
                size="small" @change="refreshTable()">
              </el-date-picker>
            </div>
          </div>
@@ -36,8 +34,10 @@
          </div>
        </div>
        <div class="table">
          <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
            :componentData="componentData" :key="upIndex" />
          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
            :componentData="componentData" :key="upIndex" /> -->
          <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
            :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table>
        </div>
      </el-tab-pane>
    </el-tabs>
@@ -51,17 +51,66 @@
        <el-button type="primary" @click="submitCheck('通过')" :loading="checkLoading">通 过</el-button>
      </span>
    </el-dialog>
    <!-- 新增/编辑 -->
    <el-dialog :title="title" :visible.sync="addDia" width="500px">
      <el-form :model="addForm" ref="addForm" :rules="addRules" label-position="right" label-width="120px">
        <el-form-item label="外来文件名称" prop="documentName">
          <el-input size="small" placeholder="请输入" clearable v-model="addForm.documentName"></el-input>
        </el-form-item>
        <el-form-item label="文件编号" prop="documentCode">
          <el-input size="small" placeholder="请输入" clearable v-model="addForm.documentCode">
          </el-input>
        </el-form-item>
        <el-form-item label="标准规范名称" prop="standardName">
          <el-input size="small" placeholder="请输入" clearable v-model="addForm.standardName">
          </el-input>
        </el-form-item>
        <el-form-item label="标准号" prop="standardCode">
          <el-input size="small" placeholder="请输入" clearable v-model="addForm.standardCode">
          </el-input>
        </el-form-item>
        <el-form-item label="生效日期" prop="effectiveDate">
          <el-date-picker v-model="addForm.effectiveDate" format="yyyy-MM-dd" placeholder="选择日期" size="small"
            style="width: 100%" type="date" value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="作废日期" prop="cancelDate">
          <el-date-picker v-model="addForm.cancelDate" format="yyyy-MM-dd" placeholder="选择日期" size="small"
            style="width: 100%" type="date" value-format="yyyy-MM-dd">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="备注" prop="note">
          <el-input size="small" placeholder="请输入" type="textarea" :rows="2" clearable v-model="addForm.note">
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addDia = false">取 消</el-button>
        <el-button :loading="uploading" type="primary" @click="submitProduct('addForm')">确 认</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import ValueTable from '@/components/Table/value-table.vue'
import { getToken } from "@/utils/auth";
import {
  addManageRecordVerify,
  pageManageRecordVerify,
  submitManageRecordTotal,
  ratifyManageRecordTotal,
  delManageRecordVerify,
  pageManageRecordTotal,
  doManageRecordVerify
} from '@/api/cnas/systemManagement/documentRecords.js'
export default {
  components: {
    ValueTable,
    filePreview,
    limsTable,
  },
  data() {
    return {
@@ -70,96 +119,127 @@
      lookDialogVisible: false,
      noCheckLoading: false,
      checkLoading: false,
      componentData: {
        entity: {
          year: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        do: [{
          id: 'handleLook',
          font: '查看',
          type: 'text',
          method: 'handleLook',
          disabFun: (row, index) => {
            return !row.url
          }
        }, {
          id: 'handleDown0',
          font: '下载',
          type: 'text',
          method: 'handleDown0',
          disabFun: (row, index) => {
            return !row.url
          }
        },
        {
          id: 'handleSubmit',
          font: '提交',
          type: 'text',
          method: 'handleSubmit',
          disabFun: (row, index) => {
            return !!row.submitUserName
          }
        }, {
          id: 'handleApproval',
          font: '批准',
          type: 'text',
          method: 'handleApproval',
          disabFun: (row, index) => {
            return !row.submitUserName || !!row.ratifyUserName
          }
        }],
        tagField: {},
        selectField: {},
        requiredAdd: [],
        requiredUp: [],
        needSort: [],
        inputType: ''
      },
      // 样品列表
      componentData0: {
        entity: {
          manageRecordTotalId: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        do: [{
          id: 'update',
          font: '修改',
          type: 'text',
          method: 'doDiy'
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy'
        }],
        tagField: {},
        selectField: {},
        requiredAdd: ['documentName', 'documentCode'],
        requiredUp: ['documentName', 'documentCode'],
        datePicker: ['effectiveDate', 'cancelDate'],
        needSort: [],
        inputType: ''
      },
      upIndex0: 100,
      entityCopy: {},
      upIndex: 0,
      addPower: true,
      upPower: true,
      currentInfo: {},
      upLoading: false,
      queryParams: {},
      tableData: [],
      column: [
        { label: "年份", prop: "year" },
        { label: "总数量", prop: "totalNum", width: "120px" },
        {
          label: "拟制人",
          prop: "submitUserName",
        },
        { label: "拟制日期", prop: "submitDate" },
        { label: "批准人", prop: "ratifyUserName" },
        { label: "批准日期", prop: "ratifyDate" },
        { label: "批准结果", prop: "ratifyState" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.handleLook(row);
              },
              disabled: (row) => {
                return !row.url
              },
            },
            {
              name: "下载",
              type: "text",
              clickFun: (row) => {
                this.handleDown0(row);
              },
              disabled: (row) => {
                return !row.url
              },
            },
            {
              name: "提交",
              type: "text",
              clickFun: (row) => {
                this.handleSubmit(row);
              },
              disabled: (row) => {
                return !!row.submitUserName
              },
            },
            {
              name: "批准",
              type: "text",
              clickFun: (handleApproval) => {
                this.handleSubmit(row);
              },
              disabled: (row) => {
                return !row.submitUserName || !!row.ratifyUserName
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
      tableData0: [],
      column0: [
        { label: "外来文件名称", prop: "documentName" },
        { label: "文件编号", prop: "documentCode", width: "120px" },
        {
          label: "标准规范名称",
          prop: "standardName",
        },
        { label: "标准号", prop: "standardCode" },
        { label: "生效日期", prop: "effectiveDate" },
        { label: "作废日期", prop: "cancelDate" },
        { label: "备注", prop: "note" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.openAdd("编辑", row);
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
            },
          ],
        },
      ],
      page0: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading0: false,
      title: '新增',
      addForm: {},
      addDia: false,
      addRules: {
        documentName: [{ required: true, message: "请输入外来文件名称", trigger: "blur" }],
        documentCode: [
          { required: true, message: "请输入文件编号", trigger: "blur" },
        ],
      },
      uploading: false,
    }
  },
  // 用于上传文件的信息
@@ -170,12 +250,13 @@
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordTotal.exportManageRecordVerify
      return this.javaApi + '/manageRecordVerify/exportManageRecordVerify'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getList()
    this.getList0()
  },
  methods: {
    getPower() {
@@ -217,11 +298,65 @@
      this.addPower = add
      this.upPower = up
    },
    handleAdd0() {
      this.$refs.ValueTable0.openAddDia(this.$api.manageRecordTotal.addManageRecordVerify);
    openAdd(title, row) {
      this.title = title;
      if (row) {
        this.addForm = row;
      } else {
        this.addForm = {};
      }
      this.addDia = true;
    },
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageManageRecordTotal({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    getList0() {
      this.tableLoading0 = true;
      let param = { ...this.page0 };
      delete param.total;
      pageManageRecordVerify({ ...param })
        .then((res) => {
          this.tableLoading0 = false;
          if (res.code === 200) {
            this.tableData0 = res.data.records;
            this.page0.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading0 = false;
        });
    },
    pagination0({ page, limit }) {
      this.pag0.current = page;
      this.page0.size = limit;
      this.getList0();
    },
    refresh() {
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.refreshTable()()
      this.page.current = 1;
      this.getList();
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
@@ -241,15 +376,10 @@
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.$refs['ValueTable0'].selectList()
        this.getList0();
      } else {
        this.$message.error('上传失败');
      }
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
    },
    submitCheck(type) { },
    // 查看
@@ -260,19 +390,12 @@
    // 公用方法
    commonFun(row, callbanck) {
      this.currentInfo = row
      this.componentData0.entity.manageRecordTotalId = row.id
      this.$axios.post(this.$api.manageRecordTotal.pageManageRecordVerify, {
        entity: this.componentData0.entity,
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }, noQs: true
      pageManageRecordVerify({
        current: -1,
        size: -1,
        manageRecordTotalId: row.id
      }).then(res => {
        this.currentInfo.arr = res.data.body.records
        this.currentInfo.arr = res.data.records
        this.lookDialogVisible = true
        if (callbanck) {
          callbanck()
@@ -280,11 +403,8 @@
      }).catch(err => { });
    },
    handleDown0(row) {
      let url = this.javaApi + 'word/' + row.url
      const link = document.createElement('a');
      link.href = url;
      link.download = row.month + ' 外来文件确认记录';
      link.click();
      let url = this.javaApi + '/word/' + row.url
      this.$download.saveAs(url, '外来文件确认记录')
    },
    // 提交
    handleSubmit(row) {
@@ -293,7 +413,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.post(this.$api.manageRecordTotal.submitManageRecordTotal, {
        submitManageRecordTotal({
          id: row.id
        }).then(res => {
          this.$message({
@@ -316,7 +436,7 @@
      } else {
        this.noCheckLoading = true
      }
      this.$axios.post(this.$api.manageRecordTotal.ratifyManageRecordTotal, {
      ratifyManageRecordTotal({
        id: this.currentInfo.id,
        ratifyState: state
      }).then(res => {
@@ -330,6 +450,59 @@
        this.refreshTable()()
        this.lookDialogVisible = false
      }).catch(err => { });
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delManageRecordVerify({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.getList0()
          });
        })
        .catch(() => { });
    },
    submitProduct(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.uploading = true;
          if (this.title == "新增") {
            addManageRecordVerify(this.addForm)
              .then((res) => {
                this.uploading = false;
                if (res.code != 200) {
                  return;
                }
                this.$message.success("提交成功");
                this.getList0()
                this.addDia = false;
              })
              .catch((err) => {
                this.uploading = false;
              });
          } else {
            doManageRecordVerify(this.addForm)
              .then((res) => {
                this.uploading = false;
                if (res.code != 200) {
                  return;
                }
                this.$message.success("提交成功");
                this.getList0()
                this.addDia = false;
              })
              .catch((err) => {
                this.uploading = false;
              });
          }
        } else {
          return false;
        }
      });
    },
  }
}
@@ -356,7 +529,7 @@
}
.search_label {
  width: 110px;
  width: 30px;
  font-size: 14px;
  text-align: right;
}
@@ -367,9 +540,8 @@
.table {
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 140px);
  padding: 20px;
  height: 100%;
  margin-top: 10px;
}
>>>.el-tabs__content {
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -1,29 +1,18 @@
<template>
  <!-- 文件定期审查记录 -->
  <div class="PeriodicDocumentReviewRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">文件定期审查记录</el-col>
      <!-- <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-upload :action="action" :show-file-list="false"
          accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
          :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="medium">导入</el-button></el-upload>
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col> -->
    </el-row>
    <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
      <el-tab-pane label="填写" name="填写" style="height: 100%;">
        <div class="search">
          <div class="search_thing">
            <div class="search_label">文件名称:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                v-model="componentData.entity.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
                v-model="queryParams.documentName" @keyup.enter.native="refreshTable()"></el-input></div>
          </div>
          <div class="search_thing">
            <div class="search_label">文件编号:</div>
            <div class="search_input">
              <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentCode"
              <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
                @keyup.enter.native="refreshTable()"></el-input>
            </div>
          </div>
@@ -32,17 +21,19 @@
            <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
          </div>
          <div class="btns">
            <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
            <el-button size="small" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
            <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
              :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp"
              style="display:inline-block;margin-left: 20px;">
              <el-button type="primary" size="medium">导入</el-button></el-upload>
              <el-button type="primary" size="small">导入</el-button></el-upload>
          </div>
        </div>
        <div class="table">
          <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
          <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
            :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
            :delUrl="$api.manageRecordIntervals.delManageRecordIntervals" :componentData="componentData"
            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> -->
        </div>
      </el-tab-pane>
      <el-tab-pane label="历史记录" name="历史记录" style="height: 100%;">
@@ -50,8 +41,8 @@
          <div class="search_thing">
            <div class="search_label">年:</div>
            <div class="search_input">
              <el-date-picker v-model="componentData0.entity.year" type="year" placeholder="选择年" format="yyyy"
                value-format="yyyy" size="small" @change="refreshTable()">
              <el-date-picker v-model="queryParams0.year" type="year" placeholder="选择年" format="yyyy"
                value-format="yyyy" size="small" @change="refreshTable(1)">
              </el-date-picker>
            </div>
          </div>
@@ -61,8 +52,10 @@
          </div>
        </div>
        <div class="table">
          <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
            :componentData="componentData0" :key="upIndex" />
          <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
            :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
            :componentData="componentData0" :key="upIndex" /> -->
        </div>
      </el-tab-pane>
    </el-tabs>
@@ -139,12 +132,25 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
import { getToken } from "@/utils/auth";
import {
  exportOutManageRecordIntervals,
  addManageRecordIntervals,
  doManageRecordIntervals,
  ratifyManageRecordIntervalsTotal,
  submitManageRecordIntervalsTotal,
  pageManageRecordIntervals,
  pageManageRecordIntervalsTotal,
  delManageRecordIntervals,
} from '@/api/cnas/systemManagement/documentRecords.js'
import {
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
export default {
  components: {
    ValueTable,
    limsTable,
    filePreview
  },
  data() {
@@ -270,6 +276,112 @@
      fileList: [],
      typeList: [],
      currentInfo: {},
      queryParams: {},
      tableData: [],
      column: [
        { label: "文件名称", prop: "documentName" },
        { label: "文件编号", prop: "documentCode", width: "120px" },
        {
          label: "版本号",
          prop: "documentVersion",
        },
        { label: "修订号", prop: "revision" },
        { label: "适宜性", prop: "suitability" },
        { label: "备注", prop: "remark" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleEdit(row);
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
      queryParams0: {},
      tableData0: [],
      column0: [
        { label: "年份", prop: "year" },
        { label: "总数量", prop: "totalNum", width: "120px" },
        {
          label: "拟制人",
          prop: "submitUserName",
        },
        { label: "拟制日期", prop: "submitDate" },
        { label: "批准人", prop: "ratifyUserName" },
        { label: "批准日期", prop: "ratifyDate" },
        { label: "批准结果", prop: "ratifyState" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.handleLook(row);
              },
              disabled: (row) => {
                return !row.url
              },
            },
            {
              name: "下载",
              type: "text",
              clickFun: (row) => {
                this.handleDown0(row);
              },
              disabled: (row) => {
                return !row.url
              },
            },
            {
              name: "提交",
              type: "text",
              clickFun: (row) => {
                this.handleSubmit(row);
              },
              disabled: (row) => {
                return !!row.submitUserName && row.ratifyState != '不通过'
              },
            },
            {
              name: "批准",
              type: "text",
              clickFun: (row) => {
                this.handleApproval(row);
              },
              disabled: (row) => {
                return (!row.submitUserName || !!row.ratifyUserName) && row.ratifyState != '不通过'
              },
            },
          ],
        },
      ],
      page0: {
        total: 0,
        size: 10,
        current: 0,
      },
    }
  },
  // 用于上传文件的信息
@@ -280,13 +392,14 @@
      }
    },
    action() {
      return this.javaApi + this.$api.manageRecordIntervals.exportInManageRecordIntervals
      return this.javaApi + '/manageRecordIntervals/exportInManageRecordIntervals'
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getPower()
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getList()
    this.getList0()
    this.getFileList()
    this.selectEnumByCategory()
  },
@@ -345,31 +458,74 @@
    // 导出
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordIntervals.exportOutManageRecordIntervals, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordIntervals(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件定期审查记录';
        link.click();
        this.$download.saveAs(url, "文件定期审查记录");
      })
    },
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageManageRecordIntervals({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    getList0() {
      this.tableLoading = true;
      let param = { ...this.queryParams0, ...this.page0 };
      delete param.total;
      pageManageRecordIntervalsTotal({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData0 = res.data.records;
            this.page0.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination0({ page, limit }) {
      this.page0.current = page;
      this.page0.size = limit;
      this.getList0();
    },
    refreshTable(num) {
      if (num) {
        this.$refs['ValueTable0'].selectList()
        this.page0.current = 1;
        this.getList0();
      } else {
        this.refreshTable()()
        this.page.current = 1;
        this.getList();
      }
    },
    refresh(num) {
      if (num) {
        this.componentData0.entity = this.HaveJson(this.entityCopy0)
        this.upIndex++
        this.queryParams0 = {};
        this.page0.current = 1;
        this.getList0();
      } else {
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.upIndex++
        this.queryParams = {};
        this.page.current = 1;
        this.getList();
      }
    },
    beforeUpload(file) {
@@ -406,34 +562,21 @@
    },
    // 获取文件列表--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'id',
            order: 'asc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
      }).catch(err => { })
    },
    selectEnumByCategory() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "适宜性"
      }).then(res => {
        this.typeList = res.data
      })
      // 文件类别
      this.getDicts("suitability").then((response) => {
        this.typeList = this.dictToValue(response.data);
      });
    },
    // 提交
    handleAdd() {
@@ -446,18 +589,33 @@
        let { id, documentCode, documentName, documentVersion, revision, suitability, remark } = this.addInfo
        obj = { id, documentCode, documentName, documentVersion, revision, suitability, remark }
      }
      this.$axios.post(this.$api.manageRecordIntervals[this.title == '新增' ? 'addManageRecordIntervals' : 'doManageRecordIntervals'], obj, { headers: { 'Content-Type': 'application/json' }, noQs: true }).then(res => {
        this.addLoading = false
        if (res.code == 201) {
          return
        }
        this.addDialogVisible = false
        this.$message({
          type: 'success',
          message: '操作成功!'
        });
        this.refreshTable()
      }).catch(err => { })
      if (this.title == '新增') {
        addManageRecordIntervals(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      } else {
        doManageRecordIntervals(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
        }).catch(err => { })
      }
    },
    // 修改
    handleEdit(row) {
@@ -471,7 +629,7 @@
      } else {
        this.noCheckLoading = true
      }
      this.$axios.post(this.$api.manageRecordIntervals.ratifyManageRecordIntervalsTotal, {
      ratifyManageRecordIntervalsTotal({
        id: this.currentInfo.id,
        ratifyState: state
      }).then(res => {
@@ -484,7 +642,7 @@
          type: 'success',
          message: '操作成功!'
        });
        this.$refs['ValueTable0'].selectList()
        this.refreshTable(1);
        this.lookDialogVisible = false
      }).catch(err => { });
    },
@@ -501,11 +659,8 @@
      }
    },
    handleDown0(row) {
      let url = this.javaApi + 'word/' + row.url
      const link = document.createElement('a');
      link.href = url;
      link.download = row.month + ' 所有文件定期检查记录';
      link.click();
      let url = this.javaApi + '/word/' + row.url
      this.$download.saveAs(url, "所有文件定期检查记录");
    },
    // 提交
    handleSubmit(row) {
@@ -514,7 +669,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.post(this.$api.manageRecordIntervals.submitManageRecordIntervalsTotal, {
        submitManageRecordIntervalsTotal({
          id: row.id
        }).then(res => {
          if (res.code === 201) return
@@ -522,7 +677,7 @@
            type: 'success',
            message: '提交成功!'
          });
          this.$refs['ValueTable0'].selectList()
          this.refreshTable(1);
        }).catch(err => { });
      })
    },
@@ -530,6 +685,21 @@
    handleApproval(row) {
      this.title0 = '批准'
      this.commonFun(row)
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delManageRecordIntervals({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refreshTable();
          });
        })
        .catch(() => { });
    },
  }
}
@@ -568,9 +738,9 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 140px);
  padding: 20px;
  padding-top: 0;
}
>>>.el-tabs__content {
src/views/CNAS/systemManagement/documentRecords/revisionRecord.vue
@@ -1,28 +1,11 @@
<template>
  <!-- 文件修订申请审批记录 -->
  <div class="DocumentRevisionRequestApprovalRecords">
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;">文件修订申请审批记录</el-col>
      <el-col :span="12" style="text-align: right;">
        <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <!-- <el-upload :action="action" :show-file-list="false"
          accept='.doc,.docx' :headers="headers" :on-change="beforeUpload"
          :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="medium">导入</el-button></el-upload> -->
        <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </el-col>
    </el-row>
    <div class="search">
      <!-- <div class="search_thing">
        <div class="search_label">文件名称:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentName"
            @keyup.enter.native="refreshTable()"></el-input></div>
      </div> -->
      <div class="search_thing">
        <div class="search_label">文件编号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentCode"
          <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode"
            @keyup.enter.native="refreshTable()"></el-input>
        </div>
      </div>
@@ -30,11 +13,15 @@
        <el-button size="small" @click="refresh()">重 置</el-button>
        <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
      </div>
      <div class="btn">
        <el-button size="small" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
        <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
      </div>
    </div>
    <div class="table">
      <ValueTable ref="ValueTable" :url="$api.manageRecordAudit.pageManageRecordAudit"
        :delUrl="$api.manageRecordAudit.delManageRecordAudit" :componentData="componentData"
        :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" />
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
        :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table>
    </div>
    <el-dialog :title="title" :visible.sync="addDialogVisible" width="800px" top="6vh">
      <el-row>
@@ -335,13 +322,28 @@
</template>
<script>
import ValueTable from '@/components/Table/value-table.vue'
import limsTable from "@/components/Table/lims-table.vue";
import { exportHtmlToPDF } from '@/utils/downHtmlToPDF'
import filePreview from '@/components/Preview/filePreview.vue'
import {
  exportOutManageRecordAudit,
  addManageRecordAudit,
  doManageRecordAudit,
  selectCNSAPersonTree,
  ratifyManageRecordAudit,
  pageManageRecordAudit,
  delManageRecordAudit,
} from '@/api/cnas/systemManagement/documentRecords.js'
import {
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
export default {
  components: {
    ValueTable,
    filePreview
    filePreview,
    limsTable
  },
  data() {
    return {
@@ -350,114 +352,6 @@
      outLoading: false,
      lookDialogVisible: false,
      addLoading: false,
      componentData: {
        entity: {
          // documentName: null,
          documentCode: null,
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        // selectMethod: 'handleChangeTask',
        do: [{
          id: 'handleLook',
          font: '查看',
          type: 'text',
          method: 'handleLook'
        }, {
          id: 'handleLook0',
          font: '文件预览',
          type: 'text',
          method: 'handleLook0'
        }, {
          id: 'handleOut',
          font: '下载',
          type: 'text',
          method: 'handleOut'
        }, {
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handleEdit',
          font: '修改',
          type: 'text',
          method: 'handleEdit',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handleRatify',
          font: '批准',
          type: 'text',
          method: 'handleRatify',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework0',
          font: '申请意见',
          type: 'text',
          method: 'handlework0',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework1',
          font: '原定制意见',
          type: 'text',
          method: 'handlework1',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }, {
          id: 'handlework2',
          font: '原审核意见',
          type: 'text',
          method: 'handlework2',
          field: [],
          disabFun: (row, index) => {
            return !!row.ratifyUser
          }
        }],
        tagField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        selectField: {
          // documentType:{
          //   select: []
          // },
          // receiveUserName:{
          //   select: []
          // },
        },
        addUpload: ['signatoryUrl'],
        requiredAdd: [],
        requiredUp: [],
        datePicker: ['receiveDate'],
        noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段
        needSort: [],
        inputType: ''
      },
      entityCopy: {},
      upIndex: 0,
      title: '新增',
      addInfo: {
        method: '修订',
@@ -470,11 +364,121 @@
      file: null,
      title0: '查看',
      currentInfo: {},
      queryParams: {},
      tableData: [],
      column: [
        { label: "文件编号", prop: "documentCode" },
        { label: "章节号", prop: "capter", width: "120px" },
        {
          label: "页码",
          prop: "pages",
        },
        { label: "修订次数", prop: "number" },
        { label: "修改前版本号", prop: "beforeVersion" },
        { label: "修改后版本号", prop: "afterVersion" },
        { label: "修改内容", prop: "alterThing" },
        { label: "修订人", prop: "alterUserName" },
        { label: "批准人", prop: "ratifyUserName" },
        { label: "日期", prop: "date" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.handleLook(row);
              },
            },
            {
              name: "文件预览",
              type: "text",
              clickFun: (row) => {
                this.handleLook0(row);
              },
            },
            {
              name: "下载",
              type: "text",
              clickFun: (row) => {
                this.handleOut(row);
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleEdit(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
            {
              name: "批准",
              type: "text",
              clickFun: (row) => {
                this.handleRatify(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
            {
              name: "申请意见",
              type: "text",
              clickFun: (row) => {
                this.handlework0(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
            {
              name: "原定制意见",
              type: "text",
              clickFun: (row) => {
                this.handlework1(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
            {
              name: "原审核意见",
              type: "text",
              clickFun: (row) => {
                this.handlework2(row);
              },
              disabled: (row) => {
                return !!row.ratifyUser
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getPower()
    this.getList()
    this.getFileList()
    this.getAuthorizedPerson()
    this.selectTreeList()
@@ -543,44 +547,51 @@
    // 导出
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.manageRecordAudit.exportOutManageRecordAudit, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => {
      exportOutManageRecordAudit(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + 'word/' + res.message
        const link = document.createElement('a');
        link.href = url;
        link.download = '文件修订表';
        link.click();
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "文件修订表");
      })
    },
    refreshTable() {
      this.refreshTable()()
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageManageRecordAudit({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.refreshTable()
      this.queryParams = {};
      this.page.current = 1;
      this.getList();
    },
    refreshTable() {
      this.page.current = 1;
      this.getList();
    },
    // 获取文件列表--文件清单
    getFileList() {
      this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, {
        entity: {
          orderBy: {
            field: 'createTime',
            order: 'desc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      pageManageDocumentList({
        current: -1,
        size: -1
      }).then(res => {
        this.fileList = res.data.body.records.map(m => {
        this.fileList = res.data.records.map(m => {
          m.title = m.documentCode
          return m
        })
@@ -600,12 +611,7 @@
          fd.append(m, this.addInfo[m])
        }
        this.addLoading = true
        this.$axios.post(this.$api.manageRecordAudit.addManageRecordAudit, fd, {
          headers: {
            'Content-Type': 'multipart/form-data'
          },
          noQs: true
        }).then(res => {
        addManageRecordAudit(fd).then(res => {
          this.addLoading = false
          if (res.code == 200) {
            this.$message({
@@ -636,12 +642,7 @@
          }
        }
        this.addLoading = true
        this.$axios.post(this.$api.manageRecordAudit.doManageRecordAudit, fd, {
          headers: {
            'Content-Type': 'multipart/form-data'
          },
          noQs: true
        }).then(res => {
        doManageRecordAudit(fd).then(res => {
          this.addLoading = false
          if (res.code == 200) {
            this.refreshTable()
@@ -656,7 +657,7 @@
      }
    },
    getAuthorizedPerson() {
      this.$axios.get(this.$api.user.getUserMenu).then(res => {
      selectUserCondition().then(res => {
        let data = []
        res.data.forEach(a => {
          data.push({
@@ -664,14 +665,12 @@
            value: a.id
          })
        })
        // this.componentData.tagField.receiveUserName.select = data
        // this.componentData.selectField.receiveUserName.select = data
        this.personList = data
      })
    },
    // 查询树形列表
    selectTreeList() {
      this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => {
      selectCNSAPersonTree().then((res) => {
        this.list = res.data[0].children;
      });
    },
@@ -692,15 +691,13 @@
        type: 'warning'
      })
        .then(() => {
          this.$axios
            .post(this.$api.manageRecordAudit.ratifyManageRecordAudit, { id: row.id })
            .then(res => {
              if (res.code === 201) {
                return;
              }
              this.$message.success('操作成功');
              this.refreshTable();
            })
          ratifyManageRecordAudit({ id: row.id }).then(res => {
            if (res.code === 201) {
              return;
            }
            this.$message.success('操作成功');
            this.refreshTable();
          })
            .catch(e => {
              this.$message.error('操作失败');
            });
@@ -744,7 +741,22 @@
    handleLook0(row) {
      this.currentInfo = row;
      this.lookDialogVisible = true
    }
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delManageRecordAudit({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });
        })
        .catch(() => { });
    },
  }
}
</script>
@@ -760,6 +772,7 @@
  height: 80px;
  display: flex;
  align-items: center;
  position: relative;
}
.search_thing {
@@ -781,15 +794,16 @@
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
  padding-top: 0;
}
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}
.tables td {
@@ -845,4 +859,10 @@
>>>.el-dialog__body {
  height: auto;
}
.btn {
  position: absolute;
  right: 20px;
  top: 16px;
}
</style>
src/views/system/user/index.vue
@@ -6,11 +6,15 @@
        <pane size="12">
          <el-col>
            <div class="head-container addButton">
              <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
              <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle @click="addSchema"></el-button>
              <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search"
                style="margin-bottom: 20px" />
              <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle
                @click="addSchema"></el-button>
            </div>
            <div class="head-container">
              <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
              <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
                :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
                @node-click="handleNodeClick" />
            </div>
          </el-col>
        </pane>
@@ -20,11 +24,13 @@
            <div>
              <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
                <el-form-item label="用户名称" prop="nickName">
                  <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable @keyup.enter.native="handleQuery" />
                  <el-input v-model="queryParams.nickName" placeholder="请输入用户名称" clearable
                    @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item label="状态" prop="status">
                  <el-select v-model="queryParams.status" placeholder="用户状态" clearable>
                    <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
                    <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
                      :value="dict.value" />
                  </el-select>
                </el-form-item>
                <el-form-item>
@@ -34,8 +40,10 @@
              </el-form>
            </div>
            <div class="options_button">
              <el-button type="primary" size="mini" @click="openthirdParty" v-hasPermi="['system:user:add']">获取三方人员</el-button>
              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">新增用户</el-button>
              <el-button type="primary" size="mini" @click="openthirdParty"
                v-hasPermi="['system:user:add']">获取三方人员</el-button>
              <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
                v-hasPermi="['system:user:add']">新增用户</el-button>
            </div>
          </div>
          <el-col>
@@ -45,25 +53,28 @@
              <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
              <el-table-column label="状态" align="center" key="status">
                <template slot-scope="scope">
                  <el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
                  <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
                    @change="handleStatusChange(scope.row)"></el-switch>
                </template>
              </el-table-column>
              <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" />
              <el-table-column label="操作" align="center" width="160" class-nickName="small-padding fixed-width">
                <template slot-scope="scope">
                  <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']">修改</el-button>
<!--                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>-->
<!--                  <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
<!--                    <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
<!--                    <el-dropdown-menu slot="dropdown">-->
<!--                      <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
<!--                      <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
<!--                    </el-dropdown-menu>-->
<!--                  </el-dropdown>-->
                  <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']">修改</el-button>
                  <!--                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']">删除</el-button>-->
                  <!--                  <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">-->
                  <!--                    <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
                  <!--                    <el-dropdown-menu slot="dropdown">-->
                  <!--                      <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>-->
                  <!--                      <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>-->
                  <!--                    </el-dropdown-menu>-->
                  <!--                  </el-dropdown>-->
                </template>
              </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
              :limit.sync="queryParams.pageSize" @pagination="getList" />
          </el-col>
        </pane>
      </splitpanes>
@@ -88,7 +99,9 @@
          <el-col :span="12">
            <el-form-item label="状态" prop="status">
              <el-radio-group v-model="form.status">
                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
                <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{
                  dict.label
                }}</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
@@ -102,7 +115,8 @@
          <el-col :span="12">
            <el-form-item label="角色" prop="roleIds">
              <el-select v-model="form.roleIds" multiple placeholder="请选择角色" clearable>
                <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId" :disabled="item.status == 1"></el-option>
                <el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
                  :disabled="item.status == 1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -128,7 +142,8 @@
          <el-col :span="12">
            <el-form-item label="单位" prop="company">
              <el-select v-model="form.company" placeholder="请选择单位" style="width: 100%" clearable>
                <el-option v-for="item in postOptions" :key="item.id" :label="item.company" :value="item.id"></el-option>
                <el-option v-for="item in postOptions" :key="item.id" :label="item.company"
                  :value="item.id"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -136,30 +151,20 @@
        <el-row>
          <el-col :span="12">
            <el-form-item label="签名">
              <el-upload
                class="avatar-uploader"
                :action="uploadAction"
                :show-file-list="false"
                accept=".png, .jpg, .jpeg, .gif"
                :on-error="handleUploadError"
                :on-success="handleUploadSuccess"
                :before-upload="handleBeforeUpload">
                <img v-if="signatureUrl" :src="signatureUrl" class="avatar" alt="">
              <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
                :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError"
                :on-success="handleUploadSuccess" :before-upload="handleBeforeUpload">
                <img v-if="form.signatureUrl" :src="javaApi + '/img/' + form.signatureUrl" class="avatar" alt="">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="个人照片">
              <el-upload
                class="avatar-uploader"
                :action="uploadAction"
                :show-file-list="false"
                accept=".png, .jpg, .jpeg, .gif"
                :on-error="handleUploadError1"
                :on-success="handleUploadSuccess1"
                :before-upload="handleBeforeUpload1">
                <img v-if="pictureUrl" :src="pictureUrl" class="avatar" alt="">
              <el-upload class="avatar-uploader" :action="uploadAction" :show-file-list="false"
                :headers="upload.headers" accept=".png, .jpg, .jpeg, .gif" :on-error="handleUploadError1"
                :on-success="handleUploadSuccess1" :before-upload="handleBeforeUpload1">
                <img v-if="form.pictureUrl" :src="javaApi + '/img/' + form.pictureUrl" class="avatar" alt="">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
              </el-upload>
            </el-form-item>
@@ -174,7 +179,9 @@
    <!-- 用户导入对话框 -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
      <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
        :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
        :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
        <div class="el-upload__tip text-center" slot="tip">
@@ -182,7 +189,8 @@
            <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
          </div>
          <span>仅允许导入xls、xlsx格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
            @click="importTemplate">下载模板</el-link>
        </div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
@@ -195,24 +203,22 @@
    <el-dialog title="获取人事系统人员信息" :visible.sync="addthirdParty" width="70%">
      <div class="body" v-loading="thirdPartyLoading">
        <el-row>
          <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length!=1">
            <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small"
                      @clear="searchFilter2" @keyup.enter.native="searchFilter2"
                      prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%"/>
          <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length != 1">
            <el-input v-model="search2" placeholder="输入关键字搜索" clearable size="small" @clear="searchFilter2"
              @keyup.enter.native="searchFilter2" prefix-icon="el-icon-search" style="margin-bottom: 20px;width: 90%" />
            <el-tree :data="datathirdParty" node-key="companyId" :props="defaultProps" @node-click="nodeClick2"
                     style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
                     highlight-current>
              style="height: calc(100% - 42px);" @node-expand="nodeOpen0" :filter-node-method="filterNode2" ref="tree2"
              highlight-current>
            </el-tree>
          </el-col>
          <el-col :span="companiesList.length==1?24:16" style="height: 70vh;padding-left: 8px;">
          <el-col :span="companiesList.length == 1 ? 24 : 16" style="height: 70vh;padding-left: 8px;">
            <div style="display: flex;align-items: center;margin-bottom: 10px">
              <span style="width: 140px">员工号/员工姓名:</span>
              <el-input size="small" placeholder="请输入员工号/员工姓名" @clear="searchPerson" clearable v-model="userSearch2"
                        style="width: 50%"
                        @keyup.enter.native="searchPerson()"></el-input>
                style="width: 50%" @keyup.enter.native="searchPerson()"></el-input>
            </div>
            <el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable"
                      @selection-change="handleSelectionChange">
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="50">
              </el-table-column>
              <el-table-column prop="employeeID" label="员工号">
@@ -332,8 +338,6 @@
        url: process.env.VUE_APP_BASE_API + "/system/user/importData"
      },
      uploadAction: process.env.VUE_APP_BASE_API + '/deviceScope/uploadFile',
      signatureUrl: '',
      pictureUrl: '',
      // 查询参数
      queryParams: {
        pageNum: 1,
@@ -361,18 +365,18 @@
        userName: [
          { required: true, message: "请填写账号", trigger: "blur" }
        ],
        nameEn: [
          { required: true, message: "请输入姓名EN", trigger: "blur" }
        ],
        // nameEn: [
        //   { required: true, message: "请输入姓名EN", trigger: "blur" }
        // ],
        status: [
          { required: true, message: "请选择状态", trigger: "change" }
        ],
        roleIds: [
          { required: true, message: "请选择角色", trigger: "change" }
        ],
        password: [
          { required: true, message: "密码不能为空", trigger: "blur" },
        ],
        // password: [
        //   { required: true, message: "密码不能为空", trigger: "blur" },
        // ],
        phonenumber: [
          {
            required: true,
@@ -384,7 +388,7 @@
      },
      // 获取三方人员弹框
      addthirdParty: false,
      thirdPartyLoading:false,
      thirdPartyLoading: false,
      companiesList: [],
      search2: '',
      datathirdParty: [],
@@ -420,18 +424,18 @@
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      }
      );
    },
    // 打开添加架构弹框
    addSchema () {
    addSchema() {
      this.addDia = true
    },
    // 提交架构
    addStandardTree () {
    addStandardTree() {
      if (this.addOb.nickName == null || this.addOb.factory == '') {
        this.$message.error('构架名称是必填项')
        return
@@ -484,11 +488,11 @@
    // 用户状态修改
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function() {
      this.$modal.confirm('确认要"' + text + '""' + row.nickName + '"用户吗?').then(function () {
        return changeUserStatus(row.userId, row.status);
      }).then(() => {
        this.$modal.msgSuccess(text + "成功");
      }).catch(function() {
      }).catch(function () {
        row.status = row.status === "0" ? "1" : "0";
      });
    },
@@ -511,8 +515,12 @@
        sex: undefined,
        status: "0",
        company: '',
        roleIds: []
        roleIds: [],
        signatureUrl: '',
        pictureUrl: ''
      };
      // this.signatureUrl = '';
      // this.pictureUrl = ''
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
@@ -553,21 +561,21 @@
      this.thirdPartyLoading = true;
      selectCompaniesList().then(res => {
        this.companiesList = this.HaveJson(res.data);
        if(this.companiesList.length ==1){
          selectSimpleList({companyId: this.companiesList[0].companyId}).then(res => {
        if (this.companiesList.length == 1) {
          selectSimpleList({ companyId: this.companiesList[0].companyId }).then(res => {
            this.thirdPartyLoading = false;
            this.personListCopy = JSON.parse(JSON.stringify(res.data))
            this.personList = res.data
            this.$refs.personTable.doLayout()
          })
        }else{
        } else {
          this.thirdPartyLoading = false;
        }
        this.datathirdParty = this.tranListToTreeData(res.data, "ROOT");
      }).catch(() => {
        this.thirdPartyLoading = false;
      })
      if(this.componentData.entity.roleId > 10000)this.$message.warning('由于未选中具体角色,新增用户将成为默认角色')
      if (this.componentData.entity.roleId > 10000) this.$message.warning('由于未选中具体角色,新增用户将成为默认角色')
    },
    tranListToTreeData(list, rootValue) {
      const arr = [];
@@ -597,7 +605,7 @@
      this.getNodeParent(node)
      if (ob.companyId !== 'SC21') {
        this.personLoad = true
        selectSimpleList({companyId: ob.companyId}).then(res => {
        selectSimpleList({ companyId: ob.companyId }).then(res => {
          this.personListCopy = JSON.parse(JSON.stringify(res.data))
          this.personList = res.data
          this.personLoad = false
@@ -677,6 +685,7 @@
      const userId = row.userId || this.ids;
      getUser(userId).then(response => {
        this.form = response.data;
        this.form.password = ''
        this.roleOptions = response.roles;
        this.$set(this.form, "roleIds", response.roleIds);
        this.open = true;
@@ -697,18 +706,18 @@
          }
        },
      }).then(({ value }) => {
          resetUserPwd(row.userId, value).then(response => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        }).catch(() => {});
        resetUserPwd(row.userId, value).then(response => {
          this.$modal.msgSuccess("修改成功,新密码是:" + value);
        });
      }).catch(() => { });
    },
    /** 分配角色操作 */
    handleAuthRole: function(row) {
    handleAuthRole: function (row) {
      const userId = row.userId;
      this.$router.push("/system/user-auth/role/" + userId);
    },
    /** 提交按钮 */
    submitForm: function() {
    submitForm: function () {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.userId != undefined) {
@@ -730,12 +739,12 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
        return delUser(userIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
      }).catch(() => { });
    },
    /** 下载模板操作 */
    importTemplate() {
@@ -781,14 +790,14 @@
      // 如果上传成功
      if (res.code == 200) {
        // 获取富文本组件实例
        let quill = this.Quill;
        // 获取光标所在位置
        let length = quill.getSelection().index;
        // 插入图片  res.url为服务器返回的图片地址
        quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // 调整光标到最后
        quill.setSelection(length + 1);
        this.signatureUrl = res.data.url
        // let quill = this.Quill;
        // // 获取光标所在位置
        // let length = quill.getSelection().index;
        // // 插入图片  res.url为服务器返回的图片地址
        // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // // 调整光标到最后
        // quill.setSelection(length + 1);
        this.form.signatureUrl = res.data.url
      } else {
        this.$message.error("图片插入失败");
      }
@@ -819,14 +828,14 @@
      // 如果上传成功
      if (res.code == 200) {
        // 获取富文本组件实例
        let quill = this.Quill;
        // 获取光标所在位置
        let length = quill.getSelection().index;
        // 插入图片  res.url为服务器返回的图片地址
        quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // 调整光标到最后
        quill.setSelection(length + 1);
        this.pictureUrl = res.data.url
        // let quill = this.Quill;
        // // 获取光标所在位置
        // let length = quill.getSelection().index;
        // // 插入图片  res.url为服务器返回的图片地址
        // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
        // // 调整光标到最后
        // quill.setSelection(length + 1);
        this.form.pictureUrl = res.data.url
      } else {
        this.$message.error("图片插入失败");
      }
@@ -842,10 +851,12 @@
.search_form {
  display: flex;
  justify-content: space-between;
  .options_button {
    margin-top: 3px;
  }
}
.avatar-uploader ::v-deep .el-upload {
  border: 1px dashed #666666;
  border-radius: 6px;
@@ -853,9 +864,11 @@
  position: relative;
  overflow: hidden;
}
.avatar-uploader ::v-deep .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 20px;
  color: #8c939d;
@@ -864,11 +877,13 @@
  line-height: 90px;
  text-align: center;
}
.avatar {
  width: 90px;
  height: 90px;
  display: block;
}
.addButton {
  display: flex;
  align-items: flex-start;