From 37b718547bc441c7502f0bfcf86209efe253851b Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Wed, 06 Apr 2022 17:32:03 +0800
Subject: [PATCH] 'lct'
---
src/views/safetyproduction/review.vue | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 343 insertions(+), 0 deletions(-)
diff --git a/src/views/safetyproduction/review.vue b/src/views/safetyproduction/review.vue
new file mode 100644
index 0000000..0af1751
--- /dev/null
+++ b/src/views/safetyproduction/review.vue
@@ -0,0 +1,343 @@
+<template>
+ <div class="app-container">
+ <div class="box">
+ <div class="box-right">
+ <Titlename title="基础信息"></Titlename>
+ <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="list.elementAName"
+ :disabled="true"
+ style="width: 100%"
+ >
+ </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="list.elementBName"
+ :disabled="true"
+ style="width: 100%"
+ >
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="标准化要求">
+ <el-input
+ :rows="3"
+ type="textarea"
+ :disabled="true"
+ v-model="list.standardizationRequirements"
+ placeholder=""
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="企业达标标准">
+ <el-input
+ type="textarea"
+ :rows="3"
+ :disabled="true"
+ v-model="list.enterpriseStandard"
+ placeholder=""
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="评审方法">
+ <el-input
+ type="textarea"
+ :rows="3"
+ :disabled="true"
+ v-model="list.reviewMethod"
+ placeholder=""
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ <Titlename title="评选标准"></Titlename>
+ <div style="width: 80%; margin: auto">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="否决项">
+ <el-input
+ type="textarea"
+ :rows="3"
+ :disabled="true"
+ v-model="list.veto"
+ placeholder=""
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row style="padding: 15px 1%">
+ <el-col :span="22" :offset="2">
+ <span
+ style="font-size: 16px; font-weight: bold; line-height: 29px"
+ >扣分清单</span
+ >
+ </el-col>
+ <!-- <el-col :span="12" style="text-align: right">
+ <el-button type="primary" @click="dialogVisible=true" class="btns" size="mini" icon="el-icon-plus"
+ >新增</el-button
+ >
+ </el-col> -->
+ </el-row>
+ <el-row>
+ <el-col :span="22" :offset="2">
+ <el-table
+ :data="list.selfDeductionList"
+ border
+ style="width: 99%; margin-left: 1%"
+ >
+ <el-table-column
+ type="index"
+ align="center"
+ label="序号"
+ width="150"
+ >
+ </el-table-column>
+ <el-table-column
+ prop="name"
+ align="center"
+ label="说明"
+ ></el-table-column>
+ </el-table>
+ </el-col>
+ </el-row>
+ </div>
+ <Titlename title="扣分详情"></Titlename>
+ <div style="width: 80%; margin: auto">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="是否否决项">
+ <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="
+ list.safetyInspectionItemResult == 1
+ "
+ >
+ <el-row style="padding: 15px 1%">
+ <el-col :span="22" :offset="2">
+ <span
+ style="
+ font-size: 16px;
+ font-weight: bold;
+ line-height: 29px;
+ "
+ >扣分清单</span
+ >
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="22" :offset="2">
+ <el-table
+ border
+ :data="list.selfDeductionList"
+ style="width: 99%; margin-left: 1%"
+ >
+ <el-table-column
+ type="index"
+ align="center"
+ label="序号"
+ width="150"
+ >
+ </el-table-column>
+ <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 align="center" label="操作" width="200px">
+ <template slot-scope="scope">
+ <el-button
+ @click="handleClick(scope.row)"
+ type="text"
+ size="small"
+ >修改</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ <el-row>
+ <el-col :span="24" style="padding: 20px 0; text-align: center">
+ <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" :close-on-click-modal="false" width="30%">
+ <el-form ref="form" :model="form" label-width="54px">
+ <el-form-item label="说明">
+ <el-input :disabled="true" v-model="form.name"></el-input>
+ </el-form-item>
+ <el-form-item label="扣分值">
+ <el-input v-model="form.point"></el-input>
+ </el-form-item>
+ <el-form-item label="备注">
+ <el-input v-model="form.remark" :rows="5" type="textarea"></el-input>
+ </el-form-item>
+ </el-form>
+ <span
+ slot="footer"
+ class="dialog-footer"
+ style="text-align: center; display: block"
+ >
+ <el-button type="primary" class="btns" @click="addC"
+ >确 定</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,
+ id: "",
+ form: {},
+ list: {},
+ };
+ },
+ created() {
+ this.id = this.$route.query.id;
+ this.itemInfo(this.$route.query.idC);
+ },
+ methods: {
+ itemInfo(id) {
+ safetySelfInspectionItemInfo({id:id}).then((res) => {
+ this.list = res.data.result;
+ });
+ },
+ modItem() {
+ if(this.list.safetyInspectionItemResult!=null){
+ console.log(this.list)
+ 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{
+ 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<=50){
+ for(let i = 0;i<this.list.selfDeductionList.length;i++){
+ 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")
+ }
+ this.dialogVisible = false;
+ },
+ lost() {
+ this.dialogVisible = false;
+ this.itemInfo(this.id);
+ },
+ },
+};
+</script>
+<style scoped>
+.app-container {
+ padding: 0px;
+}
+.box {
+ width: 100%;
+ display: flex;
+ justify-content: space-between;
+ background-color: #dedede;
+}
+.box-left {
+ width: 20%;
+ /* height: 800px; */
+ background-color: white;
+ border-radius: 5px;
+}
+.box-left-content {
+ padding: 10px;
+}
+.box-right {
+ width: 100%;
+ background-color: white;
+ border-radius: 5px;
+}
+.box-right-content {
+ padding: 15px 0;
+}
+.btns {
+ background-color: #034ea2;
+ border: 1px solid #034ea2;
+}
+</style>
--
Gitblit v1.9.2