| | |
| | | }, |
| | | beforTree() { |
| | | safetyInspectionItemTree().then((res) => { |
| | | console.log(res); |
| | | this.tree = res.data.result; |
| | | }); |
| | | }, |
| | | safetyInspectionItemL(data) { |
| | | // console.log(data) |
| | | this.listQuery.filter.elementB = data.value; |
| | | safetyInspectionItemList(this.listQuery).then((res) => { |
| | | // console.log(res.data.result.records); |
| | | this.list = res.data.result.records; |
| | | }); |
| | | }, |
| | |
| | | } else { |
| | | this.disabled = true; |
| | | var i = this.list.findIndex((item) => item.id == id); |
| | | console.log(id); |
| | | this.form = this.list[i]; |
| | | } |
| | | }, |
| | |
| | | async safetySelfInspectionL() { |
| | | var res = await safetySelfInspectionList(this.listQuery).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res.data); |
| | | this.list = res.data.result.records; |
| | | this.recordTotal = res.data.result.total; |
| | | this.pageSize = res.data.result.size; |
| | |
| | | }); |
| | | }, |
| | | handleClick(val) { |
| | | console.log(val) |
| | | if(val.status==-1){ |
| | | this.$router.push({ |
| | | path:"/new", |
| | |
| | | methods: { |
| | | async elementManagementL() { |
| | | var res = await elementManagementList(this.listQuery); |
| | | console.log(res); |
| | | if (res.data.code == 200) { |
| | | this.list = res.data.result.records; |
| | | this.recordTotal = res.data.result.total |
| | |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | getParentElement().then(res=>{ |
| | | // console.log('父类:',res) |
| | | this.parent=res.data.result |
| | | }) |
| | | if (type == "新增") { |
| | |
| | | methods: { |
| | | safeInitem(id) { |
| | | safetySelfInspectionInfo({ id: id }).then((res) => { |
| | | // console.log("数据", res); |
| | | if (res.data.code == 200) this.list = res.data.result; |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | for (var i = 0; i < arr.length; i++) { |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | } |
| | | this.lists = arr; |
| | | console.log(this.lists) |
| | | }); |
| | | }, |
| | | checkSameDataA(resData) { |
| | |
| | | return list; |
| | | }, |
| | | handleClick(data) { |
| | | console.log(data.id); |
| | | this.$router.push({ |
| | | path: "/review", |
| | | query: { |
| | |
| | | ></el-tree> |
| | | </div> |
| | | </div> |
| | | <div class="box-right" v-if="list == '' ? false : true"> |
| | | <div class="box-right" v-if="lists == '' ? false : true"> |
| | | <div class="btns"> |
| | | <el-button type="primary" class="btn" @click="open(0)" |
| | | >添加</el-button |
| | |
| | | safetySelfInspectionInfo({ id: id }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.form = res.data.result; |
| | | console.log(res.data.result); |
| | | this.list = res.data.result; |
| | | var trees = []; |
| | | for (var i = 0; i < this.list.itemList.length; i++) { |
| | |
| | | cser.push(capB) |
| | | } |
| | | arr[i].id=cser |
| | | console.log('tag', capB) |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | } |
| | | this.lists = arr; |
| | | console.log(this.lists); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | handleClick(data) { |
| | | this.dialogVisible = true; |
| | | this.form = data; |
| | | console.log(data); |
| | | }, |
| | | lost() { |
| | | this.dialogVisible = false; |
| | |
| | | }, |
| | | safetyInspectionItemA() { |
| | | safetyInspectionItemMod(this.form).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | | type: "success", |