Fixiaobai
2023-09-07 efcf450e8e7e375ef4ffe9f421ec0d34c5378180
src/views/standardLibrary/index.vue
@@ -4,13 +4,13 @@
         <div class="library-bom" style="width: 300px">
            <el-row :gutter="10">
               <el-col :span="19">
               <el-input clearable v-model="filterText" placeholder="输入关键字进行过滤"></el-input>
               <el-input size="small" clearable v-model="filterText" placeholder="输入关键字进行过滤"></el-input>
               </el-col>
               <el-col :span="5">
                  <el-button type="primary" icon="el-icon-plus" @click="addTreeFormVisible = true"></el-button>
                  <el-button size="small" type="primary" icon="el-icon-plus" @click="addTreeFormVisible = true"></el-button>
               </el-col>
            </el-row>
            <el-button type="text">全部</el-button>
            <el-button size="small" type="text">全部</el-button>
            <el-tree ref="tree" style="width: 100%" class="filter-tree" :data="standardTree" :props="defaultProps"
               node-key="id" :highlight-current="true" :default-expand-all="true" :filter-node-method="filterNode"
               :render-content="renderContent" @node-click="nodeClick" />
@@ -19,13 +19,13 @@
            <div class="table-header">
               <div class="serve-btn">
                  <span class="tipMsg">{{ msg !== "" ? msg : "" }}</span>
                  <el-select v-model="versionValue" @change="changeSelect" placeholder="请选择版本号">
                  <el-select size="small" v-model="versionValue" @change="changeSelect" placeholder="请选择版本号">
                     <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                  </el-select>
                  <el-button type="primary" @click="addVersionFun">新增版本号</el-button>
                  <el-button type="primary" @click="centerDialogVisible = true">新增项目</el-button>
                  <el-button class="top_div_button" icon="el-icon-delete-solid" style="color: #00a5ff"
                  <el-button size="small" type="primary" @click="addVersionFun">新增版本号</el-button>
                  <el-button size="small" type="primary" @click="centerDialogVisible = true">新增项目</el-button>
                  <el-button size="small" class="top_div_button" icon="el-icon-delete-solid" style="color: #00a5ff"
                     @click="deleteListClick">删除</el-button>
               </div>
            </div>
@@ -181,7 +181,9 @@
            formTypeOptions: [],
            addTreeForm: {
               addTypeArr: [],
               specificationsName: ""
               specificationsName: "",
               materialName: "",
               standardName: "",
            }
         };
      },
@@ -584,12 +586,29 @@
            });
         },
         async requiredOnfocus(scope) {
            console.log(scope);
            let obj = {
               id: scope.row.id,
               required: scope.row.required,
               internal: scope.row.internal,
            };
            };
            let internal=obj.internal.charAt(0)
            let required=obj.required.charAt(0)
            let arr=['>','<','='];
            if(!arr.includes(required)){
               this.$message({
                    message: '标准值参数不符合!',
                    type: 'warning'
                  });
                return
            }
            if(!arr.includes(internal)){
               this.$message({
                      message: '内控值参数不符合!',
                      type: 'warning'
                    });
                return
            }
            await blurUpdateApi(obj).then((res) => {
               this.$message({
                  message: res.message,