Jelajahi Sumber

优化回车换行显示

jiawuxian 1 tahun lalu
induk
melakukan
1966fa4dee

+ 3 - 3
src/views/resumption/ruleManager/dialog.editItem.vue

@@ -39,7 +39,7 @@
           <el-table :data="formData.pointDtoList" border style="width: 100%">
             <el-table-column prop="name" label="履职内容" header-align="center">
               <template slot-scope="scope">
-                <pre>{{ scope.row.name }}</pre>
+                <div style="white-space: pre-wrap">{{ scope.row.name }}</div>
               </template>
             </el-table-column>
             <el-table-column
@@ -152,9 +152,9 @@ export default {
           return;
         }
         update(this.formData).then((v) => {
-          let isAdd=this.formData.id==null || this.formData.id==0;
+          let isAdd = this.formData.id == null || this.formData.id == 0;
           this.formData = this.reset();
-          this.dialogVisible = false;    
+          this.dialogVisible = false;
           this.$emit("success", isAdd);
         });
       });

+ 12 - 12
src/views/resumption/ruleManager/dialog.select.point.vue

@@ -57,7 +57,7 @@
             min-width="40%"
           >
             <template slot-scope="scope">
-              <pre>{{ scope.row.pointName }}</pre>
+              <div style="white-space: pre-wrap">{{ scope.row.pointName }}</div>
             </template>
           </el-table-column>
           <el-table-column
@@ -121,9 +121,9 @@ export default {
     },
   },
   methods: {
-    show(defaultSelect) {     
-      if(this.orgType==null) {
-        this.prevOrgType=this.orgType;
+    show(defaultSelect) {
+      if (this.orgType == null) {
+        this.prevOrgType = this.orgType;
         this.$modal.alert("请选择机构类型");
         return;
       }
@@ -132,26 +132,26 @@ export default {
         this.selectList = defaultSelect.map((s) => ({ id: s }));
       }
       if (this.prevOrgType == this.orgType) {
-        this.search.itemName=null;
+        this.search.itemName = null;
         if (this.search.ruleId) {
           this.$refs.st.search();
         }
       } else {
         this.search = this.emptySearch();
         ruleListForOrg({ orgType: this.orgType }).then((r) => {
-        this.ruleList = r.data;
-        this.prevOrgType = this.orgType;
-        if (r.data && r.data.length > 0) {
-          this.search.ruleId = r.data[0].id;
-        }
-      });
+          this.ruleList = r.data;
+          this.prevOrgType = this.orgType;
+          if (r.data && r.data.length > 0) {
+            this.search.ruleId = r.data[0].id;
+          }
+        });
       }
     },
     onHide() {
       this.isShow = false;
     },
     closed() {
-      this.$refs.st.dataList=[];
+      this.$refs.st.dataList = [];
     },
     onSelect(item) {
       this.selectList = item;

+ 4 - 1
src/views/resumption/ruleManager/index.vue

@@ -143,8 +143,11 @@
                     header-align="center"
                     prop="name"
                     label="履职内容"
-                    v-if="columns[3].visible"
+                    v-if="columns[3].visible"                    
                   >
+                  <template slot-scope="scope">
+                    <div style="white-space:pre-wrap">{{scope.row.name}}</div>
+                  </template>
                   </el-table-column>
                   <el-table-column
                     header-align="center"

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

@@ -36,7 +36,9 @@
           <el-table :data="formData.pointDtoList" border style="width: 100%">
             <el-table-column header-align="center" prop="name" label="检查内容">
               <template slot-scope="scope">
-                <pre>{{ scope.row.name }}</pre>
+                <div style="white-space: pre-wrap">
+                  {{ scope.row.name }}
+                </div>
               </template>
             </el-table-column>
             <el-table-column

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

@@ -30,7 +30,7 @@
               placeholder="请输入检查项或检查内容"
             ></el-input>
           </el-form-item>
-          <el-form-item prop="ruleId" label="检查内容库">
+          <el-form-item prop="ruleId" label="检查手册">
             <el-select v-model="search.ruleId">
               <el-option
                 v-for="item in ruleList"

+ 5 - 0
src/views/safetycheck/ruleManager/index.vue

@@ -121,6 +121,11 @@
                     label="检查内容"
                     v-if="columns[3].visible"
                   >
+                    <template slot-scope="scope">
+                      <div style="white-space: pre-wrap">
+                        {{ scope.row.name }}
+                      </div>
+                    </template>
                   </el-table-column>
                   <el-table-column
                     header-align="center"