Merge remote-tracking branch 'remotes/origin/shf' into master
| | |
| | | alarmInfo: { required: true, message: "请输入报警信息", trigger: "change"}, |
| | | }, |
| | | equipmentName:[], |
| | | unitIdOptions:[{label:"已处理",value:0},{label:"未处理",value:1}], |
| | | unitIdOptions:[{label:"未处理",value:0},{label:"已处理",value:1}], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.title = "新增"; |
| | | this.form = { |
| | | equipmentId: "", |
| | | status:'', |
| | | status:0, |
| | | remark:"", |
| | | alarmTime:"", |
| | | alarmInfo:"" |
| | | }; |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }, |
| | | AddelementManagement() { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | title: "成功", |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | |
| | | }; |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | | console.log(123,this.form) |
| | | console.log(222,this.equipmentName) |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }, |
| | | AddelementManagement() { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | |
| | | }; |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }, |
| | | AddelementManagement() { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }) |
| | |
| | | } |
| | | }, |
| | | coAdd(val, type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.titleN = type; |
| | | if (type == "新增") { |
| | | this.dialogVisible = true; |
| | |
| | | this.index = this.form.deductionList.findIndex( |
| | | (item) => item.name == val.name |
| | | ); |
| | | this.formInline = val; |
| | | this.formInline=JSON.parse(JSON.stringify(val)); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | }, |
| | | listAdd() { |
| | | this.$refs["form"].validate((valid) => { |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <el-input v-model="listQuery.filter.inspectionName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查时间"> |
| | | <el-date-picker |
| | | |
| | | <el-col :span="11"> |
| | | <el-date-picker |
| | | style="width:100%" |
| | | v-model="listQuery.filter.inspectionStartTime" |
| | | type="date" |
| | | format="yyyy 年 MM 月 dd 日" |
| | | placeholder="选择日期" |
| | | format="yyyy-MM-dd" |
| | | placeholder="选择开始日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-col> |
| | | <el-col style="text-align:center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-date-picker |
| | | v-model="listQuery.filter.inspectionEndTime" |
| | | style="width:100%" |
| | | type="date" |
| | | format="yyyy-MM-dd" |
| | | placeholder="选择结束日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | }; |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }, |
| | | AddelementManagement() { |
| | |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | // message: res.data.message, |
| | | message: "当前A级要素仍然有已绑定的B级要素,无法删除" |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | |
| | | ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><p><span>得分:</span>50</p></el-col |
| | | ><p><span>总分:</span>50</p></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><p><span>得分:</span>{{item.point}}</p></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-table border :data="item.child"> |
| | | <el-table border :data="item.child" :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}"> |
| | | <el-table-column |
| | | prop="standardizationRequirements" |
| | | align="center" |
| | |
| | | <el-table-column align="center" label="评审结果"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="(scope.row.safetyInspectionItemResult== 0)" |
| | | >是</span |
| | | >否决</span |
| | | > |
| | | <span v-if="(scope.row.safetyInspectionItemResult == 1)" |
| | | >否</span |
| | | >扣分</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="" |
| | | prop="remark" |
| | | align="center" |
| | | label="备注" |
| | | ></el-table-column> |
| | |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | } |
| | | this.lists = arr; |
| | | // console.log('tag', arr) |
| | | }); |
| | | }, |
| | | checkSameDataA(resData) { |
| | |
| | | if (!dataInfo[elementBName]) { |
| | | dataInfo[elementBName] = { |
| | | elementBName, |
| | | point:"", |
| | | child: [], |
| | | }; |
| | | } |
| | | dataInfo[elementBName].child.push(item); |
| | | }); |
| | | let list = Object.values(dataInfo); // list 转换成功的数据 |
| | | console.log(list) |
| | | for(var i=0;i<list.length;i++){ |
| | | var pot=50 |
| | | for(var j=0;j<list[i].child.length;j++){ |
| | | if(list[i].child[j].safetyInspectionItemResult!=0){ |
| | | pot=pot-list[i].child[j].selfDeductionList[0].point |
| | | }else{ |
| | | var cont=0 |
| | | pot=0 |
| | | } |
| | | } |
| | | if(pot>0){ |
| | | list[i].point=pot |
| | | }else{ |
| | | list[i].point=0 |
| | | } |
| | | } |
| | | return list; |
| | | }, |
| | | handleClick(data) { |
| | |
| | | .titles { |
| | | font-size: 14px; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22" :offset="1"> |
| | | <el-table ref="table" border :data="item.child"> |
| | | <el-table ref="table" border :stripe="true" :data="item.child" :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}"> |
| | | <el-table-column |
| | | prop="standardizationRequirements" |
| | | align="center" |
| | |
| | | type="expand" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-table :data="scope.row.deductionList"> |
| | | <el-table :data="scope.row.deductionList" :cell-style="{background:'#fff',color:'#606266'}"> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | align="center" |
| | | label="扣分" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | prop="remark" |
| | | align="center" |
| | | label="扣分备注" |
| | | > |
| | |
| | | </div> |
| | | <el-dialog :title="id" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :rules="rules" :model="form" label-width="110px"> |
| | | <el-form-item label="自查清单名称" prop="name"> |
| | | <el-form-item label="自查清单名称" prop="inspectionName"> |
| | | <el-input v-model="form.inspectionName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检查人名称" prop="type"> |
| | | <el-form-item label="检查人名称" prop="inspector"> |
| | | <el-select |
| | | v-model="form.inspector" |
| | | style="width: 100%" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="时间" prop="time"> |
| | | <el-form-item label="时间" prop="inspectionTime"> |
| | | <el-col :span="11"> |
| | | <el-date-picker |
| | | type="date" |
| | | format="yyyy 年 MM 月 dd 日" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="开始时间" |
| | | v-model="form.inspectionTime" |
| | | style="width: 100%" |
| | |
| | | class="dialog-footer" |
| | | > |
| | | <el-button type="primary" class="btn" @click="addC">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="closeDialog">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | }, |
| | | itemId: "", |
| | | parent: [], |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "要素名称不能为空", trigger: "change" }, |
| | | ], |
| | | type: [ |
| | | { required: true, message: "级别不能为空", trigger: "change" }, |
| | | ], |
| | | time: [ |
| | | { required: true, message: "父要素不能为空", trigger: "change" }, |
| | | ] |
| | | }, |
| | | rules: { |
| | | inspectionName: [{required: true, message: '自查清单名称不能为空', trigger: 'blur'}], |
| | | inspector: [{required: true, message: '检查人名称为空', trigger: 'blur'}], |
| | | inspectionTime: [{required: true, message: '检查时间不能为空', trigger: 'blur'}], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.TreeA(); |
| | | safetyInspectionItemName().then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.nameList = res.data.result; |
| | | } |
| | | }); |
| | | this.id = this.$route.query.name; |
| | | this.itemId = this.$route.query.id; |
| | | this.itemInfo(this.$route.query.id); |
| | |
| | | trees.push(this.list.itemList[i].elementA); |
| | | } |
| | | this.treeList = Array.from(new Set(trees)); |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | for (var i = 0; i < arr.length; i++) { |
| | | var capB = { |
| | | var cser=[] |
| | | for(var j=0;j<arr[i].child.length;j++){ |
| | | var capB = { |
| | | safetySelfInspectionId: "", |
| | | safetyInspectionItemId: "", |
| | | } |
| | | var cser=[] |
| | | for(var j=0;j<arr[i].child.length;j++){ |
| | | capB.safetySelfInspectionId=arr[i].child[j].safetySelfInspectionId |
| | | capB.safetyInspectionItemId=arr[i].child[j].safetyInspectionItemId |
| | | cser.push(capB) |
| | |
| | | }, |
| | | TreeB(id) { |
| | | safetyInspectionItemTreeB({ id: id }).then((res) => { |
| | | this.list = []; |
| | | // this.list = []; |
| | | if (this.id == "添加") { |
| | | if (res.data.code == 200) { |
| | | this.list = res.data.result; |
| | |
| | | if(this.list.length!=0){ |
| | | var capA = { elementAName: "", id: [], child: [] }; |
| | | var atte = []; |
| | | |
| | | capA.elementAName = this.list[0].elementAName; |
| | | for (var i = 0; i < this.list.length; i++) { |
| | | var capB = { |
| | | var capB = { |
| | | safetySelfInspectionId: "", |
| | | safetyInspectionItemId: "", |
| | | }; |
| | |
| | | this.$router.push({ |
| | | path: "/reviewXG", |
| | | query: { |
| | | id: data.safetyInspectionItemId, |
| | | idX: data.safetyInspectionItemId, |
| | | name:this.id, |
| | | id:this.itemId |
| | | }, |
| | | }); |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/reviewXG", |
| | | query: { |
| | | id: data.id, |
| | | idX: data.id, |
| | | name:this.id, |
| | | id:this.itemId |
| | | }, |
| | | }); |
| | | } |
| | | }, |
| | | open(type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.dialogVisible = true; |
| | | this.form.status = type; |
| | | console.log("xxxxx",this.lists) |
| | | var arr = []; |
| | | for (var i = 0; i < this.lists.length; i++) { |
| | | this.lists[i].id; |
| | | // this.lists[i].id; |
| | | for (var j = 0; j < this.lists[i].id.length; j++) { |
| | | arr.push(this.lists[i].id[j]); |
| | | } |
| | | } |
| | | this.form.itemList = arr; |
| | | safetyInspectionItemName().then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.nameList = res.data.result; |
| | | } |
| | | }); |
| | | }, |
| | | closeDialog(){ |
| | | this.dialogVisible = false |
| | | }, |
| | | addC() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.id == "添加") { |
| | | console.log("添加",this.form) |
| | | safetySelfInspectionAdd(this.form).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.dialogVisible = false; |
| | |
| | | } |
| | | }); |
| | | } else if (this.id == "编辑") { |
| | | console.log('编辑',this.form) |
| | | safetySelfInspectionMod(this.form).then((res) => { |
| | | this.dialogVisible = false; |
| | | this.$notify({ |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <el-dialog title="扣分详情" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :model="form" label-width="54px"> |
| | | <el-form-item label="说明"> |
| | | <el-input disabled="true" v-model="form.name"></el-input> |
| | | <el-input :disabled="true" v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="扣分值"> |
| | | <el-input v-model="form.point"></el-input> |
| | |
| | | class="dialog-footer" |
| | | style="text-align: center; display: block" |
| | | > |
| | | <el-button type="primary" class="btns" @click="dialogVisible = false" |
| | | <el-button type="primary" class="btns" @click="addC" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="lost()">取 消</el-button> |
| | |
| | | dialogVisible: false, |
| | | id: "", |
| | | form: {}, |
| | | list: [], |
| | | list: {}, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | modItem() { |
| | | if(this.list.safetyInspectionItemResult!=null){ |
| | | console.log(this.list) |
| | | safetySelfInspectionModItemInfo(this.list).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | |
| | | }, |
| | | handleClick(data) { |
| | | this.dialogVisible = true; |
| | | this.form = data; |
| | | // this.form = data; |
| | | this.form=JSON.parse(JSON.stringify(data)); |
| | | }, |
| | | addC(){ |
| | | if(this.form.point<=50){ |
| | | for(let i = 0;i<this.list.selfDeductionList.length;i++){ |
| | | if (this.form.id=this.list.selfDeductionList[i].id){ |
| | | this.list.selfDeductionList[i].point = this.form.point |
| | | this.list.selfDeductionList[i].remark = this.form.remark |
| | | } |
| | | } |
| | | }else{ |
| | | alert("扣分不得超过总分50") |
| | | } |
| | | this.dialogVisible = false; |
| | | }, |
| | | lost() { |
| | | this.dialogVisible = false; |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | name: "", |
| | | remark: "", |
| | | }, |
| | | name:"", |
| | | typeid:'', |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "说明不能为空", trigger: "change" }, |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query.id; |
| | | this.id = this.$route.query.idX; |
| | | this.typeid=this.$route.query.id; |
| | | this.name = this.$route.query.name |
| | | this.safeT(this.id); |
| | | }, |
| | | methods: { |
| | |
| | | this.index = this.form.deductionList.findIndex( |
| | | (item) => item.name == val.name |
| | | ); |
| | | this.formInline = val; |
| | | // this.formInline = val; |
| | | this.formInline=JSON.parse(JSON.stringify(val)); |
| | | } |
| | | }, |
| | | listAdd() { |
| | |
| | | title: "成功", |
| | | }); |
| | | this.$router.push({ |
| | | path:"/new" |
| | | path:"/new", |
| | | query:{ |
| | | name:this.name, |
| | | id:this.typeid |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message({ |
| | |
| | | }, |
| | | back(){ |
| | | this.$router.push({ |
| | | path:"/new" |
| | | path:"/new", |
| | | query:{ |
| | | name:this.name, |
| | | id:this.typeid |
| | | } |
| | | }) |
| | | }, |
| | | bacQx(){ |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | | </style> |