Browse Source

检查内容支持换行

jiawuxian 2 years ago
parent
commit
e179706280

+ 5 - 1
src/views/check/dialog.edit.vue

@@ -288,7 +288,11 @@
           >
           >
           </el-table-column>
           </el-table-column>
           <el-table-column prop="itemName" label="检查项"> </el-table-column>
           <el-table-column prop="itemName" label="检查项"> </el-table-column>
-          <el-table-column prop="pointName" label="检查内容"> </el-table-column>
+          <el-table-column prop="pointName" label="检查内容" width="300px">
+            <template slot-scope="scope">
+              <pre>{{ scope.row.pointName }}</pre>
+            </template>
+          </el-table-column>
           <el-table-column v-if="false" prop="ofOrgId" label="所属机构id">
           <el-table-column v-if="false" prop="ofOrgId" label="所属机构id">
           </el-table-column>
           </el-table-column>
           <el-table-column prop="areaName" label="检查区域"> </el-table-column>
           <el-table-column prop="areaName" label="检查区域"> </el-table-column>

+ 5 - 1
src/views/safetycheck/ruleManager/dialog.editItem.vue

@@ -34,7 +34,11 @@
             >
             >
           </div>
           </div>
           <el-table :data="formData.pointDtoList" border style="width: 100%">
           <el-table :data="formData.pointDtoList" border style="width: 100%">
-            <el-table-column prop="name" label="检查内容"> </el-table-column>
+            <el-table-column prop="name" label="检查内容">
+              <template slot-scope="scope">
+                <pre>{{ scope.row.name }}</pre>
+              </template>
+            </el-table-column>
             <el-table-column prop="areaName" label="检查区域">
             <el-table-column prop="areaName" label="检查区域">
             </el-table-column>
             </el-table-column>
             <el-table-column label="操作" width="140">
             <el-table-column label="操作" width="140">

+ 11 - 3
src/views/safetycheck/ruleManager/dialog.editPoint.vue

@@ -31,13 +31,16 @@
           </el-form-item> -->
           </el-form-item> -->
           <el-form-item label="检查内容" prop="name">
           <el-form-item label="检查内容" prop="name">
             <el-input
             <el-input
-              v-model.trim="formData.name"
-              placeholder="请输入检查内容"
-              maxlength="100"
+              type="textarea"
+              :rows="3"
+              v-model="formData.name"
+              placeholder="请输入履职内容"
+              maxlength="255"
             ></el-input>
             ></el-input>
           </el-form-item>
           </el-form-item>
           <el-form-item label="检查区域" prop="areaId">
           <el-form-item label="检查区域" prop="areaId">
             <el-select
             <el-select
+              style="width: 100%"
               v-model="formData.areaId"
               v-model="formData.areaId"
               placeholder="请选择检查区域"
               placeholder="请选择检查区域"
               @change="onAreaChanged"
               @change="onAreaChanged"
@@ -53,6 +56,7 @@
           </el-form-item>
           </el-form-item>
           <el-form-item label="数据来源" prop="businessType">
           <el-form-item label="数据来源" prop="businessType">
             <el-select
             <el-select
+              style="width: 100%"
               v-model="formData.businessType"
               v-model="formData.businessType"
               placeholder="请选择数据来源"
               placeholder="请选择数据来源"
               clearable
               clearable
@@ -147,6 +151,10 @@ export default {
       this.dataVisible = true;
       this.dataVisible = true;
     },
     },
     onSubmit() {
     onSubmit() {
+      if (this.formData.name) {
+        this.formData.name = this.formData.name.trim();
+      }
+
       this.$refs.form.validate((isValidate) => {
       this.$refs.form.validate((isValidate) => {
         if (!isValidate) return;
         if (!isValidate) return;
         let obj = {};
         let obj = {};

+ 29 - 21
src/views/safetycheck/ruleManager/dialog.select.point.vue

@@ -35,7 +35,11 @@
             </el-select>
             </el-select>
           </el-form-item>
           </el-form-item>
           <el-form-item prop="key" label="关键字">
           <el-form-item prop="key" label="关键字">
-            <el-input v-model="search.key" maxlength="50" placeholder="请输入检查项或检查内容"></el-input>
+            <el-input
+              v-model="search.key"
+              maxlength="50"
+              placeholder="请输入检查项或检查内容"
+            ></el-input>
           </el-form-item>
           </el-form-item>
         </template>
         </template>
 
 
@@ -44,9 +48,13 @@
           <el-table-column
           <el-table-column
             prop="itemName"
             prop="itemName"
             label="检查项"
             label="检查项"
-           min-width="40%"
+            min-width="40%"
           ></el-table-column>
           ></el-table-column>
-          <el-table-column label="检查内容" prop="pointName" min-width="40%"> </el-table-column>
+          <el-table-column label="检查内容" prop="pointName" min-width="40%">
+            <template slot-scope="scope">
+              <pre>{{ scope.row.pointName }}</pre>
+            </template>
+          </el-table-column>
           <el-table-column
           <el-table-column
             prop="areaName"
             prop="areaName"
             label="检查区域"
             label="检查区域"
@@ -80,22 +88,22 @@ export default {
   },
   },
   computed: {},
   computed: {},
   watch: {
   watch: {
-    search:{
-      deep:true,
-      handler(v){
-        if(v.ruleId){
-          this.$refs.st.search();    
-        }    
-      }
-    }
+    search: {
+      deep: true,
+      handler(v) {
+        if (v.ruleId) {
+          this.$refs.st.search();
+        }
+      },
+    },
   },
   },
   props: {
   props: {
     // defaultSelect:{
     // defaultSelect:{
     //   type:Array
     //   type:Array
     // },
     // },
-    orgType:{
-      type:String
-    }
+    orgType: {
+      type: String,
+    },
   },
   },
   methods: {
   methods: {
     show(defaultSelect) {
     show(defaultSelect) {
@@ -104,10 +112,10 @@ export default {
       if (defaultSelect && defaultSelect.map) {
       if (defaultSelect && defaultSelect.map) {
         this.selectList = defaultSelect.map((s) => ({ id: s }));
         this.selectList = defaultSelect.map((s) => ({ id: s }));
       }
       }
-      
+
       ruleListForOrg({ orgType: this.orgType }).then((r) => {
       ruleListForOrg({ orgType: this.orgType }).then((r) => {
         this.ruleList = r.data;
         this.ruleList = r.data;
-        
+
         if (r.data && r.data.length > 0) {
         if (r.data && r.data.length > 0) {
           this.search.ruleId = r.data[0].id;
           this.search.ruleId = r.data[0].id;
         }
         }
@@ -116,11 +124,11 @@ export default {
     onHide() {
     onHide() {
       this.isShow = false;
       this.isShow = false;
     },
     },
-    onSelect(item) {      
+    onSelect(item) {
       this.selectList = item;
       this.selectList = item;
     },
     },
     onSubmit() {
     onSubmit() {
-      let s=this.selectList
+      let s = this.selectList;
       this.$emit("select", this.selectList);
       this.$emit("select", this.selectList);
       this.onHide();
       this.onHide();
     },
     },
@@ -137,9 +145,9 @@ export default {
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .el-dialog-div {
 .el-dialog-div {
   overflow: auto;
   overflow: auto;
-  margin-bottom:20px;
+  margin-bottom: 20px;
 }
 }
-.dialog-footer{
-  margin-top:20px;
+.dialog-footer {
+  margin-top: 20px;
 }
 }
 </style>
 </style>

+ 29 - 15
src/views/safetycheck/taskManager/components/register.vue

@@ -12,7 +12,9 @@
       }}</el-descriptions-item>
       }}</el-descriptions-item>
       <el-descriptions-item label="检查角色"
       <el-descriptions-item label="检查角色"
         >{{
         >{{
-          taskInfo.checkRoles ? taskInfo.checkRoles.map((r) => r.name).join(",") : ""
+          taskInfo.checkRoles
+            ? taskInfo.checkRoles.map((r) => r.name).join(",")
+            : ""
         }}
         }}
       </el-descriptions-item>
       </el-descriptions-item>
       <el-descriptions-item label="开始日期"
       <el-descriptions-item label="开始日期"
@@ -57,9 +59,12 @@
             <span>{{ index + 1 }}、{{ item.itemName }}</span>
             <span>{{ index + 1 }}、{{ item.itemName }}</span>
             <div class="safetycheck_point" v-for="point in item.pointList">
             <div class="safetycheck_point" v-for="point in item.pointList">
               <div>
               <div>
-                <span class="pointName"
-                  ><i class="circle" /> {{ point.pointName }}</span
-                >
+                <div class="pointName">
+                  <div style="display:flex;flex-direction:row">
+                    <i class="circle" />
+                    <pre>{{ point.pointName }}</pre>
+                  </div>
+                </div>
                 <el-radio-group v-model="point.status" v-if="isRegister">
                 <el-radio-group v-model="point.status" v-if="isRegister">
                   <el-radio :label="0">正常</el-radio>
                   <el-radio :label="0">正常</el-radio>
                   <el-radio :label="1">异常</el-radio>
                   <el-radio :label="1">异常</el-radio>
@@ -136,7 +141,7 @@
                   <el-descriptions-item label="异常图片">
                   <el-descriptions-item label="异常图片">
                     <div class="imageList">
                     <div class="imageList">
                       <el-image
                       <el-image
-                        style="width: 100px; height: 100px;margin:10px;"
+                        style="width: 100px; height: 100px; margin: 10px"
                         v-if="point.imgData"
                         v-if="point.imgData"
                         v-for="url in point.imgData"
                         v-for="url in point.imgData"
                         :src="url.imgPath"
                         :src="url.imgPath"
@@ -218,7 +223,9 @@ export default {
     },
     },
     showGrantBtn() {
     showGrantBtn() {
       let userRoleIds = this.roleList.map((r) => r.roleId);
       let userRoleIds = this.roleList.map((r) => r.roleId);
-      let taskRoleIds = this.taskInfo.checkRoles?this.taskInfo.checkRoles.map((r) => r.id):[];
+      let taskRoleIds = this.taskInfo.checkRoles
+        ? this.taskInfo.checkRoles.map((r) => r.id)
+        : [];
       return (
       return (
         this.isRegister &&
         this.isRegister &&
         this.taskInfo.status != 3 &&
         this.taskInfo.status != 3 &&
@@ -320,7 +327,7 @@ export default {
         this.$message.info("没有可新增的检查内容");
         this.$message.info("没有可新增的检查内容");
       }
       }
     },
     },
-    onClose(){
+    onClose() {
       this.$tab.closePageAndPushPrev();
       this.$tab.closePageAndPushPrev();
     },
     },
     onDeletePoint(area, item, point) {
     onDeletePoint(area, item, point) {
@@ -407,13 +414,13 @@ export default {
   overflow-y: auto;
   overflow-y: auto;
   margin-bottom: 20px;
   margin-bottom: 20px;
   margin-top: 20px;
   margin-top: 20px;
-  flex-direction:column;
+  flex-direction: column;
 }
 }
 .area_content {
 .area_content {
-  border: #B8BDC0 1px solid;
+  border: #b8bdc0 1px solid;
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
-  width:100%;
+  width: 100%;
 }
 }
 
 
 .content > .area_content:first-child {
 .content > .area_content:first-child {
@@ -421,12 +428,12 @@ export default {
 }
 }
 
 
 .content > .area_content:last-child {
 .content > .area_content:last-child {
-  border-bottom: #B8BDC0 1px solid;
+  border-bottom: #b8bdc0 1px solid;
 }
 }
 
 
 .area_content > div:nth-child(1) {
 .area_content > div:nth-child(1) {
   background-color: #f7f7f7;
   background-color: #f7f7f7;
-  border-right: #B8BDC0 1px solid;
+  border-right: #b8bdc0 1px solid;
   padding-top: auto;
   padding-top: auto;
   width: 15%;
   width: 15%;
   display: flex;
   display: flex;
@@ -453,13 +460,19 @@ export default {
 //   margin-bottom: 15px;
 //   margin-bottom: 15px;
 // }
 // }
 .pointName {
 .pointName {
-  width: 200px;
+  width: 400px;
   display: inline-block;
   display: inline-block;
+  margin-right: 50px;
+}
+
+.pointName pre {
+  margin-left: 10px;
+  width:calc(100% - 15px)
 }
 }
 .dialog-footer {
 .dialog-footer {
   width: 100%;
   width: 100%;
   text-align: right;
   text-align: right;
-  border-top: #B8BDC0 1px solid;
+  border-top: #b8bdc0 1px solid;
   padding-top: 10px;
   padding-top: 10px;
   padding-right: 30px;
   padding-right: 30px;
   position: absolute;
   position: absolute;
@@ -471,8 +484,9 @@ export default {
   width: 5px;
   width: 5px;
   height: 5px;
   height: 5px;
   border-radius: 5px;
   border-radius: 5px;
-  background-color: #B8BDC0;
+  background-color: #b8bdc0;
   border: none;
   border: none;
   margin-bottom: 3px;
   margin-bottom: 3px;
+  margin-top:6px;
 }
 }
 </style>
 </style>