Browse Source

Merge branch 'master' of http://101.200.220.49:8001/xiuli.gao/playlet

xiuli.gao 2 years ago
parent
commit
6bbdc8ee75

+ 1 - 1
project/src/components/manage/memberManage.vue

@@ -50,7 +50,7 @@
50 50
             <template slot-scope="scope">
51 51
               <div class="flex-align-jus-center">
52 52
                 <i class="el-icon-circle-check f16 c-00B38A rMar7" v-if="scope.row.status == 1"></i>
53
-                <i class="el-icon-warning-outline f16 c-FF604D" v-if="scope.row.status == 4"></i>
53
+                <i class="el-icon-warning-outline f16 c-FF604D rMar7" v-if="scope.row.status == 4"></i>
54 54
                 {{scope.row.status == 1 ? '已授权' : '未授权'}}
55 55
               </div>
56 56
             </template>

+ 43 - 7
project/src/components/manage/tagManage.vue

@@ -28,15 +28,15 @@
28 28
           </div>
29 29
         </div>
30 30
         <div class="flex-align-center lMarauto editArea">
31
-          <div class="pointer rMar10 flex-align-center" @click="mIdx>0&&orderList(item.group_id)">
31
+          <div class="pointer rMar10 flex-align-center" @click="upClick(mIdx)">
32 32
             <img src="../../assets/img/upNone.png" alt="" v-if="mIdx == 0">
33 33
             <img src="../../assets/img/up.png" alt="" v-if="mIdx > 0">
34 34
             上移
35 35
           </div>
36
-          <div class="pointer rMar10 flex-align-center" @click="mIdx < tableData.length-1&&orderList(item.group_id)">
36
+          <div class="pointer rMar10 flex-align-center" @click="downClick(mIdx)">
37 37
             <img src="../../assets/img/downNone.png" alt="" v-if="mIdx == tableData.length-1">
38 38
             <img src="../../assets/img/down.png" alt="" v-if="mIdx < tableData.length-1">
39
-            
39
+            
40 40
           </div>
41 41
           <div class="pointer flex-align-center" @click="addLableGroup('edit',item)">
42 42
             <img src="../../assets/img/edit.png" alt="">
@@ -74,15 +74,51 @@ export default {
74 74
     this.init(1)
75 75
   },
76 76
   methods: {
77
+    // 上移
78
+    upClick(index) {
79
+      if(index == 0){return false}
80
+      this.tableData = this.swapItems(this.tableData, index, index - 1)
81
+      this.orderList()
82
+    },
83
+    // 下移
84
+    downClick(index) {
85
+      if(index == this.tableData.length-1){return false}
86
+      this.tableData = this.swapItems(this.tableData, index, index + 1)
87
+      this.orderList()
88
+    },
89
+    swapItems(arr, index1, index2) {
90
+      arr[index1] = arr.splice(index2, 1, arr[index1])[0];
91
+      return arr;
92
+    },
77 93
     orderList(){
78
-
94
+      let groupList = []
95
+      this.tableData.forEach(item=>{
96
+        groupList.push({order:item.order,group_id:item.group_id})
97
+      })
98
+      if(groupList&&groupList.length==0){
99
+        this.$message({
100
+          message: '操作错误,请稍候重试',
101
+          type: "info"
102
+        })
103
+        return false
104
+      }
105
+      this.$axios.post(this.URL.BASEURL + this.URL.order_tag_group, {
106
+        group_list: groupList
107
+      }).then((res) => {
108
+        var res = res.data
109
+        if(res&&res.errno == 0){
110
+          this.init(1)
111
+          return
112
+        }
113
+        this.$message({
114
+          message: res.err,
115
+          type: "info"
116
+        })
117
+      })
79 118
     },
80 119
     forceUpdate() {
81 120
       this.$forceUpdate()
82 121
     },
83
-    addTag(){
84
-
85
-    },
86 122
     addLableGroup(opa,item){
87 123
       this.source = opa
88 124
       this.$nextTick(()=>{