Procházet zdrojové kódy

【ID1000121】 人群包BUG修改

jiayufei před 4 roky
rodič
revize
788ce52f47

+ 55 - 52
src/views/modules/crowd-control/components/tree-select/tree-select.less

@@ -1,61 +1,64 @@
-.tree-select-class {
-    display: flex;
-    justify-content: space-between;
-    .class-left-header {
-        height: 50px;
-        line-height: 50px;
-        background-color: #ccc;
-        text-indent: 10px;
-    }
+
+.tree-select-content {
     .input-search {
-        width: 200px;
-        margin: 10px;
+        width: 240px;
+        margin: 10px 0 10px 0;
     }
-    .select-class-left {
-        width: 60%;
-        height: 400px;
-        border: 1px solid #ccc;
-        .class-left-content {
-            overflow-y: auto;
-            height: 340px;
+    .tree-select-class {
+        display: flex;
+        justify-content: space-between;
+        .class-left-header {
+            height: 50px;
+            line-height: 50px;
+            background-color: #ccc;
+            text-indent: 10px;
         }
-        .example {
-            text-align: center;
-            line-height: 200px;
+        .select-class-left {
+            width: 60%;
+            height: 400px;
+            border: 1px solid #ccc;
+            .class-left-content {
+                overflow-y: auto;
+                height: 340px;
+            }
+            .example {
+                text-align: center;
+                line-height: 200px;
+            }
         }
-    }
-    .select-class-right {
-        width: 35%;
-        height: 400px;
-        border: 1px solid #ccc;
-        .class-left-content {
-            padding: 0 10px;
-            height: 348px;
-            overflow-y: auto;
-            .apply-right-tree {
-                display: flex;
-                justify-content: space-between;
-                align-items: baseline;
-                .left-content-p {
-                    display: inline-block;
-                    width: 85%;
-                    height: 25px;
-                    line-height: 25px;
-                    margin: 0;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    white-space: nowrap;
-                }
-                .delete-type-class {
-                    color: #1890ff;
-                    cursor: pointer;
+        .select-class-right {
+            width: 35%;
+            height: 400px;
+            border: 1px solid #ccc;
+            .class-left-content {
+                padding: 0 10px;
+                height: 348px;
+                overflow-y: auto;
+                .apply-right-tree {
+                    display: flex;
+                    justify-content: space-between;
+                    align-items: baseline;
+                    .left-content-p {
+                        display: inline-block;
+                        width: 85%;
+                        height: 25px;
+                        line-height: 25px;
+                        margin: 0;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+                        white-space: nowrap;
+                    }
+                    .delete-type-class {
+                        color: #1890ff;
+                        cursor: pointer;
+                    }
                 }
             }
-        }
-        .no-data-class {
-            height: 340px;
-            line-height: 340px;
-            text-align: center;
+            .no-data-class {
+                height: 340px;
+                line-height: 340px;
+                text-align: center;
+            }
         }
     }
 }

+ 47 - 44
src/views/modules/crowd-control/components/tree-select/tree-select.vue

@@ -1,52 +1,54 @@
 <template>
-    <div class="tree-select-class">
-        <div class="select-class-left">
-            <div class="class-left-header">选择分享的账户名称</div>
-            <div class="class-left-content">
-                <a-input-search class="input-search" placeholder="请输入账户名或ID" @change="onChange" />
-                <template>
-                    <a-tree
-                        v-model="checkedKeys"
-                        checkable
-                        :expanded-keys="expandedKeys"
-                        :auto-expand-parent="autoExpandParent"
-                        :selected-keys="selectedKeys"
-                        :tree-data="treeData"
-                        @check="onCheck"
-                        @expand="onExpand"
-                    />
-                </template>
-                <div class="example">
-                    <a-spin :spinning="spinning"/>
-                    <span v-if="leftTreeNoData">暂无数据</span>
-                </div>
-            </div>
-        </div>
-        <div class="select-class-right">
-            <div class="class-left-header">
-                已选 ({{ applyTypeOption.length ? applyTypeOption.length : 0}}/100)
-                <a-popover placement="topRight">
-                    <template slot="content">
-                        <p>1、输入账户超出推送范围,请检查是否同主体账户</p>
-                        <p>2、有效账户将不会重复推送,请登录该账户查看使用</p>
+    <div class="tree-select-content">
+        <a-input-search class="input-search" placeholder="请输入账户名或ID" @change="onChange" />
+        <div class="tree-select-class">
+            <div class="select-class-left">
+                <div class="class-left-header">选择分享的账户名称</div>
+                <div class="class-left-content">
+                    <template>
+                        <a-tree
+                            v-model="checkedKeys"
+                            checkable
+                            :expanded-keys="expandedKeys"
+                            :auto-expand-parent="autoExpandParent"
+                            :selected-keys="selectedKeys"
+                            :tree-data="treeData"
+                            @check="onCheck"
+                            @expand="onExpand"
+                        />
                     </template>
-                    <span><a-icon type="question-circle" /></span>
-                </a-popover>
+                    <div class="example">
+                        <a-spin :spinning="spinning"/>
+                        <span v-if="leftTreeNoData">暂无数据</span>
+                    </div>
+                </div>
             </div>
-            <div v-if="applyTypeOption.length" class="class-left-content">
-                <div class="apply-right-tree" v-for="item in applyTypeOption" :key="item.key">
-                    <p class="left-content-p">
-                        <a-tooltip placement="left">
-                            <template slot="title">
-                                <span>{{ item.title }}</span>
-                            </template>
-                            {{ item.title }}
-                        </a-tooltip>
-                    </p>
-                    <a-icon type="delete" class="delete-type-class" @click="handleDelTree(item)" />
+            <div class="select-class-right">
+                <div class="class-left-header">
+                    已选 ({{ applyTypeOption.length ? applyTypeOption.length : 0}}/100)
+                    <a-popover placement="topRight">
+                        <template slot="content">
+                            <p>1、输入账户超出推送范围,请检查是否同主体账户</p>
+                            <p>2、有效账户将不会重复推送,请登录该账户查看使用</p>
+                        </template>
+                        <span><a-icon type="question-circle" /></span>
+                    </a-popover>
+                </div>
+                <div v-if="applyTypeOption.length" class="class-left-content">
+                    <div class="apply-right-tree" v-for="item in applyTypeOption" :key="item.key">
+                        <p class="left-content-p">
+                            <a-tooltip placement="left">
+                                <template slot="title">
+                                    <span>{{ item.title }}</span>
+                                </template>
+                                {{ item.title }}
+                            </a-tooltip>
+                        </p>
+                        <a-icon type="delete" class="delete-type-class" @click="handleDelTree(item)" />
+                    </div>
                 </div>
+                <div v-else class="no-data-class">暂无数据</div>
             </div>
-            <div v-else class="no-data-class">暂无数据</div>
         </div>
     </div>
 </template>
@@ -123,6 +125,7 @@ export default {
                 }
             }
             this.applyTypeOption = defaultTypeOption;
+            this.selectRightData = new Set(defaultTypeOption);
             for(let i = keysLen - 1; i >= 0; i--) {
                 if(defaultCheckKey[i] === list.key) {
                     defaultCheckKey.splice(i, 1);

+ 4 - 7
src/views/modules/crowd-control/crowd-control.vue

@@ -63,7 +63,7 @@
                     <a @click="handleDelete(record)">删除</a>
                 </span>
                 <span slot="cause" slot-scope="text, record">
-                    <a class="cause-text-class" @click="handleCause(record)">{{ text }}</a>
+                    <a class="cause-text-class" @click="handleCause(record)">失败原因</a>
                 </span>
                 <span slot="depRelax" slot-scope="text, record">
                     <a @click="handleAcountRelax('dep', record)">{{ text }}</a>
@@ -286,15 +286,12 @@ export default {
                 },
                 {
                     title: '状态',
-                    dataIndex: 'status',
-                    align: 'center',
-                    customRender(t) {
-                        return t ? that.statusTasks.find(item => item.label === t).value : '-';
-                    }
+                    dataIndex: 'statusStr',
+                    align: 'center'
                 },
                 {
                     title: '原因',
-                    dataIndex: 'statusStr',
+                    dataIndex: '',
                     align: 'center',
                     scopedSlots: {customRender: 'cause'}
                 },