xyg 10 kuukautta sitten
vanhempi
commit
35552a7773
2 muutettua tiedostoa jossa 77 lisäystä ja 17 poistoa
  1. 38 8
      nasc-ui/src/views/matter/index/index.vue
  2. 39 9
      nasc-ui/src/views/matter/item/index.vue

+ 38 - 8
nasc-ui/src/views/matter/index/index.vue

@@ -11,7 +11,8 @@
           <el-tree v-show="stepViewFlag" :load="loadDeptNode" :props="defaultProps" :expand-on-click-node="false"
             ref="tree" node-key="id" lazy accordion default-expand-all highlight-current @node-click="handleNodeClick">
             <template slot-scope="{ node, data }">
-              <span class="custom-tree-node" :class="{ 'is-dept': !data.isMatter, 'is-matter': data.isMatter }">
+              <span class="custom-tree-node" :class="{ 'is-dept': !data.isMatter, 'is-matter': data.isMatter }"
+                :title="data.deptName ? data.deptName : data.itemName">
                 <i class="el-icon" :class="data.isMatter ? 'el-icon-tickets' : 'el-icon-office-building'"></i>
                 <span>{{ data.deptName ? data.deptName : data.itemName }}</span>
               </span>
@@ -21,7 +22,8 @@
             ref="searchTree" node-key="id" :lazy="false" accordion default-expand-all highlight-current
             @node-click="handleNodeClick">
             <template slot-scope="{ node, data }">
-              <span class="custom-tree-node" :class="{ 'is-dept': !data.isMatter, 'is-matter': data.isMatter }">
+              <span class="custom-tree-node" :class="{ 'is-dept': !data.isMatter, 'is-matter': data.isMatter }"
+                :title="data.deptName ? data.deptName : data.itemName">
                 <i class="el-icon" :class="data.isMatter ? 'el-icon-tickets' : 'el-icon-office-building'"></i>
                 <span>{{ data.deptName ? data.deptName : data.itemName }}</span>
               </span>
@@ -31,16 +33,17 @@
       </el-col>
       <el-col :span="15" :xs="24" class="matter-content" style="margin-left: 10px;">
         <template v-if="preQuestionPart">
-          <h2 style="font-style: italic; color: #00afff; margin-bottom: -10px;">
+          <div style="font-style: italic; color: #00afff; margin-bottom: -10px;">
             <i class="el-icon-collection"></i>&nbsp;&nbsp;前置问题
-          </h2>
+          </div>
           <el-divider></el-divider>
           <el-alert :title="currMatterQuestion.desc" type="success" class="matter-title" :closable="false">
           </el-alert>
           <el-row style="margin-top: 20px;">
             <template v-for="option in currMatterQuestion.preQuestionOptionList">
               <el-row style="display: flex; justify-content: center; margin: 10px;">
-                <el-button type="primary" plain class="text-wrap-button" style="width: 40%;" @click="handleOptionClick(option, $event)">{{
+                <el-button type="primary" plain class="text-wrap-button" style="width: 50%;"
+                  @click="handleOptionClick(option, $event)">{{
                   option.desc }}</el-button>
               </el-row>
             </template>
@@ -52,7 +55,8 @@
             <el-button type="primary" size="mini" v-print="printObj">打印一次性告知单</el-button>
           </el-row>
           <el-row id="print_material" style="height: 100%; padding: 10px;">
-            <h2 style="font-style: italic; color: #00afff; margin-bottom: -10px;">
+            <h2 style="font-style: italic; color: #00afff; margin-bottom: -10px;" class="qzprblem"
+              :title="currMatter.itemName">
               <i class="el-icon-collection"></i>&nbsp;&nbsp; {{ currMatter.itemName }}
             </h2>
             <el-divider></el-divider>
@@ -347,7 +351,7 @@
   }
 
   .matter-title {
-    margin-top: 50px;
+    margin-top: 0px;
     background-color: #E7F0F9;
     color: #217BD3;
     font-weight: 600;
@@ -388,6 +392,7 @@
     height: 100%;
     min-height: 50px;
   }
+
   .text-wrap-button {
     white-space: normal !important;
     word-break: break-all;
@@ -416,4 +421,29 @@
   .ql-align-center {
     text-align: center;
   }
-</style>
+
+
+  .el-divider--horizontal {
+    margin: 20px 0;
+  }
+
+  .qzprblem {
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    /* 设置最大显示行数 */
+    -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+
+  }
+
+  .custom-tree-node {
+    width: calc(100% - 20px);
+  }
+
+  .custom-tree-node span {
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
+</style>

+ 39 - 9
nasc-ui/src/views/matter/item/index.vue

@@ -10,7 +10,13 @@
         <div class="head-container">
           <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
             :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
-            @node-click="handleNodeClick" />
+            @node-click="handleNodeClick">
+            <span slot-scope="{ node, data }" class="custom-tree-node">
+              <el-tooltip :content="data.label" placement="top" effect="dark">
+                <span>{{ data.label }}</span>
+              </el-tooltip>
+            </span>
+          </el-tree>
         </div>
       </el-col>
       <!-- 事项数据 -->
@@ -89,7 +95,7 @@
 
     <!-- 添加或修改审查事项对话框 -->
     <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="850px" @close="cancel"
-      @open="handleDialogOpen" append-to-body>
+      @open="handleDialogOpen" id="itemDialog" append-to-body>
       <el-form ref="formDataref" :model="formData" :rules="rules" label-width="80px">
         <el-row>
           <el-col :span="24">
@@ -242,7 +248,7 @@
 
     <!-- 添加或修改问题选项对话框 -->
     <el-dialog :title="title" :visible.sync="problemopen" @close="cancelproblem" :close-on-click-modal="false"
-      width="850px" @open="handleDialogOpen" append-to-body>
+      width="850px" id="problemDialog" @open="handleDialogOpenP" append-to-body>
       <el-form ref="prblemformref" :model="prblemform" :rules="rulesproblem" label-width="80px">
         <el-row>
           <el-col :span="24">
@@ -294,7 +300,8 @@
             </el-row>
             <el-row>
               <el-col :span="24">
-                <el-form-item label="题目跳转" :prop="'optionlist['+index+'].Jump'">
+                <el-form-item label="题目跳转" :prop="'optionlist['+index+'].Jump'"
+                  :rules="[{required: true,message: '请选择跳转题目', trigger: 'change'}]">
                   <el-radio-group v-model="domain.Jump" @change="handleJumpChange">
                     <el-radio key="1" label="是"></el-radio>
                     <el-radio key="2" label="否"></el-radio>
@@ -568,10 +575,18 @@
       handleDialogOpen() {
         // 使用Vue.nextTick确保DOM已经更新
         this.$nextTick(() => {
-          const dialogBody = document.getElementsByClassName("el-dialog__body");
-          console.log(dialogBody)
+          const dialogBody = document.querySelector("#itemDialog .el-dialog__body");
           if (dialogBody) {
-            dialogBody[0].scrollTop = 0;
+            dialogBody.scrollTop = 0;
+          }
+        });
+      },
+      handleDialogOpenP() {
+        // 使用Vue.nextTick确保DOM已经更新
+        this.$nextTick(() => {
+          const dialogBody = document.querySelector("#problemDialog .el-dialog__body");
+          if (dialogBody) {
+            dialogBody.scrollTop = 0;
           }
         });
       },
@@ -602,8 +617,10 @@
       },
       /** 是否前置选择器 */
       handleVersionChange(prefixQuestion) {
+        this.handleDialogOpen();
       },
       handleJumpChange(Jump) {
+        this.handleDialogOpenP();
       },
       /** 查询审查事项列表 */
       getList() {
@@ -637,6 +654,7 @@
       // 节点单击事件
       handleNodeClick(data) {
         this.queryParams.deptId = data.id;
+        this.formData.deptId = data.id;
         this.handleQuery();
       },
       /** 搜索按钮操作 */
@@ -656,7 +674,10 @@
         this.open = true;
         this.title = "添加审查事项";
         this.reset();
-        try { this.$refs.formDataref.clearValidate('deptId') } catch (e) { }
+        try {
+          this.$refs.formDataref.resetFields();
+          this.$refs.formDataref.clearValidate('deptId')
+        } catch (e) { }
       },
       addItem() {
         this.title = "添加问题题目"
@@ -1109,7 +1130,7 @@
       },
       reset() {
         this.formData = {
-          deptId: undefined,
+          deptId: this.formData.deptId ? this.formData.deptId : undefined,
           itemName: '',
           contacts: '',
           contactsPhone: '',
@@ -1173,4 +1194,13 @@
   .el-select-dropdown.el-popper {
     max-width: 600px;
   }
+
+  .custom-tree-node {
+    flex: 1;
+    display: inline-block;
+    vertical-align: middle;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
 </style>