| | |
| | | <div class="box"> |
| | | <div class="box-right"> |
| | | <Titlename title="基础信息"></Titlename> |
| | | <el-form ref="form" :model="form" label-width="120px"> |
| | | <el-form ref="form" :model="list" label-width="120px"> |
| | | <div style="width: 80%; margin: auto"> |
| | | <el-row class="box-right-content" align="top"> |
| | | <el-col :span="11"> |
| | | <el-form-item label="A级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="list.elementAName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="区域一" value="shanghai"></el-option> |
| | | <el-option label="区域二" value="beijing"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2" style="white-space: nowrap"> |
| | | <el-form-item label="B级要素"> |
| | | <el-select |
| | | v-model="formInline.region" |
| | | v-model="list.elementBName" |
| | | :disabled="true" |
| | | style="width: 100%" |
| | | > |
| | | <el-option label="区域一" value="shanghai"></el-option> |
| | | <el-option label="区域二" value="beijing"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-input |
| | | :rows="3" |
| | | type="textarea" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.standardizationRequirements" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.enterpriseStandard" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.reviewMethod" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="form.name" |
| | | :disabled="true" |
| | | v-model="list.veto" |
| | | placeholder="" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-row> |
| | | <el-col :span="22" :offset="2"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="list.selfDeductionList" |
| | | border |
| | | style="width: 99%; margin-left: 1%" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | type="index" |
| | | align="center" |
| | | label="序号" |
| | | width="150" |
| | |
| | | align="center" |
| | | label="说明" |
| | | ></el-table-column> |
| | | <!-- <el-table-column align="center" label="操作" width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="是否否决项"> |
| | | <el-radio-group v-model="resource"> |
| | | <el-radio label="0">是</el-radio> |
| | | <el-radio label="1">否</el-radio> |
| | | <el-radio-group v-model="list.safetyInspectionItemResult"> |
| | | <el-radio :label="0">是</el-radio> |
| | | <el-radio :label="1">否</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item></el-col |
| | | > |
| | | </el-row> |
| | | <div v-if="resource == '0' ? false : true"> |
| | | <div |
| | | v-if=" |
| | | list.safetyInspectionItemResult == 1 |
| | | " |
| | | > |
| | | <el-row style="padding: 15px 1%"> |
| | | <el-col :span="22" :offset="2"> |
| | | <span |
| | |
| | | <el-col :span="22" :offset="2"> |
| | | <el-table |
| | | border |
| | | :data="tableData" |
| | | :data="list.selfDeductionList" |
| | | style="width: 99%; margin-left: 1%" |
| | | > |
| | | <el-table-column |
| | | prop="date" |
| | | type="index" |
| | | align="center" |
| | | label="序号" |
| | | width="150" |
| | |
| | | label="说明" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | prop="point" |
| | | align="center" |
| | | label="扣分值" |
| | | ></el-table-column> |
| | |
| | | size="small" |
| | | >修改</el-button |
| | | > |
| | | <el-button type="text" size="small" style="color: red" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | <el-row> |
| | | <el-col :span="24" style="padding: 20px 0; text-align: center"> |
| | | <el-button type="primary" class="btns">提交</el-button> |
| | | <el-button>取消</el-button> |
| | | <el-button type="primary" @click="modItem()" class="btns" |
| | | >提交</el-button |
| | | > |
| | | <el-button @click="back()">取消</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog title="扣分详情" :visible.sync="dialogVisible" width="30%"> |
| | | <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 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.name"></el-input> |
| | | <el-input v-model="form.point"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注"> |
| | | <el-input v-model="form.name" :rows="5" type="textarea"></el-input> |
| | | <el-input v-model="form.remark" :rows="5" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span |
| | |
| | | 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="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="lost()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import { |
| | | safetySelfInspectionItemInfo, |
| | | safetySelfInspectionModItemInfo, |
| | | } from "@/api/safetySelfInspection.js"; |
| | | export default { |
| | | components: { Titlename }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | resource: "0", |
| | | form: { |
| | | name: "", |
| | | }, |
| | | formInline: { |
| | | user: "", |
| | | region: "", |
| | | }, |
| | | tableData: [ |
| | | { |
| | | date: "2016-05-02", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1518 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-04", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1517 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-01", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1519 弄", |
| | | zip: 200333, |
| | | }, |
| | | { |
| | | date: "2016-05-03", |
| | | name: "王小虎", |
| | | province: "上海", |
| | | city: "普陀区", |
| | | address: "上海市普陀区金沙江路 1516 弄", |
| | | zip: 200333, |
| | | }, |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | id: "", |
| | | form: {}, |
| | | list: {}, |
| | | point:"", |
| | | pointDel:"" |
| | | }; |
| | | }, |
| | | created() { |
| | | this.id = this.$route.query.id; |
| | | this.itemInfo(this.$route.query.idC); |
| | | }, |
| | | methods: { |
| | | handleClick() { |
| | | 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){ |
| | | let pointFlag = this.pointDel |
| | | for(var i=0;i<this.list.selfDeductionList.length;i++){ |
| | | pointFlag=pointFlag-this.list.selfDeductionList[i].point |
| | | } |
| | | if(pointFlag>=0){ |
| | | safetySelfInspectionModItemInfo(this.list).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$notify({ |
| | | type: "success", |
| | | duration: 2000, |
| | | message: "提交成功", |
| | | title: "成功", |
| | | }); |
| | | this.$router.push({ |
| | | path: "/gojudging", |
| | | query: { |
| | | id: this.id |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | }else{ |
| | | alert(`扣分不得超过总分${this.point}`) |
| | | } |
| | | } |
| | | else{ |
| | | this.$confirm('是否否决项未选择','提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }, |
| | | back() { |
| | | this.$router.push({ |
| | | path: "/gojudging", |
| | | query:{ |
| | | id:this.id |
| | | } |
| | | }); |
| | | }, |
| | | handleClick(data) { |
| | | this.dialogVisible = true; |
| | | // this.form = data; |
| | | this.form=JSON.parse(JSON.stringify(data)); |
| | | }, |
| | | addC(){ |
| | | if(this.form.point<=this.point){ |
| | | for(let i = 0;i<this.list.selfDeductionList.length;i++){ |
| | | if (this.form.safetyInspectionItemDeductionId==this.list.selfDeductionList[i].safetyInspectionItemDeductionId){ |
| | | this.list.selfDeductionList[i].point = this.form.point |
| | | this.list.selfDeductionList[i].remark = this.form.remark |
| | | } |
| | | } |
| | | }else{ |
| | | alert(`扣分不得超过总分${this.point}`) |
| | | } |
| | | this.dialogVisible = false; |
| | | }, |
| | | lost() { |
| | | this.dialogVisible = false; |
| | | this.itemInfo(this.id); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | width: 100%; |
| | | background-color: white; |
| | | border-radius: 5px; |
| | | height: 850px; |
| | | overflow-y:overlay; |
| | | } |
| | | .box-right-content { |
| | | padding: 15px 0; |
| | |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |
| | | </style> |