Ver Fonte

修改显示方式

FinalYu há 5 meses atrás
pai
commit
bd01bb926b

+ 4 - 4
nasc-admin/src/main/resources/application-druid.yml

@@ -6,11 +6,11 @@ spring:
         druid:
             # 主库数据源
             master:
-#                url: jdbc:mysql://localhost:3306/nasctools?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
-                url: jdbc:mysql://localhost:3307/nasctools?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+                url: jdbc:mysql://localhost:3306/nasctools?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+#                url: jdbc:mysql://localhost:3307/nasctools?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                 username: root
-#                password: jd@2024
-                password: root
+                password: jd@2024
+#                password: root
             # 从库数据源
             slave:
                 # 从数据源开关/默认关闭

+ 4 - 4
nasc-admin/src/main/resources/application.yml

@@ -16,8 +16,8 @@ nasc:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8080
-#  port: 8088
+#  port: 8080
+  port: 8088
   servlet:
     # 应用的访问路径
     context-path: /
@@ -75,8 +75,8 @@ spring:
     # 数据库索引
     database: 0
     # 密码
-#    password: jd@2024
-    password:
+    password: jd@2024
+#    password:
     # 连接超时时间
     timeout: 10s
     lettuce:

+ 2 - 2
nasc-ui/src/layout/components/Navbar.vue

@@ -83,8 +83,8 @@
           type: 'warning'
         }).then(() => {
           this.$store.dispatch('LogOut').then(() => {
-            location.href = '/index';
-            // location.href = '/nasc/index.html';
+            // location.href = '/index';
+            location.href = '/nasc/index.html';
           })
         }).catch(() => { });
       }

+ 2 - 2
nasc-ui/src/router/index.js

@@ -177,8 +177,8 @@ Router.prototype.replace = function push(location) {
 }
 
 export default new Router({
-  // mode: 'hash',
-  mode: 'history',
+  mode: 'hash',
+  // mode: 'history',
   base: '/nasc/',
   scrollBehavior: () => ({ y: 0 }),
   routes: constantRoutes

+ 2 - 2
nasc-ui/src/utils/request.js

@@ -87,8 +87,8 @@ service.interceptors.response.use(res => {
         MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
           isRelogin.show = false;
           store.dispatch('LogOut').then(() => {
-            location.href = '/index';
-            // location.href = '/nasc/index.html';
+            // location.href = '/index';
+            location.href = '/nasc/index.html';
           })
       }).catch(() => {
         isRelogin.show = false;

+ 15 - 1
nasc-ui/src/views/index.vue

@@ -1,10 +1,11 @@
 <template>
   <div class="app-container home">
-
   </div>
 </template>
 
 <script>
+import { getUserProfile } from '@/api/system/user'
+
 export default {
   name: "Index",
   data() {
@@ -13,7 +14,20 @@ export default {
       version: "1.0.0"
     };
   },
+  created() {
+    this.getUser();
+  },
   methods: {
+    getUser() {
+      getUserProfile().then(response => {
+        let roles = response.data.roles;
+        roles.forEach(role => {
+          if (role.roleKey === 'Worker') {
+            this.$router.push({ path: "/matter/index" }).catch(() => { });
+          }
+        });
+      });
+    },
     goTarget(href) {
       window.open(href, "_blank");
     }

+ 59 - 16
nasc-ui/src/views/matter/index/index.vue

@@ -31,13 +31,17 @@
           </el-tree>
         </div>
       </el-col>
-      <el-col v-show="showMatterView" :span="1" :xs="24" class="matter-content" >
-        <i class="el-icon-d-arrow-right"
+      <el-col :span="1" :xs="24" class="matter-content" style="margin-left: 10px;">
+        <i v-show="showMatterView" class="el-icon-d-arrow-right"
            style="color: #409eff; cursor: pointer; position: absolute; top: 49%; transform: translateX(50%);"
-           @click="changeView"
+           @click="changeView(false)"
            title="展开"></i>
+        <i v-show="!showMatterView" class="el-icon-d-arrow-left"
+           style="color: #409eff; cursor: pointer; position: absolute; top: 49%; transform: translateX(50%);"
+           @click="changeView(true)"
+           title="收起"></i>
       </el-col>
-      <el-col :span="showMatterView ? 22 : 15" :xs="24" class="matter-content" style="margin-left: 10px;">
+      <el-col :span="showMatterView ? 22 : 14" :xs="24" class="matter-content" style="margin-left: 10px;">
         <template v-if="preQuestionPart">
           <div class="matter-title-h" style="font-style: italic; color: #00afff; margin-bottom: -10px;" :title="currMatter.itemName">
             <i class="el-icon-collection"></i>&nbsp;&nbsp;{{ currMatter.itemName }}
@@ -78,22 +82,22 @@
               </el-row>
               <el-row style="margin-top: 20px;">
                 <label style="color: #00afff;">三、材料说明</label>
-                <div class="matter-material" style="display: flex; align-items: center;">
+                <div class="matter-material" style="display: flex;">
                   <div style="width: 30%;">
-                    <ul>
-                      <li v-for="item in currMaterial.materialList" @click="handleMaterialItem(item)"
-                        style="padding: 5px; cursor: pointer; color: #4285f4;">
+                    <ul class="material-list">
+                      <li v-for="item in currMaterial.materialList" @click="handleMaterialItem($event, item)"
+                        class="material-item">
                         {{ item.listName }}
                       </li>
                     </ul>
                   </div>
                   <div class="material-line" :style="lineHeight"></div>
-                  <div class="material-content" style="width: 69%; padding: 10px;">
-                    <div v-show="showMaterialInfo">
-                      <template v-if="!currMaterialInfo.memo && (!currMaterialInfo.imgList || currMaterialInfo.imgList.length == 0)">
+                  <div style="width: 69%; padding: 10px;">
+                    <div v-show="showMaterialInfo" class="material-content">
+                      <template v-if="!hasRichTextContent(currMaterialInfo.memo) && (!currMaterialInfo.imgList || currMaterialInfo.imgList.length == 0)">
                         <div style="margin: 10px; color: #aea6a3">暂无数据</div>
                       </template>
-                      <template v-if="currMaterialInfo.memo">
+                      <template v-if="hasRichTextContent(currMaterialInfo.memo)">
                         <label>审查要点</label>
                         <div v-html="currMaterialInfo.memo" style="margin: 10px;"></div>
                       </template>
@@ -285,6 +289,7 @@
       },
       /** 左侧树节点单击事件 **/
       handleNodeClick(data) {
+        let _this = this;
         if (!data.isMatter) {
           return
         }
@@ -296,7 +301,7 @@
           loadingInstance.close()
           const matterData = response.data
           this.currMatter = matterData
-          this.showMatterView = true
+          // this.showMatterView = true
           if (this.sidebar.opened) {
             this.$store.dispatch('app/toggleSideBar')
           }
@@ -312,6 +317,10 @@
             this.showMaterialInfo = false
             this.currMaterial = matterData.material ? matterData.material : {}
             this.dealWithPrintInfo()
+            setTimeout(() => {
+              let listHeight = document.getElementsByClassName('material-list')[0].clientHeight
+              _this.lineHeight = 'height: ' + listHeight + 'px;'
+            })
           }
         });
       },
@@ -329,8 +338,8 @@
       /**
        * 切换视图显示
        */
-      changeView() {
-        this.showMatterView = false
+      changeView(flag) {
+        this.showMatterView = flag
       },
       /** 一次性告知单模板
        * {$year}:当前年
@@ -432,9 +441,25 @@
         }
         return deptItem
       },
+      /** 检查富文本是否有内容 */
+      hasRichTextContent(htmlContent) {
+        if (!htmlContent) return false;
+        // 去除HTML标签,只保留纯文本
+        let textContent = htmlContent.replace(/<[^>]*>/g, '');
+        // 去除空白字符(包括空格、制表符、换行符等)
+        let trimmedTextContent = textContent.trim();
+        // 判断纯文本内容是否非空
+        return trimmedTextContent !== '';
+      },
       /** 材料清单点击事件 **/
-      handleMaterialItem(item) {
+      handleMaterialItem(e, item) {
         let _this = this
+        const targetElement = e.target;
+        this.$el.querySelectorAll('.material-item').forEach(el => {
+          el.classList.remove('material-selected');
+        });
+        targetElement.classList.add('material-selected');
+
         this.showMaterialInfo = true
         if (item) {
           let imgList = item.imgs ? item.imgs.split('*') : []
@@ -443,6 +468,7 @@
         } else {
           this.currMaterialInfo = {}
         }
+
         let count = 0;
         let checkContentHeight = setInterval(function() {
           _this.loadImgSuccess()
@@ -452,6 +478,11 @@
       },
       loadImgSuccess() {
         let height = document.getElementsByClassName('material-content')[0].clientHeight
+        let listHeight = document.getElementsByClassName('material-list')[0].clientHeight
+        if (height < listHeight) {
+          height = listHeight
+        }
+        console.log(height, listHeight)
         this.lineHeight = 'height: ' + height + 'px;'
       },
       /** 查询远程桌面列表 */
@@ -552,6 +583,18 @@
     border-radius: 8px;
     font-size: 14px;
     padding: 10px;
+    word-wrap: break-word;
+  }
+
+  .material-item {
+    padding: 5px;
+    cursor: pointer;
+    color: #82848a;
+  }
+
+  .material-selected {
+    color: #4285f4;
+    text-decoration: underline;
   }
 
   .custom-tree-node {

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

@@ -163,7 +163,7 @@
             <el-row>
               <el-col :span="24">
                 <el-form-item label="材料名称" required :error="domain.customError">
-                  <el-input v-model="domain.listName" placeholder="请输入材料名称" :maxlength="255"
+                  <el-input v-model="domain.listName" placeholder="请输入材料名称"
                     @blur="checkCustomValid(index)" />
                 </el-form-item>
               </el-col>
@@ -171,8 +171,9 @@
             <el-row>
               <el-col :span="24">
                 <el-form-item label="审查要点">
-                  <el-input v-model="domain.memo" type="textarea" placeholder="请输入审查要点" :autosize="{minRows: 3}"
-                    :style="{width: '100%'}"></el-input>
+<!--                  <el-input v-model="domain.memo" type="textarea" placeholder="请输入审查要点" :autosize="{minRows: 3}"-->
+<!--                    :style="{width: '100%'}"></el-input>-->
+                  <editor v-model="domain.memo" :min-height="152" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -277,7 +278,7 @@
               message: '问题题目不能全部为空',
               trigger: 'blur'
             }]">
-              <el-input v-model="prblemform.title" placeholder="请输入问题题目" :maxlength="255"></el-input>
+              <el-input v-model="prblemform.title" placeholder="请输入问题题目"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -301,8 +302,7 @@
                     message: '选项不能全部为空',
                     trigger: 'blur'
                   }]">
-                  <el-input v-model="domain.option" placeholder="请输入选择选项" clearable :style="{width: '100%'}"
-                    :maxlength="255">
+                  <el-input v-model="domain.option" placeholder="请输入选择选项" clearable :style="{width: '100%'}">
                   </el-input>
                 </el-form-item>
               </el-col>
@@ -364,15 +364,16 @@
                         message: '材料名称不能全部为空',
                         trigger: 'blur'
                       }]">
-                      <el-input v-model="domainp.listName" placeholder="请输入材料名称" :maxlength="255" />
+                      <el-input v-model="domainp.listName" placeholder="请输入材料名称" />
                     </el-form-item>
                   </el-col>
                 </el-row>
                 <el-row>
                   <el-col :span="24">
                     <el-form-item label="审查要点" :prop="prblemform.optionlist[index].materialListPro[indexp].memo">
-                      <el-input v-model="domainp.memo" type="textarea" placeholder="请输入审查要点" :autosize="{minRows: 3}"
-                        :style="{width: '100%'}"></el-input>
+<!--                      <el-input v-model="domainp.memo" type="textarea" placeholder="请输入审查要点" :autosize="{minRows: 3}"-->
+<!--                        :style="{width: '100%'}"></el-input>-->
+                      <editor v-model="domainp.memo" :min-height="152" />
                     </el-form-item>
                   </el-col>
                 </el-row>

+ 3 - 3
nasc-ui/src/views/system/user/profile/resetPwd.vue

@@ -69,8 +69,8 @@
             updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.$store.dispatch('LogOut').then(() => {
-                location.href = '/index';
-                // location.href = '/nasc/index.html';
+                // location.href = '/index';
+                location.href = '/nasc/index.html';
               })
             });
           }
@@ -88,4 +88,4 @@
       }
     }
   };
-</script>
+</script>

+ 2 - 2
nasc-ui/vue.config.js

@@ -35,8 +35,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://172.16.99.12:8080`,
-        // target: `http://127.0.0.1:8088`,
+        // target: `http://172.16.99.102:8080`,
+        target: `http://127.0.0.1:8088`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''