| | |
| | | }); |
| | | } |
| | | |
| | | // 给标准树添加检验标准 |
| | | export function addStandardMethodList(data) { |
| | | return request({ |
| | | url: "/standardTree/addStandardMethodList", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 添加标准树 |
| | | export function addStandardTree(data) { |
| | | return request({ |
| | |
| | | }); |
| | | } |
| | | |
| | | // 删除标准树下的检验标准 |
| | | export function delStandardMethodByFLSSM(data) { |
| | | return request({ |
| | | url: "/standardTree/delStandardMethodByFLSSM", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 删除标准树下的检验标准 |
| | | export function delStandardProductByIds(data) { |
| | | return request({ |
| | | url: "/standardTree/delStandardProductByIds", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 新增标准树下的检验项目 |
| | | export function addStandardProduct(data) { |
| | | return request({ |
| | | url: "/standardTree/addStandardProduct", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 通过检验标准查询检验项目 |
| | | export function selectStandardProductListByMethodId(query) { |
| | |
| | | obtainItemParameterList, |
| | | selectTestObjectByName, |
| | | selectStandardMethods, |
| | | addStandardMethodList, |
| | | addStandardTree, |
| | | updateStandardTree, |
| | | selectsStandardMethodByFLSSM, |
| | | upStandardProductList, |
| | | delStandardMethodByFLSSM, |
| | | delStandardProductByIds, |
| | | addStandardProduct, |
| | | selectStandardProductListByMethodId, |
| | | updateSection, |
| | | upStandardProducts, |
| | |
| | | this.selectTestObjectByName(); |
| | | this.selectStandardMethods(); |
| | | this.selectEnumByCategoryForSonLaboratory(); |
| | | this.selectEnumByCategoryForsampleType(); |
| | | this.getStandardTemplate(); |
| | | this.selectStandardMethodsSec(); |
| | | this.token = { |
| | |
| | | this.standardEnum = data; |
| | | }); |
| | | }, |
| | | addStandardMethodList() { |
| | | if (this.standardId == null || this.standardId == "") { |
| | | this.$message.error("标准方法未选择"); |
| | | return; |
| | | } |
| | | this.addLoad2 = true; |
| | | addStandardMethodList({ |
| | | standardId: this.standardId, |
| | | tree: this.selectTree, |
| | | }).then((res) => { |
| | | this.addLoad2 = false; |
| | | this.addStandardDia = false; |
| | | this.$message.success("添加成功"); |
| | | this.selectsStandardMethodByFLSSM(); |
| | | }); |
| | | }, |
| | | // 提交分类添加 |
| | | addStandardTree() { |
| | | if (this.addOb.sampleType == null || this.addOb.sampleType == "") { |
| | |
| | | this.$message.success("已保存"); |
| | | }); |
| | | }, |
| | | delStandardMethodByFLSSM(id) { |
| | | this.$confirm("是否删除当前数据?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.tableLoad = true; |
| | | delStandardMethodByFLSSM({ id: id }).then((res) => { |
| | | if (res.code == 201) { |
| | | return; |
| | | } |
| | | this.$message.success("已删除"); |
| | | this.selectsStandardMethodByFLSSM(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selects = []; |
| | | val.forEach((a) => { |
| | | this.selects.push(a.id); |
| | | }); |
| | | }, |
| | | delStandardProductByIds() { |
| | | if (this.selects.length == 0) { |
| | | this.$message.error("未选中数据"); |
| | | return; |
| | | } |
| | | this.$confirm( |
| | | "是否删除当前选中 " + this.selects.length + " 条数据?", |
| | | "警告", |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.tableLoad = true; |
| | | delStandardProductByIds({ |
| | | ids: JSON.stringify(this.selects), |
| | | }).then((res) => { |
| | | if (res.code == 201) { |
| | | return; |
| | | } |
| | | this.$message.success("已删除"); |
| | | this.selectsStandardMethodByFLSSM(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | addStandardProductDo() { |
| | | let selects = this.$refs.ValueTable.multipleSelection; |
| | | if (selects.length == 0) { |
| | | this.$message.error("未选择数据"); |
| | | return; |
| | | } |
| | | let select = []; |
| | | selects.forEach((a) => { |
| | | select.push(a.id); |
| | | }); |
| | | this.tableLoad = true; |
| | | addStandardProduct({ |
| | | ids: JSON.stringify(select), |
| | | tree: this.selectTree, |
| | | }).then((res) => { |
| | | if (res.code == 201) { |
| | | return; |
| | | } |
| | | this.$message.success("添加成功"); |
| | | this.selectsStandardMethodByFLSSM(); |
| | | }); |
| | | this.addProductDia = false; |
| | | }, |
| | | |
| | | refreshList() { |
| | | this.batchCopyDia = false; |
| | | const index = this.standardList.findIndex( |