XiaoRuby
2023-08-28 8231542d77a49f80a49434be6ca8bfb3ae9e1efe
8-28
已修改3个文件
97 ■■■■■ 文件已修改
src/views/basicData/index.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/personnel/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standardLibrary/index.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/index.vue
@@ -52,12 +52,8 @@
          width="30%"
          right
          :before-close="handleClose"
          :title="isUpdate ? '更新' : '新增'"
        >
          <template slot="title">
            <div class="addTop">
              <span>{{ isUpdate ? "更新" : "新增" }}基础数据</span>
            </div>
          </template>
          <el-form :model="form" :rules="rules" ref="ruleForm" class="addForm">
            <el-form-item prop="material" required>
              <span>样品名称:</span>
@@ -387,13 +383,13 @@
      });
    },
    handleSelectionChange(val) {
      this.deleteList = []
      this.deleteList = [];
      val.forEach((v) => {
        if(v.id !== undefined) {
          this.deleteList.push(v.id)
          this.deleteList.push(v.id);
        }
      })
      console.log(`output->this.deleteList`,this.deleteList)
      });
      console.log(`output->this.deleteList`, this.deleteList);
    },
    // 表格树全部选中配置  结束
    deleteListClick() {
@@ -458,12 +454,6 @@
  position: relative;
  padding: 0 10px 10px 10px;
}
.el-dialog__header {
  padding: 0;
}
.el-dialog__headerbtn {
  top: 0;
}
.el-dialog__close {
  padding: 8px 0;
  color: #ffffff !important;
@@ -479,20 +469,6 @@
}
.el-dialog__body {
  padding: 30px 20px 0 20px;
}
.addTop {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background-color: #00a5ff;
  color: #ffffff;
  padding: 8px 20px;
  float: left;
  height: 30px;
  width: 100%;
}
.addTop span {
  font-size: 16px;
  font-weight: 700;
}
.table_div {
  margin-top: 10px;
src/views/laboratory/personnel/index.vue
@@ -86,7 +86,7 @@
              <el-select
                v-model="form.roleId"
                clearable
                width="100%"
                style="width: 100%"
                placeholder="请选择权限"
              >
                <el-option
src/views/standardLibrary/index.vue
@@ -25,7 +25,11 @@
        <div class="table-header">
          <div class="serve-btn">
            <span class="tipMsg">{{ msg !== "" ? msg : "" }}</span>
            <el-select v-model="versionValue" @change="changeSelect" placeholder="请选择版本号">
            <el-select
              v-model="versionValue"
              @change="changeSelect"
              placeholder="请选择版本号"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
@@ -34,7 +38,9 @@
                >
              </el-option>
            </el-select>
            <el-button type="primary" @click="addVersionFun">新增版本号</el-button>
            <el-button type="primary" @click="addVersionFun"
              >新增版本号</el-button
            >
            <el-button
              type="primary"
              icon="el-icon-plus"
@@ -172,7 +178,7 @@
  deleteListApi,
  blurUpdateApi,
  getVersion,
  addVersion
  addVersion,
} from "@/api/standardLibrary";
import { selectproductModelApi } from "@/api/basicData/index";
@@ -180,7 +186,7 @@
  data() {
    return {
      options:[],
      versionValue: '',
      versionValue: "",
      deleteList: [],
      msg: "",
      isAllSelect: false,
@@ -213,21 +219,21 @@
  created() {
    this.getStandardTree();
  },
  mounted(){
  },
  mounted() {},
  methods: {
    async initSelect(){
        this.options = [];
        this.versionValue = "";
        const response = await getVersion({"specificationsId":this.selectData.id});
      const response = await getVersion({
        specificationsId: this.selectData.id,
      });
        if(response.code===200 && response.data.length>0){
          this.getTableByClick(this.selectData,response.data[0])
        this.getTableByClick(this.selectData, response.data[0]);
          for(let i=0;i<response.data.length;i++){
            this.options.push({
              value: response.data[i],
              label: "V" + response.data[i]
            })
            label: "V" + response.data[i],
          });
            this.versionValue = response.data[0];
          }
        }
@@ -237,23 +243,25 @@
      this.getTableByClick(this.selectData,this.versionValue);
    },
    async insertVersion(){
      const resp = await addVersion({"specificationsId":this.selectData.id});
      const resp = await addVersion({ specificationsId: this.selectData.id });
      if(resp.code===200){
        this.initSelect();
        this.$message({
            type: 'success',
            message: resp.message
          type: "success",
          message: resp.message,
          });
      }
    },
     addVersionFun() {
        this.$confirm('确认添加新的版本号吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
      this.$confirm("确认添加新的版本号吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.insertVersion();
        }).catch(() => {});
        })
        .catch(() => {});
    },
    filterNode(value, data) {
      if (!value) return true;
@@ -327,7 +335,7 @@
    async getTableByClick(data,versionVal) {
      await getProductList({
        specificationsId: data.id,
        version: versionVal
        version: versionVal,
      }).then((res) => {
        res.data.forEach((i) => {
          if (i.name === undefined) {
@@ -349,10 +357,9 @@
      this.$router.push(`/standardLibrary/SpecificationDetails/${row.id}`);
    },
    renderContent(h, { node, data, store }) {
      // console.log('data', data)
      // console.log('node', node)
      // 判断是否是父节点或文件夹
      const isFolder = "children" in data;
      console.log(`output->data`, isFolder);
      return (
        <span class="tree-node">
          {isFolder ? (
@@ -499,13 +506,13 @@
      });
    },
    handleSelectionChange(val) {
      this.deleteList = []
      this.deleteList = [];
      val.forEach((v) => {
        if(v.id !== undefined){
          this.deleteList.push(v.id)
          this.deleteList.push(v.id);
        }
      })
      console.log(`output->this.deleteList`,this.deleteList)
      });
      console.log(`output->this.deleteList`, this.deleteList);
    },
    // 表格树全部选中配置  结束
    deleteListClick() {