| | |
| | | <template> |
| | | <div> |
| | | <div class="box-right"> |
| | | <el-button type="primary" style="float: right" @click="finish()">结单</el-button> |
| | | <div v-for="(item, index) in lists" :key="index" style="padding:0 0 20px 0"> |
| | | <div class="title"> |
| | | A级要素:<span>{{ item.elementAName }}</span> |
| | |
| | | </template> |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import { safetySelfInspectionInfo } from "@/api/safetySelfInspection.js"; |
| | | import { safetySelfInspectionInfo ,safetySelfInspectionFinish} from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | | data() { |
| | |
| | | this.safeInitem(this.id); |
| | | }, |
| | | methods: { |
| | | finish(){ |
| | | let id = this.id |
| | | this.$confirm('确定要结单吗?','提示',{ |
| | | confirmButtonText:'确定', |
| | | cancelButtonText:'取消', |
| | | type:'warning', |
| | | }).then(()=> { |
| | | safetySelfInspectionFinish({id:this.id}).then(res=>{ |
| | | console.log(123,res) |
| | | if (res.data.code === '200') { |
| | | this.$notify({ |
| | | title:'成功', |
| | | message:'结单成功', |
| | | type:'success', |
| | | duration:2000, |
| | | }) |
| | | }else{ |
| | | this.$message({ |
| | | message:res.data.message, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }) |
| | | }).catch(error =>{ |
| | | }) |
| | | }, |
| | | |
| | | safeInitem(id) { |
| | | safetySelfInspectionInfo({ id: id }).then((res) => { |
| | | if (res.data.code == 200) this.list = res.data.result; |