| | |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export function safetySelfInspectionFinish(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/safetySelfInspection/finish', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="状态"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.status == -1">暂存</span> |
| | | <span v-if="scope.row.status == 0">评审中</span> |
| | | <span v-if="scope.row.status == 1">已评审</span> |
| | | <span v-if="scope.row.status == 0">暂存</span> |
| | | <span v-if="scope.row.status == 1">评审中</span> |
| | | <span v-if="scope.row.status == 2">已评审</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="updateTime" label="更新时间"> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.status==-1" @click="handleClick(scope.row)" type="text" size="small" |
| | | <el-button v-if="scope.row.status==0" @click="handleClick(scope.row)" type="text" size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button v-if="scope.row.status==0" @click="handleClick(scope.row)" type="text" size="small" |
| | | <el-button v-if="scope.row.status==1" @click="handleClick(scope.row)" type="text" size="small" |
| | | >去评审</el-button |
| | | > |
| | | <el-button v-if="scope.row.status==1" @click="handleClick(scope.row)" type="text" size="small" |
| | | <el-button v-if="scope.row.status==2" @click="handleClick(scope.row)" type="text" size="small" |
| | | >查看</el-button |
| | | > |
| | | <el-button @click="Del(scope.row.id)" v-if="scope.row.status==1?false:true" type="text" size="small" style="color: red" |
| | |
| | | <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; |
| | |
| | | </div> |
| | | <div class="box-right" v-if="lists == '' ? false : true"> |
| | | <div class="btns"> |
| | | <el-button type="primary" class="btn" @click="open(0)" |
| | | <el-button type="primary" class="btn" @click="open(1)" |
| | | >添加</el-button |
| | | > |
| | | <el-button type="primary" class="btn" @click="open(-1)" |
| | | <el-button type="primary" class="btn" @click="open(0)" |
| | | >暂存</el-button |
| | | > |
| | | </div> |
| | |
| | | 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 cser=[] |
| | | for(var j=0;j<arr[i].child.length;j++){ |
| | | for(var j=0;j<arr[i].child.length;j++){ |
| | | var capB = { |
| | | safetySelfInspectionId: "", |
| | | safetyInspectionItemId: "", |
| | |
| | | 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 = { |
| | |
| | | query: { |
| | | idX: data.safetyInspectionItemId, |
| | | name:this.id, |
| | | id:this.itemId |
| | | id:this.itemId |
| | | }, |
| | | }); |
| | | } else { |
| | |
| | | query: { |
| | | idX: data.id, |
| | | name:this.id, |
| | | id:this.itemId |
| | | id:this.itemId |
| | | }, |
| | | }); |
| | | } |
| | |
| | | open(type) { |
| | | 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; |