Browse Source

build: PC

zhengxy 11 months ago
parent
commit
f2aa872fbb

+ 1 - 1
index.html

@@ -7,4 +7,4 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.fa4c3829a90f006f80bf7db3540a15e3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.6e72837edd4a06bc4936.js></script><script type=text/javascript src=./static/js/app.c3caeab791ad101f328e.js></script></body></html>
10
+      })();</script><link href=./static/css/app.2d9625fc7c5d2adfc516f0b4d87519f2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.bd423314dbfba4d93e9c.js></script><script type=text/javascript src=./static/js/app.c3caeab791ad101f328e.js></script></body></html>

File diff suppressed because it is too large
+ 594 - 306
project/src/components/manage/InviteIntoGroup/createData.vue


+ 235 - 129
project/src/components/manage/InviteIntoGroup/inviteRuleList.vue

@@ -1,64 +1,148 @@
1 1
 <template>
2 2
   <div v-loading="loading" class="inviteRuleList-wrap">
3
-    <div class="screenBox" style="align-items: center;padding-right:16px">
4
-      <div class="flex-align-center" style="flex:1">
3
+    <div class="screenBox" style="align-items: center; padding-right: 16px">
4
+      <div class="flex-align-center" style="flex: 1">
5 5
         <!-- 搜索配置 -->
6
-        <self-input style="width: auto;" label_name='关键词' :hasLabel="false" :noMarLeft="true" @inputChange='(val)=>{keyword = val;init(1)}' />
6
+        <self-input
7
+          style="width: auto"
8
+          label_name="关键词"
9
+          :hasLabel="false"
10
+          :noMarLeft="true"
11
+          @inputChange="
12
+            (val) => {
13
+              keyword = val;
14
+              init(1);
15
+            }
16
+          "
17
+        />
7 18
         <!-- 关联客服 -->
8
-        <serviceSingle style="width: auto;" title="关联客服" placeholder="请选择" @customerDefine="onChangeUser" />
19
+        <serviceSingle
20
+          style="width: auto"
21
+          title="关联客服"
22
+          placeholder="请选择"
23
+          @customerDefine="onChangeUser"
24
+        />
9 25
         <!-- 状态 -->
10
-        <selfChannelV2 v-model="status" type="enableStatus" title="规则状态" :labelWidth="true" @change="onChangeStatus" />
26
+        <selfChannelV2
27
+          v-model="status"
28
+          type="enableStatus"
29
+          title="规则状态"
30
+          :labelWidth="true"
31
+          @change="onChangeStatus"
32
+        />
11 33
       </div>
12
-      <el-button type="primary" size="mini" @click="createdMassMsg">新建配置</el-button>
34
+      <el-button type="primary" size="mini" @click="createdMassMsg"
35
+        >新建配置</el-button
36
+      >
13 37
     </div>
14 38
     <div class="tableInfo">
15 39
       <div>
16 40
         <div class="flex">
17
-          <div class="totalCustom">共有<span>{{total}}</span>条数据</div>
41
+          <div class="totalCustom">
42
+            共有<span>{{ total }}</span
43
+            >条数据
44
+          </div>
18 45
         </div>
19 46
       </div>
20 47
       <div class="flex">
21
-        <el-button type="primary" plain size="mini" @click="init(1,'export')">导出Excel</el-button>
48
+        <el-button type="primary" plain size="mini" @click="init(1, 'export')"
49
+          >导出Excel</el-button
50
+        >
22 51
         <!-- 使用说明 -->
23
-<!--        <instructions style="margin-left: 20px;" doc="employee_bulk_messaging_log"></instructions>-->
52
+        <!--        <instructions style="margin-left: 20px;" doc="employee_bulk_messaging_log"></instructions>-->
24 53
       </div>
25 54
     </div>
26 55
     <!-- table -->
27
-    <el-table ref="multipleTable" :height='height' :data="tableData" tooltip-effect="dark" style="width: 100%">
28
-      <el-table-column prop="title" label="标题" show-overflow-tooltip align="center" min-width="140" fixed="left" />
29
-      <el-table-column prop="user_name" label="创建人" show-overflow-tooltip align="center" min-width="140"/>
56
+    <el-table
57
+      ref="multipleTable"
58
+      :height="height"
59
+      :data="tableData"
60
+      tooltip-effect="dark"
61
+      style="width: 100%"
62
+    >
63
+      <el-table-column
64
+        prop="title"
65
+        label="标题"
66
+        show-overflow-tooltip
67
+        align="center"
68
+        min-width="140"
69
+        fixed="left"
70
+      />
71
+      <el-table-column
72
+        prop="user_name"
73
+        label="创建人"
74
+        show-overflow-tooltip
75
+        align="center"
76
+        min-width="140"
77
+      />
30 78
       <el-table-column label="拉群类型" align="center" min-width="140">
31 79
         <template slot-scope="scope">
32
-          <div>{{scope.row.join_type == 1 ? '顺序拉群' : (scope.row.join_type == 2 ? '随机拉群' : '-')}}</div>
80
+          <div>
81
+            {{
82
+              scope.row.join_type == 1
83
+                ? "顺序拉群"
84
+                : scope.row.join_type == 2
85
+                ? "随机拉群"
86
+                : "-"
87
+            }}
88
+          </div>
33 89
         </template>
34 90
       </el-table-column>
35 91
 
36 92
       <el-table-column label="配置状态" align="center" min-width="120">
37 93
         <template slot-scope="{ row }">
38
-          <el-switch v-if="row.status !== ''"  v-model="row.status" :active-value="1" :inactive-value="0" disabled @click.native="onClickStatus(row)" />
39
-          <div v-else> - </div>
94
+          <el-switch
95
+            v-if="row.status !== ''"
96
+            v-model="row.status"
97
+            :active-value="1"
98
+            :inactive-value="0"
99
+            disabled
100
+            @click.native="onClickStatus(row)"
101
+          />
102
+          <div v-else>-</div>
40 103
         </template>
41 104
       </el-table-column>
42 105
 
43
-      <el-table-column min-width="140" label="操作" align="center" fixed="right">
106
+      <el-table-column
107
+        min-width="140"
108
+        label="操作"
109
+        align="center"
110
+        fixed="right"
111
+      >
44 112
         <template slot-scope="scope">
45
-          <div class="flex" style="justify-content:center">
46
-            <div class="c-00B38A pointer table_button" @click="goDetail(scope.row)">编辑</div>
47
-            <el-popconfirm @confirm="deleEvent(scope.row)" :title="`确定删除【${scope.row.title}】群发消息?`">
48
-              <div slot="reference" class="c-FF604D pointer table_button">删除</div>
113
+          <div class="flex" style="justify-content: center">
114
+            <div
115
+              class="c-00B38A pointer table_button"
116
+              @click="goDetail(scope.row)"
117
+            >
118
+              编辑
119
+            </div>
120
+            <el-popconfirm
121
+              @confirm="deleEvent(scope.row)"
122
+              :title="`确定删除【${scope.row.title}】群发消息?`"
123
+            >
124
+              <div slot="reference" class="c-FF604D pointer table_button">
125
+                删除
126
+              </div>
49 127
             </el-popconfirm>
50 128
           </div>
51 129
         </template>
52 130
       </el-table-column>
53 131
     </el-table>
54
-    <div class="pagination" v-show="total>0">
55
-      <el-pagination background :current-page="page" @current-change="handleCurrentChange" layout="prev, pager, next" :page-count="Number(pages)" />
132
+    <div class="pagination" v-show="total > 0">
133
+      <el-pagination
134
+        background
135
+        :current-page="page"
136
+        @current-change="handleCurrentChange"
137
+        layout="prev, pager, next"
138
+        :page-count="Number(pages)"
139
+      />
56 140
     </div>
57 141
     <el-drawer size="1200px" :visible.sync="massMsgFlag" :with-header="false">
58 142
       <createData
59 143
         v-if="massMsgFlag"
60 144
         ref="createMassMsg"
61
-        :rule_id='detail_rule_id'
145
+        :rule_id="detail_rule_id"
62 146
         :title="detail_rule_id ? '配置详情' : '新建配置'"
63 147
         @close="detailClose"
64 148
       />
@@ -66,10 +150,10 @@
66 150
   </div>
67 151
 </template>
68 152
 <script>
69
-import createData from './createData.vue'
70
-import selfInput from '@/components/assembly/screen/input.vue'
71
-import serviceSingle from '@/components/assembly/screen/serviceSingle.vue'
72
-import selfChannelV2 from '@/components/assembly/screen/channelV2.vue'
153
+import createData from "./createData.vue";
154
+import selfInput from "@/components/assembly/screen/input.vue";
155
+import serviceSingle from "@/components/assembly/screen/serviceSingle.vue";
156
+import selfChannelV2 from "@/components/assembly/screen/channelV2.vue";
73 157
 
74 158
 export default {
75 159
   components: {
@@ -78,7 +162,7 @@ export default {
78 162
     serviceSingle,
79 163
     selfChannelV2,
80 164
   },
81
-  data () {
165
+  data() {
82 166
     return {
83 167
       massMsgFlag: false,
84 168
       loading: false,
@@ -87,160 +171,183 @@ export default {
87 171
       total: 0,
88 172
       page_size: 20,
89 173
       tableData: [],
90
-      height: '',
91
-      detail_rule_id: '',
92
-      keyword:'',
93
-      user_id: '',
94
-      status: '',
95
-    }
174
+      height: "",
175
+      detail_rule_id: "",
176
+      keyword: "",
177
+      user_id: "",
178
+      status: "",
179
+    };
96 180
   },
97
-  created () {
98
-    this.height = document.documentElement.clientHeight - 290
99
-    this.init(1)
181
+  created() {
182
+    this.height = document.documentElement.clientHeight - 290;
183
+    this.init(1);
100 184
   },
101 185
   methods: {
102 186
     //删除
103
-    deleEvent(row){
187
+    deleEvent(row) {
104 188
       this.$loading(this.$loadingConfig);
105
-      this.$axios.get(this.URL.BASEURL + this.URL.inviteRule_dele, {
106
-        params: {
107
-          rule_id: row.rule_id,
108
-        }
109
-      }).then((res) => {
110
-        this.$loading(this.$loadingConfig).close();
111
-        var res = res.data;
112
-        if (res && res.errno == 0) {
113
-          this.init(1)
114
-        }
115
-        this.$message({
116
-          message: res.err,
117
-          type: 'warning'
189
+      this.$axios
190
+        .get(this.URL.BASEURL + this.URL.inviteRule_dele, {
191
+          params: {
192
+            rule_id: row.rule_id,
193
+          },
118 194
         })
119
-      })
195
+        .then((res) => {
196
+          this.$loading(this.$loadingConfig).close();
197
+          var res = res.data;
198
+          if (res && res.errno == 0) {
199
+            this.init(1);
200
+          }
201
+          this.$message({
202
+            message: res.err,
203
+            type: "warning",
204
+          });
205
+        });
120 206
     },
121 207
     detailClose(val) {
122
-      if (val == 'update') {//编辑
123
-        this.init(this.page)
124
-      } else if (val == 'update_new') {//复制或者新建
125
-        this.init(1)
208
+      if (val == "update") {
209
+        //编辑
210
+        this.init(this.page);
211
+      } else if (val == "update_new") {
212
+        //复制或者新建
213
+        this.init(1);
126 214
         this.$refs.multipleTable.bodyWrapper.scrollTop = 0;
127 215
       }
128
-      this.massMsgFlag = false
216
+      this.massMsgFlag = false;
129 217
     },
130
-    createdMassMsg () {
131
-      this.detail_rule_id = '';
132
-      this.massMsgFlag = true
218
+    createdMassMsg() {
219
+      this.detail_rule_id = "";
220
+      this.massMsgFlag = true;
133 221
     },
134
-    goDetail (data) {
222
+    goDetail(data) {
135 223
       this.detail_rule_id = data.rule_id;
136
-      this.massMsgFlag = true
224
+      this.massMsgFlag = true;
137 225
     },
138 226
     // 监听点击切换"状态"
139 227
     async onClickStatus(row) {
140 228
       try {
141
-        await this.$confirm(`确定${row.status == 0 ? '启用' : '禁用'}【${row.title}】?`, '提示', {
142
-          confirmButtonText: '确定',
143
-          cancelButtonText: '取消',
144
-          type: 'warning'
145
-        })
146
-        this.handleChangeStatus(row)
229
+        await this.$confirm(
230
+          `确定${row.status == 0 ? "启用" : "禁用"}【${row.title}】?`,
231
+          "提示",
232
+          {
233
+            confirmButtonText: "确定",
234
+            cancelButtonText: "取消",
235
+            type: "warning",
236
+          }
237
+        );
238
+        this.handleChangeStatus(row);
147 239
       } catch (error) {
148
-        console.log(error)
240
+        console.log(error);
149 241
       }
150 242
     },
151 243
     // 执行“切换状态”
152 244
     async handleChangeStatus({ rule_id, status }) {
153 245
       try {
154
-        this.loading = true
155
-        const url = `${this.URL.BASEURL}${this.URL.inviteRule_editStatus}`
246
+        this.loading = true;
247
+        const url = `${this.URL.BASEURL}${this.URL.inviteRule_editStatus}`;
156 248
         const params = {
157 249
           rule_id,
158 250
           status: status == 1 ? 0 : 1,
159
-        }
160
-        const { data: res = {} } = await this.$axios.get(url, { params })
251
+        };
252
+        const { data: res = {} } = await this.$axios.get(url, { params });
161 253
         if (res && res.errno == 0) {
162
-          this.$message.success('操作成功')
163
-          this.init()
254
+          this.$message.success("操作成功");
255
+          this.init();
164 256
         } else if (res.errno != 4002) {
165
-          this.$message.warning(res.err)
257
+          this.$message.warning(res.err);
166 258
         }
167 259
       } catch (error) {
168
-        console.log(error)
260
+        console.log(error);
169 261
       } finally {
170
-        this.loading = false
262
+        this.loading = false;
171 263
       }
172 264
     },
173 265
 
174
-    init (page, type) {
175
-      if (type != 'export') {
266
+    init(page, type) {
267
+      if (type != "export") {
176 268
         this.page = page ? page : this.page;
177 269
       } else {
178 270
         if (this.total == 0) {
179 271
           this.$message({
180
-            message: '暂无数据可导出',
181
-            type: "warning"
182
-          })
183
-          return
272
+            message: "暂无数据可导出",
273
+            type: "warning",
274
+          });
275
+          return;
184 276
         }
185 277
       }
186
-      this.loading = true
187
-      this.$axios.get(this.URL.BASEURL + this.URL.inviteRuleList, {
188
-        params: {
189
-          page: type == 'export' ? 1 : this.page,
190
-          page_size: type == 'export' ? this.$store.state.exportNumber : this.page_size,
191
-          keyword: this.keyword,
192
-          user_id: this.user_id,
193
-          status: this.status,
194
-        }
195
-      }).then((res) => {
196
-        var res = res.data
197
-        this.loading = false
198
-        if (res && res.errno == 0) {
199
-          if (type == 'export') {
200
-            this.exportEvent(res.rst.data)
201
-          } else {
202
-            this.tableData = res.rst.data;
203
-            this.total = res.rst.pageInfo.total;
204
-            this.pages = res.rst.pageInfo.pages;
278
+      this.loading = true;
279
+      this.$axios
280
+        .get(this.URL.BASEURL + this.URL.inviteRuleList, {
281
+          params: {
282
+            page: type == "export" ? 1 : this.page,
283
+            page_size:
284
+              type == "export"
285
+                ? this.$store.state.exportNumber
286
+                : this.page_size,
287
+            keyword: this.keyword,
288
+            user_id: this.user_id,
289
+            status: this.status,
290
+          },
291
+        })
292
+        .then((res) => {
293
+          var res = res.data;
294
+          this.loading = false;
295
+          if (res && res.errno == 0) {
296
+            if (type == "export") {
297
+              this.exportEvent(res.rst.data);
298
+            } else {
299
+              this.tableData = res.rst.data;
300
+              this.total = res.rst.pageInfo.total;
301
+              this.pages = res.rst.pageInfo.pages;
302
+            }
303
+          } else if (res.errno != 4002) {
304
+            this.$message.warning(res.err);
205 305
           }
206
-        } else if (res.errno != 4002) {
207
-          this.$message.warning(res.err)
208
-        }
209
-      }).catch((err) => {
210
-        this.loading = false
211
-      });
306
+        })
307
+        .catch((err) => {
308
+          this.loading = false;
309
+        });
212 310
     },
213
-    handleCurrentChange (val) {
214
-      this.init(val)
311
+    handleCurrentChange(val) {
312
+      this.init(val);
215 313
     },
216 314
     onChangeUser(val) {
217
-      this.user_id = val ? val.user_id : ''
218
-      this.init(1)
315
+      this.user_id = val ? val.user_id : "";
316
+      this.init(1);
219 317
     },
220 318
     onChangeStatus(val) {
221
-      this.status = val
222
-      this.init(1)
319
+      this.status = val;
320
+      this.init(1);
223 321
     },
224
-    exportEvent (data) {
322
+    exportEvent(data) {
225 323
       let list = data;
226
-      let tHeader = ['标题', '创建人', '拉群类型', '规则状态']
227
-      let filterVal = ['title', 'user_name', 'join_type', 'status']
324
+      let tHeader = ["标题", "创建人", "拉群类型", "规则状态"];
325
+      let filterVal = ["title", "user_name", "join_type", "status"];
228 326
       list.forEach((item) => {
229
-        item.join_type = item.join_type == 1 ? '顺序拉群' : item.join_type == 2 ? '随机拉群' : '-';
230
-        item.status = item.status == 1 ? '启用' : item.status == 0 ? '禁用' : '-'
231
-      })
327
+        item.join_type =
328
+          item.join_type == 1
329
+            ? "顺序拉群"
330
+            : item.join_type == 2
331
+            ? "随机拉群"
332
+            : "-";
333
+        item.status =
334
+          item.status == 1 ? "启用" : item.status == 0 ? "禁用" : "-";
335
+      });
232 336
       let excelDatas = [
233 337
         {
234 338
           tHeader: tHeader, // sheet表一头部
235 339
           filterVal: filterVal, // 表一的数据字段
236 340
           tableDatas: list, // 表一的整体json数据
237
-          sheetName: ''// 表一的sheet名字
238
-        }
239
-      ]
240
-      this.$exportOrder({ excelDatas, name: `邀请入群配置(导出时间:${this.$getDay(0)})` })
241
-    }
242
-  }
243
-}
341
+          sheetName: "", // 表一的sheet名字
342
+        },
343
+      ];
344
+      this.$exportOrder({
345
+        excelDatas,
346
+        name: `邀请入群配置(导出时间:${this.$getDay(0)})`,
347
+      });
348
+    },
349
+  },
350
+};
244 351
 </script>
245 352
 <style lang="scss" scoped>
246 353
 @import "@/style/list.scss";
@@ -260,5 +367,4 @@ export default {
260 367
     opacity: 1;
261 368
   }
262 369
 }
263
-
264 370
 </style>

File diff suppressed because it is too large
+ 1 - 1
static/css/app.fa4c3829a90f006f80bf7db3540a15e3.css


File diff suppressed because it is too large
+ 0 - 1
static/js/19.78e6e49192800a5de120.js


File diff suppressed because it is too large
+ 1 - 0
static/js/19.a4da121834250309b46d.js


File diff suppressed because it is too large
+ 1 - 1
static/js/manifest.6e72837edd4a06bc4936.js