Browse Source

增加:会话模块

zhangfu 3 years ago
parent
commit
fc641e1435

BIN
public/favicon.ico


+ 1 - 1
public/index.html

@@ -14,7 +14,7 @@
     />
     <meta http-equiv="expires" content="0" />
  
-    <link rel="icon" href="<%= BASE_URL %>title.ico">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <!-- <title><%= htmlWebpackPlugin.options.title %></title> --> 
     <title>沪上阿姨</title>
   </head>

+ 2 - 16
public/js/config.js

@@ -1,19 +1,5 @@
 window.global_config = {
-  // BASE_URL: 'http://101.200.220.128:8081'
-  // BASE_URL: 'http://221.224.53.27:20008'
-  // BASE_URL: 'http://172.16.0.245:10143'
-  // BASE_URL: 'http://221.224.53.27:10143'
-  // BASE_URL: 'http://221.224.53.27:10143',
-  // BASE_URL: 'http://172.16.0.22:10143'
-  // BASE_URL: 'http://221.224.53.27:10144',
-  //  BASE_URL:'http://172.16.0.14:10143',
-  // BASE_URL: 'http://172.16.0.135:8083' //沪上阿姨
+  // BASE_URL: 'http://172.16.0.130:8083' //蒋佳灿
+  // BASE_URL:'http://172.16.0.108:8083' // 商涛
   BASE_URL: 'http://221.224.53.27:20018'
-  //  BASE_URL:'http://172.16.0.107:10143',
-  // BASE_URL: 'http://172.16.0.36:10143' //吴国建
-  // BASE_URL:'http://172.16.0.114:10143' //胡志豪
-  // BASE_URL: 'http://172.16.100.40:10143'
-  // BASE_URL:'http://221.224.53.27:20008'
-  // BASE_URL: 'http://172.16.0.245:10143'
-  // BASE_URL: 'http://101.200.220.128:8081'
 }

BIN
public/title.ico


+ 8 - 3
src/assets/styles/element.less

@@ -5,10 +5,12 @@
   color: #666666;
 }
 
-.el-button--primary {
+.el-button--primary,
+.el-button--primary:focus, 
+.el-button--primary:hover {
   background: #F23F3A;
   border-color: #F23F3A;
-  color: #FFFFFF;
+  color: #FFFFFF !important;
 }
 
 .el-button--default {
@@ -273,7 +275,7 @@ input[maxlength='32']:not([disabled]) {
 
 .el-dialog__body {
   .el-input {
-    max-width: 400px;
+    max-width: 440px;
   }
 }
 
@@ -406,4 +408,7 @@ input[maxlength='32']:not([disabled]) {
   .el-input__inner {
     padding-right: 48px;
   }
+}
+.el-select-dropdown.is-multiple .el-select-dropdown__item.selected{
+  color: #F4453E;
 }

+ 1 - 1
src/main.js

@@ -5,7 +5,7 @@ import store from './store'
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 // import '../static/iconfont/iconfont.css'
-import '../static/font_hsy/iconfont.css'
+import '../static/font-hsay/iconfont.css'
 import pubFun from '@/utils/pubFun'
 import '@/assets/theme/index.css'
 import '@/assets/styles/element.less'

+ 53 - 5
src/pages/classification/edit.vue

@@ -2,14 +2,14 @@
   <el-dialog
     :title="classString.title"
     :visible.sync="dialogVisible"
-    width="33%"
+    width="36%"
     :before-close="handleClose"
     :close-on-press-escape="false"
     :close-on-click-modal="false"
     :append-to-body="true"
     v-loading.fullscreen.lock="fullscreenLoading"
   >
-    <el-form label-width="100px" :model="form" ref="form" :rules="rules">
+    <el-form label-width="120px" :model="form" ref="form" :rules="rules">
       <el-form-item label="分类名称:" prop="name">
         <el-input
           placeholder="请输入名称"
@@ -34,7 +34,7 @@
         :key="index"
       >
         <template v-if="index == 0" slot="label">
-          <span>访问权限:</span>
+          <span>可访问手机号:</span>
         </template>
         <div class="form_item_content">
           <el-input
@@ -52,6 +52,22 @@
           ></i>
         </div>
       </el-form-item>
+      <el-form-item label="可访问群组:">
+        <el-select
+          v-model="form.conversationList"
+          multiple
+          collapse-tags
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in conversationList"
+            :key="item.openConversationId"
+            :label="item.conversationName"
+            :value="item.openConversationId"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
     </el-form>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="handleClose">取 消</el-button>
@@ -83,14 +99,17 @@ export default {
       form: {
         name: '',
         status: 1,
-        role: [{ value: '' }]
+        role: [{ value: '' }],
+        conversationList: [],
       },
+      conversationList: [],
       rules: {
         name: [{ required: true, trigger: 'blur', message: '请输入分类名称' }]
       }
     }
   },
   methods: {
+    // 关闭弹框
     handleClose() {
       this.dialogVisible = false
       this.$parent.search()
@@ -101,12 +120,14 @@ export default {
       }
       this.$refs['form'].resetFields()
     },
+    // 打开弹框
     openClose(val) {
       if (val) {
         this.classString = val
         if (!val.show) {
           this.detailList()
         }
+        this.conversationGetDropList()
       }
       this.title = val.title
       this.dialogVisible = true
@@ -130,6 +151,11 @@ export default {
           } else {
             this.form.role = [{ value: '' }]
           }
+          let conversationList = []
+          this.form.conversationList.forEach(item=>{
+            conversationList.push(item.openConversationId)
+          })
+          this.form.conversationList = conversationList
         }
       })
     },
@@ -162,11 +188,25 @@ export default {
               role.push(item.value)
             }
           }
+          let conversationList = []
+          this.conversationList.forEach(item => {
+            if (
+              this.form.conversationList.find(
+                ltem => item.openConversationId == ltem
+              )
+            ) {
+              conversationList.push({
+                chatId: item.chatId,
+                openConversationId: item.openConversationId
+              })
+            }
+          })
           let code = {
             linkUrl: '',
             name: this.form.name,
             role: role,
-            status: this.form.status
+            status: this.form.status,
+            conversationList: conversationList
           }
           this.classString.show ? this.addclass(code) : this.editclass(code)
         }
@@ -206,6 +246,14 @@ export default {
         .catch(() => {
           this.fullscreenLoading = false
         })
+    },
+    //会话下拉列表
+    conversationGetDropList() {
+      api.GET('conversation/getDropList').then(res => {
+        if (res.code == 0) {
+          this.conversationList = res.data
+        }
+      })
     }
   }
 }

+ 56 - 9
src/pages/fileManagement/edit.vue

@@ -2,14 +2,14 @@
   <el-dialog
     :title="refList.title"
     :visible.sync="dialogVisible"
-    width="33%"
+    width="36%"
     :before-close="handleClose"
     :close-on-press-escape="false"
     :close-on-click-modal="false"
     :append-to-body="true"
     v-loading.fullscreen.lock="fullscreenLoading"
   >
-    <el-form :model="form" ref="form" :rules="rules" label-width="100px">
+    <el-form :model="form" ref="form" :rules="rules" label-width="120px">
       <el-form-item label="分类名称:" prop="typeId">
         <el-select
           :disabled="!refList.show"
@@ -80,11 +80,11 @@
         :key="index"
       >
         <template v-if="index == 0" slot="label">
-          <span>访问权限:</span>
+          <span>可访问手机号:</span>
         </template>
         <div class="form_item_content">
           <el-input
-          clearable
+            clearable
             placeholder="请输入手机号"
             v-onlyInt
             maxlength="11"
@@ -98,6 +98,22 @@
           ></i>
         </div>
       </el-form-item>
+      <el-form-item label="可访问群组:">
+        <el-select
+          v-model="form.conversationList"
+          multiple
+          collapse-tags
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in conversationList"
+            :key="item.openConversationId"
+            :label="item.conversationName"
+            :value="item.openConversationId"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
     </el-form>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="handleClose">取 消</el-button>
@@ -125,8 +141,10 @@ export default {
         name: '',
         status: 1,
         typeId: '',
-        role: [{ value: '' }]
+        role: [{ value: '' }],
+        conversationList: []
       },
+      conversationList: [],
       refList: {},
       fileList: [],
       classifyList: [],
@@ -155,7 +173,8 @@ export default {
         status: 1,
         typeId: '',
         fileSize: '',
-        role: [{ value: '' }]
+        role: [{ value: '' }],
+        conversationList: []
       }
       this.fileList = []
       this.$refs['form'].resetFields()
@@ -170,6 +189,7 @@ export default {
           this.visbleChange(true)
           this.details()
         }
+        this.conversationGetDropList()
       }
       this.dialogVisible = true
     },
@@ -181,7 +201,7 @@ export default {
         if (data.code == 0) {
           this.form = data.data
           let role = []
-          if (this.form.role&&this.form.role.length != 0) {
+          if (this.form.role && this.form.role.length != 0) {
             this.form.role.forEach(item => {
               role.push({ value: item })
             })
@@ -189,6 +209,11 @@ export default {
           } else {
             this.form.role = [{ value: '' }]
           }
+          let conversationList = []
+          this.form.conversationList.forEach(item => {
+            conversationList.push(item.openConversationId)
+          })
+          this.form.conversationList = conversationList
           this.fileList = [{ name: this.form.name, url: this.form.docUrl }]
         }
       })
@@ -227,7 +252,7 @@ export default {
         if (data.code == 0) {
           this.form.role = data.data.role
           let role = []
-          if (this.form.role&&this.form.role.length != 0) {
+          if (this.form.role && this.form.role.length != 0) {
             this.form.role.forEach(item => {
               role.push({ value: item })
             })
@@ -322,6 +347,19 @@ export default {
               role.push(item.value)
             }
           }
+          let conversationList = []
+          this.conversationList.forEach(item => {
+            if (
+              this.form.conversationList.find(
+                ltem => item.openConversationId == ltem
+              )
+            ) {
+              conversationList.push({
+                chatId: item.chatId,
+                openConversationId: item.openConversationId
+              })
+            }
+          })
           let code = {
             docUrl: this.form.docUrl,
             linkUrl: this.form.linkUrl,
@@ -329,7 +367,8 @@ export default {
             status: this.form.status,
             typeId: this.form.typeId,
             fileSize: this.form.fileSize,
-            role: role
+            role: role,
+            conversationList: conversationList
           }
           this.refList.show ? this.addfile(code) : this.editfile(code)
         }
@@ -381,6 +420,14 @@ export default {
      * **/
     deletjurisdiction(val) {
       this.form.role.splice(val, 1)
+    },
+    //会话下拉列表
+    conversationGetDropList() {
+      api.GET('conversation/getDropList').then(res => {
+        if (res.code == 0) {
+          this.conversationList = res.data
+        }
+      })
     }
   }
 }

+ 7 - 0
src/pages/sessionManagement/components/edit.vue

@@ -0,0 +1,7 @@
+<template>
+    <div>
+        <div>
+            <div v-for="item in 9" :key="item">{{item}}</div>
+        </div>
+    </div>
+</template>

+ 219 - 0
src/pages/sessionManagement/detail.vue

@@ -0,0 +1,219 @@
+<template>
+  <el-dialog
+    :visible.sync="dialogVisible"
+    width="43.5%"
+    :before-close="handleClose"
+    :close-on-press-escape="false"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    v-loading.fullscreen.lock="fullscreenLoading"
+    class="dialogDetail_session"
+  >
+    <template slot="title">
+      <div class="dialogDetail_title">
+        <!-- <img
+          style="width: 50px; height: 50px"
+          src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
+          alt=""
+        /> -->
+        <div class="dialogDetail_title_text">{{ form.conversationName }}</div>
+      </div>
+    </template>
+    <el-form>
+      <el-form-item>
+        <div style="margin-right:-20px">
+          <div
+            v-for="(item, index) in form.userRelList"
+            :key="index"
+            style="
+              display: inline-block;
+              text-align: center;
+              margin-right: 20px;
+            "
+          >
+            <div style="height: 50px">
+              <div v-if="item.avatar">
+                <div class="sessionManagement_icon_titleimg">
+                  <img
+                    style="width: 50px; height: 50px;border-radius:4px"
+                    :src="item.avatar"
+                    alt=""
+                  />
+                  <div
+                    v-if="item.owner == 1"
+                    class="sessionManagement_icon_title_owner"
+                  >
+                    <div class="sessionManagement_icon_title_username">
+                      群主
+                    </div>
+                  </div>
+                </div>
+              </div>
+              <div v-else class="sessionManagement_icon_title">
+                {{ item.userName.slice(-2) }}
+                <div
+                  v-if="item.owner == 1"
+                  class="sessionManagement_icon_title_owner"
+                >
+                  <div class="sessionManagement_icon_title_username">群主</div>
+                </div>
+              </div>
+            </div>
+            <div>{{ item.userName }}</div>
+          </div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_list">
+          <div>新成员是否可查看100条历史消息:</div>
+          <div>{{ form.showHistoryType == 0 ? '不可查看' : '可查看' }}</div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_list">
+          <div>群是否可以被搜索:</div>
+          <div>{{ form.searchable == 0 ? '不可搜索' : '可搜索' }}</div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_list">
+          <div>入群是否需要验证:</div>
+          <div>{{ form.validationType == 0 ? '不验证' : '入群验证' }}</div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_list">
+          <div>@all 适用范围:</div>
+          <div>
+            {{ form.mentionAllAuthority == 0 ? '所有人使用' : '仅群主可@all' }}
+          </div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_list">
+          <div>群管理类型:</div>
+          <div>
+            {{ form.managementType == 0 ? '所以人可管理' : '仅群主可管理' }}
+          </div>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <div class="dialogDetail_listsEnd">
+          <div>是否开启群禁言:</div>
+          <div>{{ form.chatBannedType == 0 ? '不禁言' : '全体禁言' }}</div>
+        </div>
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+<script>
+import * as api from '@/api/api'
+export default {
+  data() {
+    return {
+      fullscreenLoading: false,
+      dialogVisible: false,
+      form: {}
+    }
+  },
+  methods: {
+    // 关闭弹框
+    handleClose() {
+      this.dialogVisible = false
+      this.$parent.search()
+    },
+    // d打开弹框
+    openClose(val) {
+      this.dialogVisible = true
+      if (val) {
+        this.dataList(val)
+      }
+    },
+    // 会话详情
+    dataList(val) {
+      this.fullscreenLoading = true
+      api
+        .GET(`/conversation/detail/${val.id}`)
+        .then(res => {
+          if (res.code == 0) {
+            this.form = res.data
+            // unshift
+            this.form.userRelList.find((item, index) => {
+              if (item.owner == 1) {
+                // 提取群主放在第一位
+                let code = item
+                this.form.userRelList.splice(index, 1)
+                this.form.userRelList.unshift(code)
+              }
+            })
+            this.fullscreenLoading = false
+          }
+        })
+        .catch(() => {
+          this.fullscreenLoading = false
+        })
+    }
+  }
+}
+</script>
+<style lang="less">
+.dialogDetail_session {
+  .el-dialog__body {
+    padding: 30px 20px 6px;
+  }
+  .dialogDetail_title {
+    display: flex;
+    height: 50px;
+    line-height: 50px;
+    padding: 10px;
+    .dialogDetail_title_text {
+      margin-left: 10px;
+      color: #1a1a1a;
+      font-weight: 400;
+      font-size: 16px;
+    }
+  }
+  .dialogDetail_list {
+    display: flex;
+    justify-content: space-between;
+    border-bottom: 1px solid #e1e1e1;
+  }
+  .dialogDetail_listsEnd {
+    display: flex;
+    justify-content: space-between;
+  }
+  .sessionManagement_icon_titleimg {
+    position: relative;
+    border-radius: 4px;
+    color: #fff;
+    text-align: center;
+    height: 50px;
+  }
+  .sessionManagement_icon_title {
+    width: 50px;
+    height: 50px;
+    background: #0f85ff;
+    text-align: center;
+    color: #fff;
+    line-height: 50px;
+    position: relative;
+    border-radius: 4px;
+  }
+  .sessionManagement_icon_title_owner {
+    width: 50px;
+    height: 20px;
+    position: absolute;
+    z-index: 99;
+    bottom: -10px;
+    line-height: 20px;
+  }
+  .sessionManagement_icon_title_username {
+    width: 40px;
+    background: #fff;
+    font-size: 12px;
+    color: #0f85ff;
+    border-radius: 10px;
+    margin: 0 auto;
+  }
+}
+</style>

+ 226 - 0
src/pages/sessionManagement/edit.vue

@@ -0,0 +1,226 @@
+<template>
+  <el-dialog
+    title="群新增"
+    :visible.sync="dialogVisible"
+    width="36%"
+    :before-close="handleClose"
+    :close-on-press-escape="false"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    class="dialog_edit_session"
+    v-loading.fullscreen.lock="fullscreenLoading"
+  >
+    <el-form label-position="left" ref="form" :rules="rules" :model="form">
+      <el-form-item label="群名称:" prop="conversationName" label-width="80px">
+        <el-input
+          placeholder="请输入"
+          v-model.trim="form.conversationName"
+          clearable
+        ></el-input>
+      </el-form-item>
+      <el-form-item label="群 主:" prop="ownerMobile" label-width="80px">
+        <el-input
+          placeholder="请输入"
+          v-model.trim="form.ownerMobile"
+          v-onlyInt
+          clearable
+          maxlength="11"
+        ></el-input>
+      </el-form-item>
+      <el-form-item
+        required
+        label-width="80px"
+        style="margin-bottom: 20px"
+        label
+        :prop="'mobileList.' + index + '.value'"
+        :rules="rules.value"
+        v-for="(item, index) in form.mobileList"
+        :key="index"
+      >
+        <template v-if="index == 0" slot="label">
+          <span>群成员:</span>
+        </template>
+        <div class="form_item_content">
+          <el-input
+            placeholder="请输入手机号"
+            v-onlyInt
+            clearable
+            maxlength="11"
+            v-model="item.value"
+          ></el-input>
+          <i class="iconfont icon-a-zu903" @click="addjurisdiction"></i>
+          <i
+            class="iconfont icon-a-zu904"
+            v-if="form.mobileList.length != 1"
+            @click="deletjurisdiction(index)"
+          ></i>
+        </div>
+      </el-form-item>
+      <el-form-item label="新成员是否可查看100条历史数据:">
+        <el-radio-group v-model="form.showHistoryType">
+          <el-radio :label="1">可查看</el-radio>
+          <el-radio :label="0">不可查看</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="群是否可以被搜索:">
+        <el-radio-group v-model="form.searchable">
+          <el-radio :label="0">不可搜索</el-radio>
+          <el-radio :label="1">可搜索</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="入群是否需要验证:">
+        <el-radio-group v-model="form.validationType">
+          <el-radio :label="0">不验证</el-radio>
+          <el-radio :label="1">入群验证</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="@all 适用范围:">
+        <el-radio-group v-model="form.mentionAllAuthority">
+          <el-radio :label="0">所有人使用</el-radio>
+          <el-radio :label="1">仅群主可@all</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="群管理类型:">
+        <el-radio-group v-model="form.managementType">
+          <el-radio :label="0">所以人可管理</el-radio>
+          <el-radio :label="1">仅群主可管理</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item label="是否开启群禁言:">
+        <el-radio-group v-model="form.chatBannedType">
+          <el-radio :label="0">不禁言</el-radio>
+          <el-radio :label="1">全体禁言</el-radio>
+        </el-radio-group>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="determine('form')">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import * as api from '@/api/api'
+export default {
+  data() {
+    return {
+      fullscreenLoading: false,
+      dialogVisible: false,
+      rules: {
+        conversationName: [
+          { required: true, message: '请输入群名称', trigger: 'blur' }
+        ],
+        ownerMobile: [
+          { required: true, message: '请输入群主', trigger: 'blur' }
+        ],
+        value: [
+          { required: true, message: '请输入群成员手机号', trigger: 'blur' }
+        ]
+      },
+      form: {
+        chatBannedType: 0,
+        conversationName: '',
+        managementType: 0,
+        mentionAllAuthority: 0,
+        mobileList: [{ value: '' }],
+        ownerMobile: '',
+        searchable: 0,
+        showHistoryType: 0,
+        validationType: 0
+      }
+    }
+  },
+  methods: {
+    // 关闭弹窗
+    handleClose() {
+      this.dialogVisible = false
+      this.fullscreenLoading = false
+      this.$parent.search()
+    },
+    // 打开弹框
+    openClose() {
+      this.dialogVisible = true
+    },
+    // 新增群人员
+    addjurisdiction() {
+      this.form.mobileList.push({ value: '' })
+    },
+    // 删除群人员
+    deletjurisdiction(index) {
+      this.form.mobileList.splice(index, 1)
+    },
+    // 新增
+    determine(formName) {
+      this.$refs[formName].validate(valid => {
+        if (valid) {
+          this.fullscreenLoading = true
+          let mobileList = []
+          for (let item of this.form.mobileList) {
+            if (item.value && item.value.length != 11) {
+              this.fullscreenLoading = false
+              return this.$message.warning('请输入正确的手机号')
+            }
+            if (item.value) {
+              mobileList.push(item.value)
+            }
+          }
+          let form = {
+            chatBannedType: this.form.chatBannedType,
+            conversationName: this.form.conversationName,
+            managementType: this.form.managementType,
+            mentionAllAuthority: this.form.mentionAllAuthority,
+            mobileList: mobileList,
+            ownerMobile: this.form.ownerMobile,
+            searchable: this.form.searchable,
+            showHistoryType: this.form.showHistoryType,
+            validationType: this.form.validationType
+          }
+          api
+            .POST('conversation/create', form)
+            .then(res => {
+              if (res.code == 0) {
+                this.$message.success(res.message)
+                this.handleClose()
+              }
+            })
+            .catch(() => {
+              this.fullscreenLoading = false
+            })
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="less">
+.dialog_edit_session {
+  .el-input {
+    max-width: 470px;
+  }
+  .el-radio {
+    margin-right: 60px;
+  }
+  .form_item_content {
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+    .input__inner {
+      width: 410px;
+    }
+  }
+  .icon-a-zu903 {
+    color: #f23f3a;
+    margin-left: 10px;
+    margin-right: 20px;
+    cursor: pointer;
+    font-size: 22px;
+  }
+  .icon-a-zu904 {
+    cursor: pointer;
+    font-size: 22px;
+  }
+  .el-icon-minus {
+    margin-right: 16px;
+  }
+}
+</style>

+ 277 - 0
src/pages/sessionManagement/index.vue

@@ -0,0 +1,277 @@
+<template>
+  <div
+    v-loading.fullscreen.lock="fullscreenLoading"
+    class="userManagement_list"
+  >
+    <div class="userManagement_list_headerSelect">
+      <div class="userManagement-list-btn">
+        <el-form :model="form" ref="form" style="display: inline" inline>
+          <el-form-item class="header_top_form" label="群名称:" prop="account">
+            <el-input
+              placeholder="请输入"
+              size="small"
+              v-model.trim="form.conversationName"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-form>
+        <div style="margin-right: 23px">
+          <el-button
+            size="small"
+            type="primary"
+            style="width: 88px"
+            @click="search"
+            >查询</el-button
+          >
+          <el-button size="small" style="width: 88px" @click="resetForm('form')"
+            >重置</el-button
+          >
+        </div>
+      </div>
+      <div style="text-align: right">
+        <el-button
+          size="small"
+          style="width: 104px; margin-right: 23px"
+          icon="iconfont icon-a-zu13"
+          @click="addList"
+          >新增</el-button
+        >
+      </div>
+    </div>
+    <div>
+      <el-table
+        :data="tableData"
+        ref="editTable"
+        stripe
+        :header-cell-style="{ background: '#F7F7F7' }"
+        :height="screenHeight"
+      >
+        <el-table-column
+          label="群名称"
+          prop="conversationName"
+          align="center"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          label="chatid"
+          prop="chatId"
+          align="center"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          label="群主"
+          prop="ownerName"
+          show-overflow-tooltip
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          label="创建时间"
+          prop="createTime"
+          align="center"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column label="操作" width="140px" align="center">
+          <template slot-scope="scope">
+            <div>
+              <el-button type="text" @click="detail(scope.row)">查看</el-button>
+              <el-button type="text" @click="resetPasswords(scope.row)"
+                >同步会话</el-button
+              >
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="form.pageNum"
+      :page-sizes="[100, 200, 300, 400]"
+      :page-size="form.pageSize"
+      background
+      layout="total,prev, pager, next,jumper"
+      :total="form.total"
+    >
+    </el-pagination>
+    <editDialog ref="editDialogRefs" />
+    <detailDialog ref="detailDialogRefs" />
+  </div>
+</template>
+<script>
+import editDialog from './edit'
+import detailDialog from './detail'
+import * as api from '@/api/api'
+export default {
+  name: 'userManagement',
+  components: {
+    editDialog,
+    detailDialog
+  },
+  data() {
+    return {
+      fullscreenLoading: false,
+      tableData: [],
+      form: {
+        pageNum: 1,
+        pageSize: 10,
+        conversationName: '',
+        start: '',
+        total: 0
+      },
+      screenHeight: document.body.clientHeight - 320,
+      tableDataheight: 0
+    }
+  },
+  mounted() {
+    this.screenHeight = document.body.clientHeight - 320
+    window.onresize = () => {
+      return (() => {
+        this.screenHeight = document.body.clientHeight - 320
+      })()
+    }
+    this.listDataInit()
+  },
+  methods: {
+    /**
+     * @method 重置
+     * **/
+    resetForm(formName) {
+      this.form = {
+        pageNum: 1,
+        pageSize: 10,
+        conversationName: '',
+        start: '',
+        total: 0
+      }
+      this.$refs[formName].resetFields()
+      this.search()
+    },
+    /**
+     * @method 搜索
+     * **/
+    search() {
+      if (sessionStorage.getItem('sessionManagement')) {
+        this.form.pageNum = Number(sessionStorage.getItem('sessionManagement'))
+        sessionStorage.removeItem('sessionManagement')
+      } else {
+        this.form.pageNum = 1
+      }
+
+      this.listDataInit()
+    },
+    /**
+     * @method 用户数据列表
+     * **/
+    listDataInit() {
+      this.tableData = []
+      this.fullscreenLoading = true
+      let code = {
+        conversationName: this.form.conversationName,
+        page: this.form.pageNum,
+        pageSize: this.form.pageSize,
+        start: this.form.start
+      }
+      api
+        .GET('conversation/list', code)
+        .then(res => {
+          if (res.code == 0) {
+            this.tableData = res.data.list
+            this.tableData.forEach(item => {
+              item.status == 1 ? (item.status = true) : (item.status = false)
+            })
+            this.form.pageNum = res.data.currPage
+            this.form.pageSize = res.data.pageSize
+            this.form.total = res.data.totalCount
+            this.fullscreenLoading = false
+            this.$nextTick(() => {
+              this.$refs.editTable.bodyWrapper.scrollTop = this.tableDataheight
+              this.tableDataheight = 0
+            })
+          }
+        })
+        .catch(() => {
+          this.fullscreenLoading = false
+        })
+    },
+    /**
+     * @method 条数分页
+     * **/
+    handleSizeChange(val) {
+      this.form.pageSize = val
+      this.form.pageNum = 1
+      this.listDataInit()
+    },
+    /**
+     * @method 分页
+     * **/
+    handleCurrentChange(val) {
+      this.form.pageNum = val
+      this.listDataInit()
+    },
+    /**
+     * @method 新增
+     * **/
+    addList() {
+      let code = {
+        show: true
+      }
+      this.$refs.editDialogRefs.openClose(code)
+    },
+    // 编辑
+    detail(val) {
+      this.tableDataheight = this.$refs.editTable.bodyWrapper.scrollTop
+      sessionStorage.setItem('sessionManagement', this.form.pageNum)
+      let code = {
+        show: false,
+        id: val.chatId
+      }
+      this.$refs.detailDialogRefs.openClose(code)
+    },
+    // 重置密码
+    resetPasswords(val) {
+      this.tableDataheight = this.$refs.editTable.bodyWrapper.scrollTop
+      sessionStorage.setItem('sessionManagement', this.form.pageNum)
+      this.$confirm('此操作将同步会话信息, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          api.PUT(`conversation/${val.chatId}`).then(res => {
+            if (res.code == 0) {
+              this.$message.success(res.message)
+            }
+          })
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+<style lang="less">
+.userManagement_list {
+  .userManagement_list_headerSelect {
+    .userManagement-list-btn {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 10px;
+    }
+    margin-bottom: 20px;
+    .el-form-item {
+      margin-bottom: 10px;
+      margin-right: 60px;
+      .el-input__inner {
+        background: #f5f5f5;
+        opacity: 1;
+        border-radius: 17px;
+      }
+    }
+    .icon-a-zu13 {
+      font-size: 11px;
+      margin-right: 5px;
+    }
+  }
+}
+</style>

+ 11 - 0
src/router/routes.js

@@ -45,5 +45,16 @@ export const appRouter = [{
       icon: 'icon-a-zu10'
     },
     component: () => import('@/pages/userManagement')
+  },
+  {
+    id: 3,
+    level: 1,
+    name: 'sessionManagement',
+    path: '/sessionManagement',
+    meta: {
+      title: '会话管理',
+      icon: 'icon-a-lujing718'
+    },
+    component: () => import('@/pages/sessionManagement')
   }
 ]

static/font_hsy/demo.css → static/font-hsay/demo.css


+ 26 - 3
static/font_hsy/demo_index.html

@@ -55,6 +55,12 @@
           <ul class="icon_lists dib-box">
           
             <li class="dib">
+              <span class="icon iconfont">&#xe61a;</span>
+                <div class="name">路径 718</div>
+                <div class="code-name">&amp;#xe61a;</div>
+              </li>
+          
+            <li class="dib">
               <span class="icon iconfont">&#xe619;</span>
                 <div class="name">组 904</div>
                 <div class="code-name">&amp;#xe619;</div>
@@ -132,9 +138,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1635484775543') format('woff2'),
-       url('iconfont.woff?t=1635484775543') format('woff'),
-       url('iconfont.ttf?t=1635484775543') format('truetype');
+  src: url('iconfont.woff2?t=1637291508702') format('woff2'),
+       url('iconfont.woff?t=1637291508702') format('woff'),
+       url('iconfont.ttf?t=1637291508702') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -161,6 +167,15 @@
         <ul class="icon_lists dib-box">
           
           <li class="dib">
+            <span class="icon iconfont icon-a-lujing718"></span>
+            <div class="name">
+              路径 718
+            </div>
+            <div class="code-name">.icon-a-lujing718
+            </div>
+          </li>
+          
+          <li class="dib">
             <span class="icon iconfont icon-a-zu904"></span>
             <div class="name">
               组 904
@@ -279,6 +294,14 @@
           
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-a-lujing718"></use>
+                </svg>
+                <div class="name">路径 718</div>
+                <div class="code-name">#icon-a-lujing718</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#icon-a-zu904"></use>
                 </svg>
                 <div class="name">组 904</div>

+ 7 - 3
static/font_hsy/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2880374 */
-  src: url('iconfont.woff2?t=1635484775543') format('woff2'),
-       url('iconfont.woff?t=1635484775543') format('woff'),
-       url('iconfont.ttf?t=1635484775543') format('truetype');
+  src: url('iconfont.woff2?t=1637291508702') format('woff2'),
+       url('iconfont.woff?t=1637291508702') format('woff'),
+       url('iconfont.ttf?t=1637291508702') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-a-lujing718:before {
+  content: "\e61a";
+}
+
 .icon-a-zu904:before {
   content: "\e619";
 }

File diff suppressed because it is too large
+ 1 - 0
static/font-hsay/iconfont.js


+ 7 - 0
static/font_hsy/iconfont.json

@@ -6,6 +6,13 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "25843850",
+      "name": "路径 718",
+      "font_class": "a-lujing718",
+      "unicode": "e61a",
+      "unicode_decimal": 58906
+    },
+    {
       "icon_id": "25285617",
       "name": "组 904",
       "font_class": "a-zu904",

BIN
static/font_hsy/iconfont.ttf


BIN
static/font-hsay/iconfont.woff


BIN
static/font-hsay/iconfont.woff2


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


BIN
static/font_hsy/iconfont.woff


BIN
static/font_hsy/iconfont.woff2


File diff suppressed because it is too large
+ 0 - 50
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.eot


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


+ 0 - 65
static/iconfont/iconfont.json

@@ -1,65 +0,0 @@
-{
-  "id": "2033788",
-  "name": "启德",
-  "font_family": "iconfont",
-  "css_prefix_text": "icon-",
-  "description": "",
-  "glyphs": [
-    {
-      "icon_id": "1137788",
-      "name": "系统",
-      "font_class": "xitong",
-      "unicode": "e67c",
-      "unicode_decimal": 59004
-    },
-    {
-      "icon_id": "8288808",
-      "name": "主页",
-      "font_class": "zhuye",
-      "unicode": "e83a",
-      "unicode_decimal": 59450
-    },
-    {
-      "icon_id": "12683723",
-      "name": "菜单",
-      "font_class": "icon_huabanfuben",
-      "unicode": "e61d",
-      "unicode_decimal": 58909
-    },
-    {
-      "icon_id": "693576",
-      "name": "联系人",
-      "font_class": "lianxirenguanli",
-      "unicode": "e645",
-      "unicode_decimal": 58949
-    },
-    {
-      "icon_id": "11121378",
-      "name": "数据模块",
-      "font_class": "shujumokuai",
-      "unicode": "e629",
-      "unicode_decimal": 58921
-    },
-    {
-      "icon_id": "14444834",
-      "name": "统计",
-      "font_class": "tongji",
-      "unicode": "e719",
-      "unicode_decimal": 59161
-    },
-    {
-      "icon_id": "15313227",
-      "name": "banner",
-      "font_class": "banner",
-      "unicode": "e61a",
-      "unicode_decimal": 58906
-    },
-    {
-      "icon_id": "16473872",
-      "name": "内容",
-      "font_class": "Document",
-      "unicode": "e641",
-      "unicode_decimal": 58945
-    }
-  ]
-}

File diff suppressed because it is too large
+ 0 - 50
static/iconfont/iconfont.svg


BIN
static/iconfont/iconfont.ttf


BIN
static/iconfont/iconfont.woff


BIN
static/iconfont/iconfont.woff2