wangggziwen hace 1 mes
padre
commit
7d40b0a192

+ 4 - 3
ruoyi-ui/src/views/rc/standardquestionnaire/index.vue

@@ -15,7 +15,7 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10" class="mb8" v-if="showEdit">
       <el-col :span="1.5">
         <el-button
           plain
@@ -66,7 +66,7 @@
       <el-table-column label="目录" align="center" prop="directory" width="200" />
       <el-table-column label="序号" align="center" prop="code" />
       <el-table-column label="名称" align="center" prop="name" width="350" />
-      <el-table-column label="YES" align="center" prop="yesNoNa">
+      <el-table-column label="YES" align="center" prop="yesNoNa" v-if="showEdit">
         <template slot-scope="scope">
           <span>{{scope.row.yesNoNa == 1 ? "√" : ""}}</span>
         </template>
@@ -109,7 +109,7 @@
           <span>{{scope.row.delFlag == 0 ? "正常" : "删除"}}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width" v-if="showEdit">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -254,6 +254,7 @@ import { addCommonfile, allFileList, delCommonfile, updateCommonfile } from "@/a
 export default {
   name: "StandardQuestionnaire",
   dicts: ['t_open_item_result', 't_open_item_type', 't_open_item_level', 't_open_item_status','t_sec_sub_chap_completion_status', 't_sec_sub_chap_yes_no_na', 't_sec_sub_chap_type', 't_sec_sub_chap_standard'],
+  props: ['showEdit'],
   data() {
     return {
       clientHeight:300,

+ 16 - 1
ruoyi-ui/src/views/rc/standardtemplate/index.vue

@@ -5,7 +5,7 @@
         <standard-chapter ref="standardchapter" @questionnaire="getQuestionnaire"></standard-chapter>
       </el-col>
       <el-col :span="19" :xs="24">
-        <standard-questionnaire ref="standardquestionnaire"></standard-questionnaire>
+        <standard-questionnaire ref="standardquestionnaire" :showEdit="showEdit"></standard-questionnaire>
       </el-col>
     </el-row>
   </div>
@@ -18,9 +18,24 @@ import StandardQuestionnaire from "../standardquestionnaire";
 export default {
   name: "StandardTemplate",
   components: { StandardChapter, StandardQuestionnaire },
+  props: ['isShow'],
+  data() {
+    return {
+      showEdit: true,
+    };
+  },
   mounted() {
     this.$refs.standardchapter.getList();
     this.$refs.standardquestionnaire.getList();
+    if (this.isShow == true) {
+      // console.log("this.isShow == " + this.isShow)
+      this.showEdit = false;
+      // console.log("this.showEdit = " + this.showEdit)
+    } else {
+      // console.log("this.isShow == " + this.isShow);
+      this.showEdit = true;
+      // console.log("this.showEdit = " + this.showEdit);
+    }
   },
   methods: {
     getQuestionnaire(chapterId) {

+ 8 - 3
ruoyi-ui/src/views/showstandardtemplate.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-      <standard-template></standard-template>
+      <standard-template :isShow="isShow"></standard-template>
     </div>
 </template>
 
@@ -8,8 +8,13 @@
   import StandardTemplate from "./rc/standardtemplate";
 
     export default {
-        name: "showstandardtemplate",
-        components: { StandardTemplate },
+      name: "showstandardtemplate",
+      components: { StandardTemplate },
+      data() {
+        return {
+          isShow: true,
+        };
+      },
     }
 </script>