heyang преди 2 години
родител
ревизия
659d0abe85
променени са 2 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 4 4
      src/views/hazardManagement/hazard/addLaboratory.vue
  2. 1 1
      src/views/hazardManagement/hazard/index.vue

+ 4 - 4
src/views/hazardManagement/hazard/addLaboratory.vue

@@ -69,7 +69,9 @@ export default {
   data() {
     return {
       getType:false,
-      form:{},
+      form:{
+        content:'',
+      },
       // 表单校验
       rules: {
         chName: [
@@ -162,8 +164,6 @@ export default {
     }
   },
   created() {
-    // this.reset();
-    console.log(this.form.content)
     this.form.id = this.hazardId
     if(this.form.id){
       this.handleUpdate()
@@ -178,7 +178,7 @@ export default {
   methods: {
     //预览
     previewButton(){
-
+      this.$set(this.form,'content',this.$refs.UEditor.text);
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.$set(this,'text',this.$refs.UEditor.text);

+ 1 - 1
src/views/hazardManagement/hazard/index.vue

@@ -57,7 +57,7 @@
         <el-table-column label="实验室危险源占比" align="left" prop="labScale">
           <template slot-scope="scope">
             <div class="progress-box">
-            <el-progress :text-inside="true" :stroke-width="20" color="#52a1fe" :percentage="scope.row.labScale" style="margin-right:74px;"></el-progress>
+            <el-progress :text-inside="true" :stroke-width="20" color="#52a1fe" :percentage="scope.row.labScale>100?100:scope.row.labScale" style="margin-right:74px;"></el-progress>
             </div>
           </template>
         </el-table-column>