Parcourir la source

评论优化和修改BUG

liangzhicheng il y a 2 ans
Parent
commit
7eacbdfed4

+ 2 - 13
src/window/tabFormView/CurdWindowComment.vue

@@ -7,10 +7,6 @@
 <template>
   <div>
     <div v-for="items in traceComments" :key="items" class="media">
-      <h4 class="media-heading headDiv">
-        {{ items.createdName
-        }}<a class="fa-pull-right" @click="edit(items)">编辑</a>
-      </h4>
       <div class="media-body">
         <div>
           <!-- eslint-disable-next-line -->
@@ -56,7 +52,7 @@ export default {
   data: function () {
     return {
       traceComments: [],
-      className: 'com.leanwo.prodog.trace.model.TraceComment',
+      className: 'com.leanwo.prodog.system.model.CurdWindowComment',
       uuid: '',
     };
   },
@@ -131,7 +127,7 @@ export default {
       var _self = this;
       if (item != undefined && item != null) {
         return Common.getImageSrc(
-          'com.leanwo.prodog.trace.model.TraceComment',
+          'com.leanwo.prodog.system.model.CurdWindowComment',
           item,
         );
       } else {
@@ -145,13 +141,6 @@ export default {
       return Common.getImageSrc('com.leanwo.prodog.model.base.User', imageName);
     },
 
-    /**
-     * 打开评论界面进行评论
-     * @author GuoZhiBo 20171201
-     */
-    edit: function (item) {
-      this.$router.push('/trace/traceCommentEdit/' + item.id);
-    },
   },
 };
 </script>

+ 17 - 16
src/window/tabFormView/CurdWindowCommentCreate.vue

@@ -1,23 +1,8 @@
 <template>
   <div>
     <div>
-      <Navbar title="创建评论" />
+      <!-- <Navbar title="创建评论" /> -->
       <div>
-        <div class="form-group">
-          <label for="exampleInputEmail2">接收人</label>
-          <a-select
-            v-model:value="userIds"
-            mode="multiple"
-            style="width: 100%"
-            placeholder="选择抄送人"
-            :options="options"
-            :filter-option="false"
-            auto-clear-search-value
-            @change="handleChange"
-            @search="listInGroupCompanyByCondition"
-          />
-        </div>
-
         <div class="form-group">
           <label for="exampleInputEmail2">
             主题:
@@ -39,6 +24,22 @@
                               rows="5"
                               v-model="content"></textarea> -->
         </div>
+
+        <div class="form-group">
+          <label for="exampleInputEmail2">通知人</label>
+          <a-select
+            v-model:value="userIds"
+            mode="multiple"
+            style="width: 100%"
+            placeholder="选择通知人"
+            :options="options"
+            :filter-option="false"
+            auto-clear-search-value
+            @change="handleChange"
+            @search="listInGroupCompanyByCondition"
+          />
+        </div>
+
         <div>
           <input
             ref="fileInput"

+ 9 - 9
src/window/tabFormView/TabFormView.vue

@@ -295,11 +295,11 @@
       <TabAudit v-if="showAuditPanel" :window-no="windowNo" :tab-index="tabIndex" :tab="tab" :model-data="modelData" />
     </Modal>
 
-    <Modal v-model:show="modal3" :large="true" :show-canel-button="false" :show-ok-button="false">
+    <Modal v-model:show="modal3" :large="true" :show-canel-button="false" :show-ok-button="false" title="创建评论">
       <TraceCommentCreate ref="traceCommentCreate" :trace-id="modelData.id" :window-no="modelData.windowNo" />
       <template #footer>
         <button type="submit" class="btn btn-default" @click="saveAndSendNotification">
-          推送
+          确认
         </button>
         <button type="button" class="btn btn-default" @click="cancelNotification">
           取消
@@ -789,8 +789,7 @@ export default {
 
     saveAndSendNotification: function () {
       var _self = this;
-      var status = _self.$refs.traceCommentCreate.photograph();
-      console.log('11111111111 '+ status);
+      _self.$refs.traceCommentCreate.photograph();
       _self.sendNotification();
     },
 
@@ -804,10 +803,11 @@ export default {
         Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe7'), true);
         return;
       }
-      if (notification.userIds == null || notification.userIds.length == 0) {
-        Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe8'), true);
-        return;
-      }
+      // if (notification.userIds == null || notification.userIds.length == 0) {
+      //   Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe8'), true);
+      //   _self.modal3 = false;
+      //   return;
+      // }
       if (notification.theme == null || notification.theme.trim() == '') {
         Notify.error(_self.$t('lang.Notify.error'), _self.$t('lang.tabButton.describe9'), true);
         return;
@@ -843,7 +843,7 @@ export default {
         data: JSON.stringify(notification),
         success: function (data) {
           _self.loading=false;
-          Notify.success(_self.$t('lang.tabButton.describe11'), _self.$t('lang.tabButton.describe12'), true);
+          Notify.success(_self.$t('lang.tabButton.describe11'), '操作成功', true);
           _self.modal3 = false;
           _self.$refs.traceComment.getTraceComment();
         },