Browse Source

危险作业工程页面

zhaowenrui 1 year ago
parent
commit
52a1243944
1 changed files with 56 additions and 39 deletions
  1. 56 39
      src/views/zdsz/engineeringDangerous/index.vue

+ 56 - 39
src/views/zdsz/engineeringDangerous/index.vue

@@ -74,7 +74,7 @@
         >删除
         </el-button>
       </el-col>
-      <el-col :span="1.5">
+<!--      <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -84,7 +84,7 @@
           v-hasPermi="['zdsz:engineeringDangerous:export']"
         >导出
         </el-button>
-      </el-col>
+      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -159,7 +159,8 @@
             icon="el-icon-edit"
             size="mini"
             @click="viewSource(scope.row)"
-          >历史</el-button>
+          >历史
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -351,17 +352,17 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="作业坑(长)" prop="hazardousWorkPitsLong">
+            <el-form-item label="作业坑(长)(米)" prop="hazardousWorkPitsLong">
               <el-input v-model="form.hazardousWorkPitsLong" placeholder="请填写危险作业坑大小(长)" maxlength="11"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="作业坑(宽)" prop="hazardousWorkPitsWide">
+            <el-form-item label="作业坑(宽)(米)" prop="hazardousWorkPitsWide">
               <el-input v-model="form.hazardousWorkPitsWide" placeholder="请填写危险作业坑大小(宽)" maxlength="11"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="作业坑(深)" prop="hazardousWorkPitsDeep">
+            <el-form-item label="作业坑(深)(米)" prop="hazardousWorkPitsDeep">
               <el-input v-model="form.hazardousWorkPitsDeep" placeholder="请填写危险作业坑大小(深)" maxlength="11"/>
             </el-form-item>
           </el-col>
@@ -399,11 +400,15 @@
         <el-row :gutter="20">
           <el-col :span="24">
             <el-form-item label="附件" prop="" v-if="currentType==='put'">
-              <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="form.pics"
+              <ObsFileUpload ref="obsFileUpload" :file-size="100"
+                             :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
+                             :value="form.pics"
               ></ObsFileUpload>
             </el-form-item>
             <el-form-item label="附件" prop="" v-if="currentType==='add'">
-              <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="form.files"
+              <ObsFileUpload ref="obsFileUpload" :file-size="100"
+                             :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
+                             :value="form.files"
               ></ObsFileUpload>
             </el-form-item>
           </el-col>
@@ -438,8 +443,7 @@ import EngineeNode from "@/components/EngineeNode/index";
 import data from "@/views/system/dict/data.vue";
 import EngineePipe from '@/components/EngineePipe'
 import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
-import {validPhoneMobile,checkPositiveDecimal} from "@/api/rules";
-import {QueryEngineeIndustry} from "@/api/zdsz/engineeringIndustry";
+import {validPhoneMobile, checkPositiveDecimal} from "@/api/rules";
 
 
 export default {
@@ -450,11 +454,11 @@ export default {
     }
   },
   components: {
-    EngineePipe, EngineeNode,ConstructionDetails
+    EngineePipe, EngineeNode, ConstructionDetails
   },
   data() {
     return {
-      currentCollapses:[],
+      currentCollapses: [],
       nodeType: "危险作业工程",
       nodeDetailVisible: false,
       // 按钮loading
@@ -479,7 +483,7 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
-        files:[],
+        files: [],
         pageNum: 1,
         pageSize: 10,
         basicInformation: undefined,
@@ -587,7 +591,7 @@ export default {
           {validator: checkPositiveDecimal, trigger: 'blur'},
         ],
         siteHeadPhone: [
-         // {required: true, message: "现场负责人电话不能为空", trigger: "blur"}
+          // {required: true, message: "现场负责人电话不能为空", trigger: "blur"}
           {validator: validPhoneMobile, trigger: 'blur'},
         ],
         /*   pipeDiameter: [
@@ -707,14 +711,14 @@ export default {
     this.getList();
   },
   methods: {
-    viewSource(e){
+    viewSource(e) {
       this.currentId = e.id
-      this.$refs.ConstructionDetails.open(_,"危险作业工程")
+      this.$refs.ConstructionDetails.open(_, "危险作业工程")
     },
-    viewNodeSource(e){
+    viewNodeSource(e) {
       // todo: 获取数据
       queryEngineeringDangerous({
-        id:this.currentId
+        id: this.currentId
       }).then(res => {
         try {
           this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
@@ -728,30 +732,34 @@ export default {
       this.getList()
     },
     toNodeDetail() {
-      if (this.currentType === 'put') {
-        this.form.files = this.$refs.obsFileUpload.fileList
-        this.$refs.childNode.open(this.form, 37)
-        this.currentType = null
-        return
-      }
-      // 加工 enginClassification 工程节点
-      // const parts = this.value[1].split('_');
-      // let result = parts.slice(2).join('_');
-      // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
-      // this.queryParams.enginClassification = result
-      // console.log(this.queryParams)
-      if (this.currentType === 'add') {
-        this.form.files = this.$refs.obsFileUpload.fileList
-        this.$refs.childNode.open(this.form, 3)
-        this.currentType = null
-        return
-      }
-      return
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.currentType === 'put') {
+            this.form.files = this.$refs.obsFileUpload.fileList
+            this.$refs.childNode.open(this.form, 37, [{name: "危险作业工程"}])
+            return
+          }
+          // 加工 enginClassification 工程节点
+          // const parts = this.value[1].split('_');
+          // let result = parts.slice(2).join('_');
+          // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
+          // this.queryParams.enginClassification = result
+          // console.log(this.queryParams)
+          if (this.currentType === 'add') {
+            this.form.files = this.$refs.obsFileUpload.fileList
+            this.$refs.childNode.open(this.form, 3, [{name: "危险作业工程"}])
+            return
+          }
+        }
+      })
+
+
+  /*    return
       this.$refs['form'].validate(e => {
         if (e) {
           this.nodeDetailVisible = true
         }
-      })
+      })*/
 
     },
     // 新增顶管工程
@@ -916,7 +924,16 @@ export default {
   .el-form-item:not(:nth-child(1):nth-child(2)) {
     margin-top: 0.5%;
   }
-
+  .el-form-item__error{
+    width: 200px;
+    color: #ff4949;
+    font-size: 12px;
+    line-height: 1;
+    padding-top: 4px;
+    position: absolute;
+    top: 100%;
+    left: 0;
+  }
   .remark_input {
     .el-textarea__inner {
       width: 238%;