“zhuo”
2023-08-10 312b055ee75a14d90201e9de9024927de49d7d8b
8.10
已修改7个文件
已添加1个文件
394 ■■■■■ 文件已修改
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.staging 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/CNAS/reviewAnnualPlan.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/reviewAnnualPlan/index.vue 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/planAssignments/index.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/reportAuditing/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://192.168.110.254:1234/'
VUE_APP_BASE_API = 'http://localhost:1234/'
.env.production
@@ -3,5 +3,5 @@
# base api
# VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://192.168.110.254:1234/'
VUE_APP_BASE_API = 'http://localhost:1234/'
.env.staging
@@ -5,6 +5,6 @@
# base api
# VUE_APP_BASE_API = '/stage-api'
VUE_APP_BASE_API = 'http://192.168.110.254:1234/'
VUE_APP_BASE_API = 'http://localhost:1234/'
src/api/CNAS/reviewAnnualPlan.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
import request from '@/utils/request'
//查询审查计划
export function selectAllList(params) {
  return request({
    url: '/cnasAnnualPlan/selectAllList',
    method: 'get',
    params
  })
}
//新增审查计划
export function addCnasAnnualPlan(data) {
    return request({
      url: '/cnasAnnualPlan/addCnasAnnualPlan',
      method: 'post',
      data
    })
  }
src/views/CNAS/reviewAnnualPlan/index.vue
@@ -1,5 +1,278 @@
<template>
    <div>
        å®¡æ ¸å¹´åº¦è®¡åˆ’
  <div class="content-main">
    <div class="top-bar">
      <el-form ref="form" :inline="true">
        <el-form-item>
          <el-date-picker
            v-model="input"
            type="date"
            placeholder="请选择查询日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="getData()">查询</el-button>
          <el-button type="primary" plain @click="resetData()">重置</el-button>
        </el-form-item>
      </el-form>
      <el-form>
        <!-- ä¸Šä¼ é™„ä»¶ -->
        <el-button
          class="rightBtn"
          type="primary"
          icon="el-icon-upload2"
          @click="dialogFormVisible1 = true"
          >上传附件</el-button
        >
        <el-dialog title="新增计划" :visible.sync="dialogFormVisible1">
          <el-form :model="uploadingForm">
            <el-form-item label="审核日期:" :label-width="formLabelWidth">
              <el-date-picker
                v-model="uploadingForm.auditTime"
                type="date"
                placeholder="请选择日期"
                autocomplete="off"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="录入人:" :label-width="formLabelWidth">
              <el-input
                v-model="uploadingForm.keyboarder"
                autocomplete="off"
                placeholder="请输入录入人"
              ></el-input>
            </el-form-item>
            <el-form-item label="上传附件:" :label-width="formLabelWidth">
              <el-input
                v-model="uploadingForm.attachment"
                autocomplete="off"
              ></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible1 = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="dialogFormVisible1 = false"
              >ç¡® å®š</el-button
            >
          </div>
        </el-dialog>
        <!-- ä¸Šä¼ è®¡åˆ’ -->
        <el-button
          class="rightBtn"
          type="primary"
          icon="el-icon-document-add"
          @click="addPlan"
          >新增计划</el-button
        >
        <el-button
          class="rightBtn"
          type="primary"
          icon="el-icon-document-checked"
          >导出年度计划</el-button
        >
        <el-button
          class="rightBtn"
          type="primary"
          icon="el-icon-document-checked"
          >导出内部实施计划</el-button
        >
      </el-form>
    </div>
    <div class="library-table">
      <div class="table-box">
        <el-table
          ref="auditTable"
          border
          :max-height="800"
          :cell-style="{ textAlign: 'center' }"
          :header-cell-style="{
            border: '0px',
            background: '#f5f7fa',
            color: '#606266',
            boxShadow: 'inset 0 1px 0 #ebeef5',
            textAlign: 'center',
          }"
          :data="auditTable"
          style="width: 100%"
        >
          <el-table-column type="index" label="序号" min-width="30px">
            <template>
              <el-checkbox type="checkbox" />
            </template>
          </el-table-column>
          <el-table-column prop="year" label="年度" min-width="60px" />
          <el-table-column prop="month" label="月度" min-width="60px" />
          <el-table-column prop="planTime" label="计划时间" min-width="100px" />
          <el-table-column prop="auditType" label="性质" min-width="80px">
            <template slot-scope="scope">
              <span>
                {{ scope.row.auditType == 0 ? "内审" : "管理评审" }}
              </span>
            </template>
          </el-table-column>
          <el-table-column prop="department" label="部门" min-width="80px" />
          <el-table-column
            prop="auditLeader"
            label="审核组长"
            min-width="80px"
          />
          <el-table-column prop="auditEmp" label="组员" min-width="80px" />
          <el-table-column
            prop="auditPurpose"
            label="审核目的"
            min-width="100px"
          />
          <el-table-column
            prop="auditScope"
            label="审核范围"
            min-width="100px"
          />
          <el-table-column
            prop="auditPursuant"
            label="审核依据"
            min-width="100px"
          />
          <el-table-column prop="writeUser" label="编制人" min-width="80px" />
          <el-table-column prop="createTime" label="编制日期" min-width="100px">
          </el-table-column>
          <el-table-column prop="keyboarder" label="录入人" min-width="80px" />
          <el-table-column prop="checker" label="检验人" min-width="80px" />
          <el-table-column
            prop="auditTime"
            label="审核日期"
            min-width="100px"
          />
          <el-table-column prop="count" label="不符合项目数" min-width="60px" />
          <el-table-column prop="auditState" label="状态" min-width="100px">
            <template slot-scope="scope">
              <div v-if="scope.row.auditState === 0">
                <el-tag class="tag-item" type="warning">即将开始</el-tag>
              </div>
              <div v-else-if="scope.row.auditState === 1">
                <el-tag class="tag-item" type="success">完成</el-tag>
              </div>
              <div v-else>
                <el-tag class="tag-item" type="danger">逾期</el-tag>
              </div>
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="100" fixed="right">
            <template slot-scope="scope">
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >查看</el-button
              >
              <el-button type="text" size="small">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- åˆ†é¡µå™¨ -->
        <div>
          <el-pagination
            :current-page="page"
            :page-sizes="[10, 20, 30, 40]"
            :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { selectAllList, addCnasAnnualPlan } from "@/api/CNAS/reviewAnnualPlan";
export default {
  data() {
    return {
      input: [],
      auditTable: [],
      page: 1,
      total: 0,
      pageSize: 10,
      dialogFormVisible1: false,
      uploadingForm: {
        auditTime: "",
        keyboarder: "",
        keyboarder: "",
      },
      formLabelWidth: "80px",
    };
  },
  created() {
    this.getData();
  },
  methods: {
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.getData();
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.page = val;
      this.getData();
    },
    // é‡ç½®æŒ‰é’®
    resetData() {
      this.input = undefined;
      this.page = 1;
      this.pageSize = 10;
      this.getData();
    },
    // æŸ¥è¯¢åˆ—表
    async getData() {
      const params = {
        page: this.page,
        pageSize: this.pageSize,
      };
      const { data } = await selectAllList(params);
      this.auditTable = data.row;
      this.total = data.total;
    },
  },
};
</script>
<style lang="scss" scoped>
.top-bar {
  margin: -25px -15px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  padding: 5px 24px 0px 24px;
}
.library-table {
  background-color: #fff;
  flex: 1;
  margin: 0px -15px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  .table-box {
    padding: 0px 20px;
    margin-top: 20px;
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    > div:nth-child(2) {
      display: flex;
      justify-content: end;
      margin: 10px 0;
    }
    .tag-item {
      width: 80px;
    }
  }
}
</style>
src/views/experiment/checkTheReport/index.vue
@@ -216,7 +216,7 @@
  }
  .el-dropdown-link {
    cursor: pointer;
    color: #409EFF;
    color: #409eff;
  }
  .el-icon-arrow-down {
    font-size: 12px;
@@ -250,6 +250,5 @@
      margin: 10px 0;
    }
  }
}
</style>
src/views/experiment/planAssignments/index.vue
@@ -6,7 +6,7 @@
          <el-select
            v-model="searchData.devicename"
            placeholder="全部"
            style="width: 100px"
            style="width: 120px"
          >
            <el-option
              v-for="item in options1"
@@ -21,6 +21,7 @@
          <el-date-picker
            v-model="searchData.time"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="~"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
@@ -31,7 +32,7 @@
          <el-select
            v-model="searchData.person"
            placeholder="全部"
            style="width: 80px; margin-right: 100px"
            style="width: 100px; margin-right: 100px"
          >
            <el-option
              v-for="item in options2"
@@ -43,10 +44,14 @@
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" plain style="margin-right: 10px"
          <el-button
            type="primary"
            plain
            style="margin-right: 10px"
            @click="resetData()"
            >重置</el-button
          >
          <el-button type="primary">查询</el-button>
          <el-button type="primary" @click="getData()">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -154,38 +159,76 @@
    return {
      searchData: {
        devicename: "",
        time: "",
        time: [],
        person: "",
      },
      options1: [],
      options2: [],
      planTable: [],
      planTableView: [],
    };
  },
  created() {
    this.getData();
  },
  methods: {
    // æŸ¥è¯¢åˆ—表
    async getData() {
      const params = {};
      const params = {
        device: this.searchData.devicename
          ? this.searchData.devicename
          : undefined,
        user: this.searchData.person ? this.searchData.person : undefined,
        beginTime:
          this.searchData.time && this.searchData.time.length > 0
            ? this.searchData.time[0]
            : undefined,
        endTime:
          this.searchData.time && this.searchData.time.length > 0
            ? this.searchData.time[1]
            : undefined,
      };
      const { data } = await selectAllPlan(params);
      this.planTable = data;
      this.planTable.forEach((res) => {
        let o1 = {
          value: res.device,
          label: res.device,
        };
        this.options1.push(o1);
        if(res.userId == undefined) {
        }
      });
      let d=this.options1.filter((val,index,self)=>{
        return self.indexOf(val)==index;
      })
      console.log(d);
      if (this.options1.length === 0) {
        //添加设备名称
        const deviceData = [];
        this.planTable.forEach((res) => {
          if (!deviceData.includes(res.device)) {
            deviceData.push(res.device);
          }
        });
        deviceData.forEach((item) => {
          this.options1.push({
            value: item,
            label: item,
          });
        });
        //添加用户
        const userData = [];
        this.planTable.forEach((res) => {
          if (res.checker != undefined && !userData.includes(res.checker)) {
            userData.push(res.checker);
          }
        });
        userData.forEach((item) => {
          this.options2.push({
            value: item,
            label: item,
          });
        });
        console.log(this.options2);
      }
    },
    // é‡ç½®æŒ‰é’®
    resetData() {
      (this.searchData = {
        devicename: "",
        time: [],
        person: "",
      }),
        this.getData();
    },
  },
};
@@ -216,7 +259,7 @@
  height: 78vh;
  .formwrapper {
    padding: 0px 20px;
    margin-top: 0px;
    margin-top: 20px;
    flex: 1;
    background: #fff;
    /* padding: 20px 20px 10px 20px; */
src/views/experiment/reportAuditing/index.vue
@@ -2,7 +2,7 @@
  <div class="content-main">
    <div class="top-bar">
      <el-form ref="form" :inline="true">
        <el-form-item class="sermargin">
        <el-form-item>
          <el-input
            v-model="input"
            class="input-form"