| | |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.title = "编辑"; |
| | | this.addForm = row; |
| | | this.addForm.structureTestObjectId = JSON.parse( |
| | | this.addForm.structureTestObjectId |
| | | ); |
| | | this.addDlog = true; |
| | | this.openEdit(row) |
| | | }, |
| | | }, |
| | | { |
| | |
| | | this.queryParams = {}; |
| | | this.getList(); |
| | | }, |
| | | // 权限分配 |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem("power")); |
| | | let up = false; |
| | | let del = false; |
| | | let add = false; |
| | | let inPower = false; |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == "addStandardMethod") { |
| | | add = true; |
| | | } |
| | | if (power[i].menuMethod == "delStandardMethod") { |
| | | del = true; |
| | | } |
| | | if (power[i].menuMethod == "upStandardMethod") { |
| | | up = true; |
| | | } |
| | | if (power[i].menuMethod == "importStandardDetails") { |
| | | inPower = true; |
| | | } |
| | | } |
| | | this.addPower = add; |
| | | this.inPower = inPower; |
| | | }, |
| | | openAdd() { |
| | | this.title = "新增"; |
| | | this.addForm = {}; |
| | | this.addDlog = true; |
| | | }, |
| | | openEdit(row) { |
| | | this.title = "编辑"; |
| | | this.addDlog = true; |
| | | this.addForm = this.HaveJson(row) |
| | | this.addForm.structureTestObjectId = JSON.parse( |
| | | this.addForm.structureTestObjectId |
| | | ); |
| | | }, |
| | | getQualificationList() { |
| | | this.getDicts("cnas_method_qualification").then((response) => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 删除 |
| | | handleDelete(row) { |
| | | this.$confirm("是否删除该条数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | |
| | | }) |
| | | .then(() => { |
| | | delStandardMethod({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.getList(); |
| | | }); |