Merge remote-tracking branch 'remotes/origin/shf' into master
| | |
| | | name: [ |
| | | { required: true, message: "预案名称不能为空", trigger: "change" }, |
| | | ], |
| | | // remark: [ |
| | | // { required: true, message: "备注不能为空", trigger: "blur" }, |
| | | // ], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | }); |
| | | if (type === "新增") { |
| | | this.title = "新增"; |
| | | this.form = { |
| | | name: "", |
| | | fileType: 0, |
| | | fileList: [], |
| | | remark: "", |
| | | }; |
| | | this.form = {}; |
| | | this.fileUrl=""; |
| | | this.fileName=""; |
| | | this.fileList=[] |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | |
| | | this.form.fileList=this.fileList |
| | | } |
| | | if (this.form.fileType==1){ |
| | | let file={ |
| | | fileUrl:this.fileUrl, |
| | | fileName:this.fileName |
| | | let fileList = [] |
| | | if (this.fileUrl!=""){ |
| | | let file={ |
| | | fileUrl:this.fileUrl, |
| | | fileName:this.fileName |
| | | } |
| | | fileList.push(file) |
| | | } |
| | | this.form.fileList=[file] |
| | | this.form.fileList=fileList |
| | | } |
| | | if (this.title === "新增") { |
| | | emergencyPlanAdd(this.form).then((res) => { |
| | |
| | | message: "新增成功", |
| | | title: "成功", |
| | | }); |
| | | }else{ |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } |
| | |
| | | message: "编辑成功", |
| | | title: "成功", |
| | | }); |
| | | }else{ |
| | | this.$message.error(res.data.message); |
| | | } |
| | | }); |
| | | } |
| | |
| | | </div> |
| | | |
| | | <el-dialog :title="titleN" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :model="formInline" label-width="80px"> |
| | | <el-form-item label="名称"> |
| | | <el-form ref="form" :rules="rules" :model="formInline" label-width="80px"> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="说明"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="listCel">取 消</el-button> |
| | | <el-button type="primary" class="btns" @click="listAdd" |
| | | >确 定</el-button |
| | | > |
| | |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "名称不能为空", trigger: "change" }, |
| | | ],} |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | 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]; |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | coAdd(val, type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.titleN = type; |
| | | if (type == "新增") { |
| | | this.dialogVisible = true; |
| | |
| | | } |
| | | }, |
| | | listAdd() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.titleN == "新增") { |
| | | this.form.deductionList.push(this.formInline); |
| | | this.dialogVisible = false; |
| | |
| | | this.form.deductionList[this.index].space = this.formInline.space; |
| | | this.dialogVisible = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | listDel(val) { |
| | | var i = this.form.deductionList.findIndex( |
| | |
| | | } |
| | | }); |
| | | }, |
| | | listCel(){ |
| | | this.dialogVisible = false; |
| | | }, |
| | | btnsQX() { |
| | | this.show = true; |
| | | }, |
| | |
| | | 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", |
| | |
| | | v-model="form.parentId" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | :disabled="title=='编辑'?true:false" |
| | | > |
| | | <el-option |
| | | v-for="item in parent" |
| | |
| | | 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 == "新增") { |
| | |
| | | }); |
| | | }, |
| | | deleteById(val) { |
| | | console.log(123,val) |
| | | this.$confirm('确认删除吗','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | |
| | | <template> |
| | | <div> |
| | | <div class="box-right"> |
| | | <div v-for="(item, index) in lists" :key="index"> |
| | | <div v-for="(item, index) in lists" :key="index" style="padding:0 0 20px 0"> |
| | | <div class="title"> |
| | | A级要素:<span>{{ item.elementAName }}</span> |
| | | </div> |
| | |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="评审结果"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="(scope.row.safetyInspectionItemResult = 0)" |
| | | <span v-if="(scope.row.safetyInspectionItemResult== 0)" |
| | | >是</span |
| | | > |
| | | <span v-if="(scope.row.safetyInspectionItemResult = 1)" |
| | | <span v-if="(scope.row.safetyInspectionItemResult == 1)" |
| | | >否</span |
| | | > |
| | | </template> |
| | |
| | | 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 |
| | |
| | | >暂存</el-button |
| | | > |
| | | </div> |
| | | <div v-for="(item, i) in lists" :key="i"> |
| | | <div v-for="(item, i) in lists" :key="i" style="padding:0 0 20px 0"> |
| | | <div class="title"> |
| | | A级要素:<span>{{ item.elementAName }}</span> |
| | | </div> |
| | |
| | | <el-col :span="6" :offset="1" |
| | | ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col |
| | | > |
| | | <el-col :span="6" :offset="4" |
| | | <!-- <el-col :span="6" :offset="4" |
| | | ><p><span>得分:</span>50</p></el-col |
| | | > |
| | | > --> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22" :offset="1"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="添加" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :model="form" label-width="100px"> |
| | | <el-form-item label="自查清单名称"> |
| | | <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-input v-model="form.inspectionName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检查人名称"> |
| | | <el-form-item label="检查人名称" prop="type"> |
| | | <el-select |
| | | v-model="form.inspector" |
| | | style="width: 100%" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="时间"> |
| | | <el-form-item label="时间" prop="time"> |
| | | <el-col :span="11"> |
| | | <el-date-picker |
| | | type="date" |
| | |
| | | label: "label", |
| | | }, |
| | | itemId: "", |
| | | parent: [], |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "要素名称不能为空", trigger: "change" }, |
| | | ], |
| | | type: [ |
| | | { required: true, message: "级别不能为空", trigger: "change" }, |
| | | ], |
| | | time: [ |
| | | { required: true, message: "父要素不能为空", trigger: "change" }, |
| | | ] |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | 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); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | } |
| | | } else if (this.id == "编辑") { |
| | | this.list = res.data.result; |
| | | if(this.list.length!=0){ |
| | | var capA = { elementAName: "", id: [], child: [] }; |
| | | var atte = []; |
| | | capA.elementAName = this.list[0].elementAName; |
| | |
| | | ); |
| | | this.lists.splice(i, 1); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | |
| | | } |
| | | }, |
| | | open(type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.dialogVisible = true; |
| | | this.form.status = type; |
| | | var arr = []; |
| | | console.log("数据", this.lists); |
| | | for (var i = 0; i < this.lists.length; i++) { |
| | | this.lists[i].id; |
| | | for (var j = 0; j < this.lists[i].id.length; j++) { |
| | |
| | | }); |
| | | }, |
| | | addC() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.id == "添加") { |
| | | safetySelfInspectionAdd(this.form).then((res) => { |
| | | if (res.data.code == 200) { |
| | |
| | | path:"/checklistself" |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | btnsQX() { |
| | | this.show = true; |
| | |
| | | }); |
| | | }, |
| | | modItem() { |
| | | if(this.list.safetyInspectionItemResult!=null){ |
| | | safetySelfInspectionModItemInfo(this.list).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | |
| | | }); |
| | | } |
| | | }); |
| | | }else{ |
| | | this.$confirm('是否否决项未选择','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }, |
| | | back() { |
| | | this.$router.push({ |
| | |
| | | handleClick(data) { |
| | | this.dialogVisible = true; |
| | | this.form = data; |
| | | console.log(data); |
| | | }, |
| | | lost() { |
| | | this.dialogVisible = false; |
| | |
| | | </div> |
| | | |
| | | <el-dialog title="扣分详情" :visible.sync="dialogVisible" :close-on-click-modal="false" width="30%"> |
| | | <el-form ref="form" :model="formInline" label-width="54px"> |
| | | <el-form-item label="说明"> |
| | | <el-form ref="form" :rules="rules" :model="formInline" label-width="54px"> |
| | | <el-form-item label="说明" prop="name"> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | |
| | | <el-button type="primary" class="btns" @click="listAdd" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="bacQx">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | name: "", |
| | | remark: "", |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | { required: true, message: "说明不能为空", trigger: "change" }, |
| | | ],} |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query.id; |
| | | console.log('tagee',this.$route.query) |
| | | this.safeT(this.id); |
| | | }, |
| | | methods: { |
| | |
| | | }); |
| | | }, |
| | | coAdd(val, type) { |
| | | this.$nextTick(() => { |
| | | this.$refs["form"].clearValidate(); |
| | | }); |
| | | this.titleN = type; |
| | | if (type == "新增") { |
| | | this.dialogVisible = true; |
| | |
| | | } |
| | | }, |
| | | listAdd() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.titleN == "新增") { |
| | | this.form.deductionList.push(this.formInline); |
| | | this.dialogVisible = false; |
| | |
| | | this.form.deductionList[this.index].space = this.formInline.space; |
| | | this.dialogVisible = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | listDel(val) { |
| | | var i = this.form.deductionList.findIndex( |
| | |
| | | }, |
| | | safetyInspectionItemA() { |
| | | safetyInspectionItemMod(this.form).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | | type: "success", |
| | |
| | | path:"/new" |
| | | }) |
| | | }, |
| | | bacQx(){ |
| | | this.dialogVisible = false; |
| | | this.safeT(this.id); |
| | | }, |
| | | handleClick() { |
| | | this.dialogVisible = true; |
| | | }, |