Browse Source

Merge branch 'dev/v1.0.88_yf' of jianyu/web into feature/v1.0.88

yangfeng 6 months ago
parent
commit
c21f38ed79

+ 11 - 1
apps/bigmember_pc/src/components/dialog/Dialog.vue

@@ -5,6 +5,8 @@
     v-bind="$props"
     :show-close="showClose"
     :visible="visible"
+    :close-on-click-modal="closeClickModal"
+    :close-on-press-escape="closeOnPressEscape"
     :before-close="beforeClose"
     @update:visible="update"
     v-component-change-mount="{ selector: comMount }"
@@ -75,7 +77,15 @@ export default {
       type: String,
       default: ''
     },
-    disabled: Boolean
+    disabled: Boolean,
+    closeClickModal: {
+      type: Boolean,
+      default: false
+    },
+    closeOnPressEscape: {
+      type: Boolean,
+      default: false
+    }
   },
   methods: {
     update(e) {

+ 6 - 1
apps/bigmember_pc/src/components/forecast/ForFilter.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="ent-filter">
     <div class="filter-title">筛选条件</div>
-    <div class="filter-item">
+    <div class="filter-item items-baseline">
       <span class="item-label">分组:</span>
       <!-- <div>
         <GroupTag selectorType="line" @onChange="getGroupTag"></GroupTag>
@@ -179,6 +179,10 @@ export default {
     display: flex;
     align-items: center;
     padding: 12px 0;
+    &.items-baseline {
+      padding-bottom: 6px;
+      align-items: baseline;
+    }
     .item-label {
       margin-right: 12px;
       font-size: 14px;
@@ -210,6 +214,7 @@ export default {
     }
   }
   .tag-item {
+    margin-bottom: 6px;
     height: 26px;
     line-height: 26px;
     margin-right: 12px;

+ 2 - 1
apps/bigmember_pc/src/components/forecast/ForeCast.vue

@@ -495,6 +495,7 @@
       custom-class="monitor-class"
       :visible.sync="dialog.group"
       :close-on-click-modal="false"
+      :close-on-press-escape="false"
       :show-close="false"
       :destroy-on-close="true"
       center
@@ -528,7 +529,7 @@
         <button
           class="action-button cancel"
           :disabled="groupActionDisabled"
-          @click="dialog.group = false"
+          @click="(dialog.group = false), (cur.group = '')"
         >
           取消
         </button>

+ 6 - 6
apps/bigmember_pc/src/composables/quick-monitor/component/MonitorGroup.vue

@@ -1,6 +1,6 @@
 <script setup>
-import { ref, onMounted, watch } from 'vue'
-import { showToast } from '@/components/toast'
+import { ref, onMounted, watch, getCurrentInstance } from 'vue'
+const that = getCurrentInstance().proxy
 
 const props = defineProps({
   // 要回显的分组id
@@ -85,10 +85,10 @@ function onAddAction() {
 // 新增分组确认方法
 function onAddConfirm() {
   if (!newGroupName.value) {
-    return showToast('请输入分组名称')
+    return that.$toast('请输入分组名称')
   }
   if (groupList.value.some((v) => v.name === newGroupName.value)) {
-    return showToast('分组名称已存在')
+    return that.$toast('分组名称已存在')
   }
   const newItem = {
     // id: Math.random(),
@@ -122,10 +122,10 @@ function onItemInput(event, item) {
 function onItemConfirm(item) {
   const list = groupList.value
   if (!item.input) {
-    return showToast('请输入分组名称')
+    return that.$toast('请输入分组名称')
   }
   if (list.some((v) => v.name === item.input)) {
-    return showToast('分组名称已存在')
+    return that.$toast('分组名称已存在')
   }
   item.name = item.input
   item.showEdit = false