Merge remote-tracking branch 'remotes/origin/shf' into master
| | |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export function safetySelfInspectionFinish(data) { |
| | | return request({ |
| | | headers:{ |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API+'/safetySelfInspection/finish', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | meta: { title: '仪表实时数据', icon: '' } |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | { |
| | | id: 2, |
| | | parentId: 0, |
| | | path: '/accidentHidden', |
| | | component: Layout, |
| | | name: '事故隐患排查治理', |
| | | meta: { title: '事故隐患排查治理', icon: 'el-icon-facilities' }, |
| | | children: [ |
| | | { |
| | | id: 1, |
| | | parentId: 0, |
| | | path: '/majorHidden', |
| | | name: '重大隐患整改进度', |
| | | component: () => import('@/views/accidentHidden/majorHidden'), |
| | | meta: { title: '重大隐患整改进度', icon: '' } |
| | | }, |
| | | { |
| | | path: '/hiddenDangerList', |
| | | // name: '重大隐患整改进度-发送隐患单', |
| | | component: () => import('@/views/accidentHidden/hiddenDangerList'), |
| | | // meta: { title: '重大隐患整改进度-发送隐患单', icon: '' } |
| | | hidden: true |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | export default new Router({ |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style=""> |
| | | <Titlename title="发送隐患单"></Titlename> |
| | | <div class="whole-form"> |
| | | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm" |
| | | style="margin: 0 14% 0 16%;"> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="隐患编号:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="检查单位:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查人:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="检查人:" prop="region">--> |
| | | <!-- <el-select v-model="ruleForm.region" placeholder="请选择活动区域">--> |
| | | <!-- <el-option label="区域一" value="shanghai"></el-option>--> |
| | | <!-- <el-option label="区域二" value="beijing"></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="陪检人员:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查时间:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="检查时间:" prop="name">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="value1"--> |
| | | <!-- type="date"--> |
| | | <!-- placeholder="选择日期">--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="班次:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="跟班、带班情况:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="跟班、带班人员:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="行走路线:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="隐患单位:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="隐患部门:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="隐患地点:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="隐患内容:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="隐患类别:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="隐患级别:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="整改措施:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="所需资金:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="限改时间:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="责任人:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="完成时间:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="整改完成情况:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="复查时间:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="复查人:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="复查结果:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="整改次数:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="危险源:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="风险等级:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="业务科室:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="流程信息:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="发送流程:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="下一步:" prop="name"> |
| | | <el-input v-model="ruleForm.name" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="是否同意延期:" prop="resource"> |
| | | <el-radio-group v-model="ruleForm.resource"> |
| | | <el-radio label="线上品牌商赞助"></el-radio> |
| | | <el-radio label="线下场地免费"></el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="限改时间:" prop="name"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="备注" prop="desc"> |
| | | <el-input type="textarea" v-model="ruleForm.desc"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item style="text-align: center;"> |
| | | <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> |
| | | <el-button @click="close()">关闭</el-button> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | |
| | | export default { |
| | | components: {Titlename}, |
| | | name: "hiddenDangerList", |
| | | data() { |
| | | return { |
| | | ruleForm: { |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | value1: '', |
| | | desc: '' |
| | | }, |
| | | rules: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | alert('submit!'); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .app-container { |
| | | padding: 20px; |
| | | height: 850px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | /deep/ .box { |
| | | padding-top: 0; |
| | | } |
| | | /deep/ .multiline .el-input__inner{ |
| | | height: 62px; |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default{ |
| | | data(){ |
| | | return{ |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | |
| | | </style> |
| | |
| | | > |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><p class="title">企业达标标准:</p></el-col> |
| | | <el-col :span="9" |
| | | <el-col :span="2"><p class="titles">企业达标标准:</p></el-col> |
| | | <el-col :span="22" |
| | | ><p class="title-type"> |
| | | {{ item.enterpriseStandard }} |
| | | </p></el-col |
| | | > |
| | | <el-col :span="2" :offset="1" |
| | | ><p class="title">评审方法:</p></el-col |
| | | <!-- <el-col :span="2" :offset="1" |
| | | ><p class="titles">评审方法:</p></el-col |
| | | > |
| | | <el-col :span="10" |
| | | ><p class="title-type"> |
| | | {{ item.reviewMethod }} |
| | | </p></el-col |
| | | > --> |
| | | </el-row> |
| | | <el-row> |
| | | <!-- <el-col :span="2"><p class="titles">企业达标标准:</p></el-col> |
| | | <el-col :span="9" |
| | | ><p class="title-type"> |
| | | {{ item.enterpriseStandard }} |
| | | </p></el-col |
| | | > --> |
| | | <el-col :span="2" |
| | | ><p class="titles">评审方法:</p></el-col |
| | | > |
| | | <el-col :span="22" |
| | | ><p class="title-type"> |
| | | {{ item.reviewMethod }} |
| | | </p></el-col |
| | | > |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><p class="title">否决项:</p></el-col> |
| | | <el-col :span="9" |
| | | <el-col :span="2"><p class="titles">否决项:</p></el-col> |
| | | <el-col :span="22" |
| | | ><p class="title-type"> |
| | | {{ item.veto }} |
| | | </p></el-col |
| | | > |
| | | <el-col :span="2" :offset="1" |
| | | ><p class="title">扣分项:</p></el-col |
| | | <!-- <el-col :span="2" :offset="1" |
| | | ><p class="titles">扣分项:</p></el-col |
| | | > |
| | | <el-col :span="10" |
| | | ><p class="title-type"> |
| | | {{ item.deductionList[index].name}} |
| | | {{ item.deductionList}} |
| | | </p></el-col |
| | | > --> |
| | | </el-row> |
| | | <el-row> |
| | | <!-- <el-col :span="2"><p class="titles">否决项:</p></el-col> |
| | | <el-col :span="9" |
| | | ><p class="title-type"> |
| | | {{ item.veto }} |
| | | </p></el-col |
| | | > --> |
| | | <el-col :span="2" |
| | | ><p class="titles">扣分项:</p></el-col |
| | | > |
| | | <el-col :span="22" |
| | | ><p class="title-type"> |
| | | <!-- {{ item.deductionList}} --> |
| | | <span style="line-height:20px" v-for="(item,index) in item.deductionList" :key="index"> |
| | | {{item.name}} |
| | | </span> |
| | | </p></el-col |
| | | > |
| | | </el-row> |
| | |
| | | }); |
| | | }, |
| | | safetyInspectionItemL(data) { |
| | | this.listQuery.filter.elementB = data.value; |
| | | safetyInspectionItemList(this.listQuery).then((res) => { |
| | | this.list = res.data.result.records; |
| | | console.log("xxx",this.list) |
| | | }); |
| | | if (data.type== 1) { |
| | | this.listQuery.filter.elementB = data.value; |
| | | safetyInspectionItemList(this.listQuery).then((res) => { |
| | | this.list = res.data.result.records; |
| | | console.log(123,this.list) |
| | | }); |
| | | } |
| | | }, |
| | | safetyInspectionItemC(id, type) { |
| | | this.show = false; |
| | |
| | | </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" |
| | | <el-button @click="Del(scope.row.id)" v-if="scope.row.status==0?true:false" type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | |
| | | }); |
| | | }, |
| | | handleClick(val) { |
| | | if(val.status==-1){ |
| | | if(val.status==0){ |
| | | this.$router.push({ |
| | | path:"/new", |
| | | query:{ |
| | |
| | | name:'编辑' |
| | | } |
| | | }) |
| | | }else if(val.status==0){ |
| | | }else if(val.status==1){ |
| | | this.$router.push({ |
| | | path:"/gojudging", |
| | | query:{ |
| | | id:val.id |
| | | } |
| | | }) |
| | | }else if(val.status==2){ |
| | | this.$router.push({ |
| | | path:"/gojudging", |
| | | query:{ |
| | | id:val.id, |
| | | type:2 |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | find() { |
| | |
| | | <template> |
| | | <div> |
| | | <div class="box-right"> |
| | | <div v-for="(item, index) in lists" :key="index" style="padding:0 0 20px 0"> |
| | | <el-button |
| | | type="primary" |
| | | class="btn" |
| | | v-if="typeId == 2 ? false : true" |
| | | @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> |
| | | </div> |
| | |
| | | ><p><span>B级要素:</span>{{ item.elementBName }}</p></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><p><span>总分:</span>50</p></el-col |
| | | ><p><span>总分:</span>{{ item.points }}</p></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><p><span>得分:</span>{{item.point}}</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" :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}"> |
| | | <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> |
| | | <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> |
| | |
| | | type="expand" |
| | | width="100px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-table |
| | | :data="scope.row.selfDeductionList" |
| | | border |
| | | :header-cell-style="{background:'#eef1f6',color:'#606266'}" :cell-style="{background:'#fff',color:'#606266'}" |
| | | > |
| | | <el-table-column prop="name" align="center" label="扣分项"> |
| | | </el-table-column> |
| | | <el-table-column prop="point" align="center" label="扣分"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="remark" |
| | | align="center" |
| | | label="扣分备注" |
| | | <template slot-scope="scope"> |
| | | <el-table |
| | | :data="scope.row.selfDeductionList" |
| | | border |
| | | :header-cell-style="{ |
| | | background: '#eef1f6', |
| | | color: '#606266', |
| | | }" |
| | | :cell-style="{ background: '#fff', color: '#606266' }" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="扣分项" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="point" align="center" label="扣分"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="remark" |
| | | align="center" |
| | | label="扣分备注" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="remark" |
| | |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | :disabled="typeId == 2 ? true : false" |
| | | >评价</el-button |
| | | > |
| | | <!-- <el-button type="text" size="small" style="color: red" |
| | |
| | | </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() { |
| | |
| | | }, |
| | | list: [], |
| | | lists: [], |
| | | listType: [], |
| | | typeId: "", |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query.id; |
| | | this.typeId = this.$route.query.type; |
| | | this.safeInitem(this.id); |
| | | }, |
| | | methods: { |
| | | finish() { |
| | | var faly = ""; |
| | | var bar = []; |
| | | for (var i = 0; i < this.listType.length; i++) { |
| | | if (this.listType[i].safetyInspectionItemResult == null) { |
| | | faly = false; |
| | | } else { |
| | | faly = true; |
| | | } |
| | | bar.push(faly); |
| | | } |
| | | if (bar.indexOf(false) == -1) { |
| | | 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, |
| | | }); |
| | | this.$router.push({ |
| | | path: "/checklistself", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: res.data.message, |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }); |
| | | }) |
| | | .catch((error) => {}); |
| | | } else { |
| | | alert("请将所有评分评价后再点结算"); |
| | | } |
| | | }, |
| | | |
| | | safeInitem(id) { |
| | | safetySelfInspectionInfo({ id: id }).then((res) => { |
| | | if (res.data.code == 200) this.list = res.data.result; |
| | | this.listType = res.data.result.itemList; |
| | | var arr = this.checkSameDataA(this.list.itemList); |
| | | for (var i = 0; i < arr.length; i++) { |
| | | arr[i].child = this.checkSameData(arr[i].child); |
| | | arr[i].child.points = arr[i].child.point; |
| | | } |
| | | this.lists = arr; |
| | | // console.log('tag', arr) |
| | | console.log("tag", arr); |
| | | }); |
| | | }, |
| | | checkSameDataA(resData) { |
| | |
| | | if (!dataInfo[elementBName]) { |
| | | dataInfo[elementBName] = { |
| | | elementBName, |
| | | point:"", |
| | | point: "", |
| | | points: item.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 |
| | | } |
| | | // console.log("数据",list) |
| | | for (var i = 0; i < list.length; i++) { |
| | | var pot = list[i].points; |
| | | for (var j = 0; j < list[i].child.length; j++) { |
| | | if (list[i].child[j].safetyInspectionItemResult != 0) { |
| | | for ( |
| | | var s = 0; |
| | | s < list[i].child[j].selfDeductionList.length; |
| | | s++ |
| | | ) { |
| | | pot = pot - list[i].child[j].selfDeductionList[s].point; |
| | | } |
| | | } else { |
| | | var cont = 0; |
| | | pot = 0; |
| | | } |
| | | } |
| | | if (pot > 0) { |
| | | list[i].point = pot; |
| | | } else { |
| | | list[i].point = 0; |
| | | } |
| | | } |
| | | return list; |
| | | }, |
| | | handleClick(data) { |
| | |
| | | path: "/review", |
| | | query: { |
| | | idC: data.id, |
| | | id:this.id |
| | | id: this.id, |
| | | }, |
| | | }); |
| | | }, |
| | |
| | | border-radius: 5px; |
| | | padding: 20px; |
| | | height: 850px; |
| | | overflow-y:overlay; |
| | | overflow-y: overlay; |
| | | } |
| | | .title { |
| | | font-size: 16px; |
| | |
| | | .titles { |
| | | font-size: 14px; |
| | | } |
| | | .box-right /deep/ .el-table__expanded-cell{ |
| | | .box-right /deep/ .el-table__expanded-cell { |
| | | background-color: #fff !important; |
| | | } |
| | | .btn { |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | float: right; |
| | | } |
| | | </style> |
| | |
| | | </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; |
| | |
| | | id: "", |
| | | form: {}, |
| | | list: {}, |
| | | point:"", |
| | | pointDel:"" |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | itemInfo(id) { |
| | | safetySelfInspectionItemInfo({id:id}).then((res) => { |
| | | this.list = res.data.result; |
| | | this.point=res.data.result.point |
| | | this.pointDel=res.data.result.point |
| | | }); |
| | | }, |
| | | modItem() { |
| | | if(this.list.safetyInspectionItemResult!=null){ |
| | | console.log(this.list) |
| | | for(var i=0;i<this.list.selfDeductionList.length;i++){ |
| | | this.pointDel=this.pointDel-this.list.selfDeductionList[i].point |
| | | } |
| | | |
| | | safetySelfInspectionModItemInfo(this.list).then((res) => { |
| | | if (res.data.code == 200) { |
| | | if(this.pointDel>=0){ |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | |
| | | id:this.id |
| | | } |
| | | }); |
| | | }else{ |
| | | alert(`扣分不得超过总分${this.point}`) |
| | | } |
| | | } |
| | | }); |
| | | }else{ |
| | |
| | | this.form=JSON.parse(JSON.stringify(data)); |
| | | }, |
| | | addC(){ |
| | | if(this.form.point<=50){ |
| | | if(this.form.point<=this.point){ |
| | | for(let i = 0;i<this.list.selfDeductionList.length;i++){ |
| | | if (this.form.id=this.list.selfDeductionList[i].id){ |
| | | 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") |
| | | alert(`扣分不得超过总分${this.point}`) |
| | | } |
| | | this.dialogVisible = false; |
| | | }, |