Bläddra i källkod

4.0.19 修改评论功能

liuyanpeng 2 år sedan
förälder
incheckning
f1c0dabcb0

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.0.18",
+  "version": "4.0.19",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 108 - 42
src/window/tabFormView/CurdWindowComment.vue

@@ -6,24 +6,73 @@
 
 <template>
   <div>
-    <div v-for="items in traceComments" :key="items" class="media">
+    <div v-for="item in traceComments" :key="item.id" class="media">
       <div class="media-body">
-        <div>
-          <!-- eslint-disable-next-line -->
-          <div v-html="items.content" />
-          
-        </div>
-        <div v-if="items.attachments != '' && items.attachments != undefined">
-          <div
-            v-for="item in split(items.attachments)"
-            :key="item"
-            @click="download(item)"
-          >
-            <a>{{ item }}</a>
+        <div class="commentClass">
+          <AuthImage
+            :auth-src="getImgSrc(item.imageName)"
+            class="media-object thumbnail m-image"
+            style="height: 120px"
+          />
+          <div class="commentDetail">
+            <div class="common">
+              <span class="media-heading">
+                {{ item.createdName }}
+                <a-tag style="font-size: 12px; margin: 0 18px" color="red">评论人</a-tag>
+              </span>
+              <span class="media-heading">
+                {{
+                  item.carbonCopyUserIds ? item.carbonCopyUserIds : "暂无通知人"
+                }}
+                <a-tag style="font-size: 12px; margin: 0 18px" color="orange">通知人</a-tag>
+              </span>
+            </div>
+            <div class="common">
+              <span style="font-size: 12px">{{ item.created }}</span>
+            </div>
+            <div class="common">
+              <span>主题</span>
+              <p>{{ item.theme }}</p>
+            </div>
+            <div class="common">
+              <span>评论的内容</span>
+              <!-- eslint-disable-next-line -->
+              <div v-html="item.content" />
+            </div>
+            <div
+              v-if="item.attachments != '' && item.attachments != undefined"
+              class="common"
+            >
+              <div
+                v-for="file in split(item.attachments)"
+                :key="file"
+                class="files"
+                @click="download(file)"
+              >
+                <!-- <a><FileTextOutlined style="margin-right: 12px" />{{ file }}</a> -->
+                <svg
+                  id="mx_n_1708679906318"
+                  t="1708679906318"
+                  class="icon"
+                  viewBox="0 0 1024 1024"
+                  version="1.1"
+                  xmlns="http://www.w3.org/2000/svg"
+                  p-id="4949"
+                  width="16"
+                  height="16"
+                >
+                  <path
+                    d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z"
+                    fill="#3D3D3D"
+                    p-id="4950"
+                  />
+                </svg>
+                <a style="margin-left: 12px"> {{ file }}</a>
+              </div>
+            </div>
           </div>
         </div>
-        <br />
-        {{ items.created }}
+        <a-divider />
       </div>
     </div>
   </div>
@@ -32,17 +81,20 @@
 <script>
 import Common from '../../common/Common.js';
 import { DownloadService } from 'pc-component-v3';
+import AuthImage from '../../widget/AuthImage.vue';
+import { FileTextOutlined } from '@ant-design/icons-vue';
 export default {
   components: {
-    
     DownloadService,
+    AuthImage,
+    FileTextOutlined,
   },
   // props: ['traceId', 'trace'],
   props: {
     traceId: {
       type: String,
       default: null,
-    }, 
+    },
     trace: {
       type: String,
       default: null,
@@ -54,6 +106,7 @@ export default {
       traceComments: [],
       className: 'com.leanwo.prodog.system.model.CurdWindowComment',
       uuid: '',
+      userClassName: 'com.leanwo.prodog.base.model.User',
     };
   },
 
@@ -72,6 +125,14 @@ export default {
     }
   },
   methods: {
+    // 获取图片路径
+    getImgSrc: function (imageName) {
+      var _self = this;
+      if (imageName == undefined || imageName == '') {
+        return '/static/assets/client-base-v4/image/no-image.png';
+      }
+      return Common.getThumbnailImageSrc(_self.userClassName, imageName);
+    },
     /**
      * 根据追踪表Id获取评论
      * @author GuoZhiBo 20171201
@@ -79,7 +140,9 @@ export default {
     getTraceComment: function () {
       var _self = this;
       $.ajax({
-        url: Common.getApiURL('CurdWindowCommentResource/queryCurdWindowComment'),
+        url: Common.getApiURL(
+          'CurdWindowCommentResource/queryCurdWindowComment',
+        ),
         type: 'get',
         dataType: 'json',
         async: false,
@@ -118,37 +181,40 @@ export default {
       var _self = this;
       DownloadService.fileDownload(_self.className, fileName);
     },
-    /**
-     * 获取图片地址
-     * @param  {String} item 图片名称
-     * @return {String}      图片URL地址
-     */
-    getImageSrc: function (item) {
-      var _self = this;
-      if (item != undefined && item != null) {
-        return Common.getImageSrc(
-          'com.leanwo.prodog.system.model.CurdWindowComment',
-          item,
-        );
-      } else {
-        return '';
-      }
-    },
-    /**
-     * 获取图片地址
-     */
-    getImageSrcName: function (imageName) {
-      return Common.getImageSrc('com.leanwo.prodog.model.base.User', imageName);
-    },
-
   },
 };
 </script>
 
 <style scoped>
-.headDiv{
+.headDiv {
   display: flex;
   justify-content: space-between;
   font-size: 14px;
 }
+.commentClass {
+  display: flex;
+}
+.commentDetail {
+  margin-left: 24px;
+}
+.common {
+  padding-bottom: 10px;
+}
+:deep(p) {
+  margin-left: 24px;
+  margin-bottom: 0px !important;
+  font-size: 14px;
+  width: 90%;
+}
+span {
+  font-size: 16px;
+}
+.ant-divider-horizontal {
+  margin: 6px 0;
+}
+.files {
+  display: flex;
+  align-items: center;
+  justify-self: start;
+}
 </style>

+ 6 - 6
src/window/tabFormView/CurdWindowCommentCreate.vue

@@ -92,7 +92,6 @@ import UpladFile from '../../common/UpladFile.js';
 import Common from '../../common/Common.js';
 import { Notify } from 'pc-component-v3';
 import { DownloadService } from 'pc-component-v3';
-import { message } from 'ant-design-vue';
 import UserResource from '../../api/base/UserResource.js';
 
 export default {
@@ -169,8 +168,8 @@ export default {
           ],
         ],
       ],
-      height: 400,
-      minHeight: 300,
+      height: 250,
+      minHeight: 250,
       maxHeight: 500,
       focus: true,
       lang: 'zh-CN',
@@ -328,7 +327,7 @@ export default {
                   _self.addImg(imageName);
                 }
               } else {
-                message.error(data.errorMessage);
+                Notify.error('提示', data.errorMessage);
               }
             },
             error: function (XMLHttpRequest, textStatus, errorThrown) {
@@ -443,7 +442,7 @@ export default {
                   _self.files.push(fileName);
                 }
               } else {
-                message.error(data.errorMessage);
+                Notify.error('提示', data.errorMessage);
               }
 
             },
@@ -540,7 +539,7 @@ export default {
                   );
                 }
               } else {
-                message.error(data.errorMessage);
+                Notify.error('提示', data.errorMessage);
               }
             },
             error: function () {
@@ -567,6 +566,7 @@ export default {
           attachments: _self.files.join(','),
           carbonCopyUserIds: _self.userIds.join(','),
           windowNo: _self.windowNo,
+          theme: _self.theme,
         };
         _self.loading=true;
         $.ajax({

+ 1 - 1
src/workflow/ApproveComment.vue

@@ -1434,7 +1434,7 @@ th {
 }
 
 @keyframes go {
-  0 {
+  0% {
     transform: scale(1);
   }
   /* 25% {

+ 4 - 1
src/workflow/TaskProcessManagement.vue

@@ -882,7 +882,10 @@ export default {
       });
       _self.processDatas = datas;
     },
-
+    // 在线 corn 表达式
+    onlineCorn: function () {
+      window.open('https://cron.qqe2.com/');
+    },
     loadTaskTemplate: function () {
       $.ajax({
         url: Common.getApiURL('TaskDefineTemplateEditResource/generateTask'),