k3sc пре 4 година
родитељ
комит
94f25cf3eb

+ 0 - 63
src/api/webim/index.js

@@ -1,63 +0,0 @@
-import request from '@/utils/request'
-
-// 获取人员列表
-export function list(query) {
-  return request({
-    url: '/webim/list',
-    method: 'get',
-    params: query
-  })
-}
-// 获取人员列表
-export function newList(query) {
-  return request({
-    url: '/webim/deptList',
-    method: 'get',
-    params: query
-  })
-}
-// 获取人员列表
-export function getMine(query) {
-  return request({
-    url: '/webim/mine',
-    method: 'get',
-    params: query
-  })
-}
-// 设置在线状态
-export function setOnlineStatus(sta) {
-  return request({
-    url: '/webim/setOnlineStatus/'+sta,
-    method: 'get'
-  })
-}
-// 发送消息
-export function sendMsg(query) {
-  return request({
-    url: '/webim/sendMessage',
-    method: 'post',
-    params: query
-  })
-}
-// 发送文件
-export function sendFile(query) {
-  return request({
-    url: '/webim/sendFileMessage',
-    method: 'post',
-    data: query
-  })
-}
-// 聊天记录
-export function getHistory(query) {
-  return request({
-    url: '/webim/getHistory/'+query,
-    method: 'get'
-  })
-}
-// chatlog
-export function getChatlog(query) {
-  return request({
-    url: '/webim/getChatLog/'+query,
-    method: 'get'
-  })
-}

+ 0 - 568
src/components/ChatBox/ChatBox.vue

@@ -1,568 +0,0 @@
-<template>
-<!--  消息发送模块-->
-  <div class="chat-box" v-if="currentChat && currentChat.id">
-    <div class="chat-box-head" v-drag="target">
-      <span class="username">{{currentChatInfo && currentChatInfo.username}}</span>
-    </div>
-    <div class="main-chat-wrap">
-      <div class="main-chat-container">
-        <div class="main-chat" ref="chat-main">
-          <ul class="chat-list" ref="chat-list">
-            <li class="chat-item clearfix" v-for="(item, index) in records" :class="{'mine': item.mine}">
-              <div class="time" v-if="handleTimeVisible(item, index)"><span>{{item.time | formatDate }}</span></div>
-              <div class="avatar">
-                <img :src="userAvatar(item.sender)">
-              </div>
-              <div class="chats chats-image" v-if="item.chatlogType === 'image'">
-                <img :src="item.content" style="width: 90%;height: auto">
-              </div>
-              <div class="chats chats-file" v-else-if="item.chatlogType === 'file'">
-                <a class="down-link" :href="item.content.src" :download="item.content.name"><i class="fa fa-cloud-download down-link-icon"></i><span class="down-link-file">{{item.content.name}}</span></a>
-              </div>
-              <div class="chats" v-else v-html="item.content"></div>
-            </li>
-          </ul>
-        </div>
-        <div class="chat-input" :class="{'focus': focusClass}">
-          <Emoji v-show="emojiVisible"></Emoji>
-          <div class="tool-bar">
-            <span class="tool-bar-item fa fa-smile-o emjoi" @click="handleEmojiVisible(null)"></span>
-            <el-upload
-              class="file-upload"
-              action="#"
-              :http-request="uploadFile"
-              :before-upload="handleBeforeUpload"
-              :on-success="handleUploadSuccess"
-              :on-error="handleUploadError"
-              :name="uploadName"
-              :show-file-list="false"
-              multiple
-              :limit="3">
-              <el-button size="small" type="primary" style="background: #fff;border:none;width:0px !important;height: 0px !important; "><i class="el-icon-upload" style="color: #e5e5e5;font-size: 20px"></i></el-button>
-            </el-upload>
-            <span class="tool-bar-item history" @click="handleHistoryVisible">历史记录</span>
-          </div>
-          <div class="input-box">
-            <textarea id="textarea" @focus="handleFocus" @blur="handleBlur" @keydown.enter="handleKeydown" @keyup.enter="handleSend" ref="textarea" v-model="sendMessage"></textarea>
-          </div>
-          <div class="send">
-            <button class="send-btn" @click="handleSend">发送</button>
-          </div>
-        </div>
-      </div>
-      <ChatLog :history="history" v-model="historyVisible" :mine="mine" />
-    </div>
-    <div class="image-prev" v-show="prevVisible && currentImage" @click="handleClosePrev">
-      <img :src="currentImage" @click="handleClosePrev">
-    </div>
-  </div>
-</template>
-<script>
-  import { formatDate } from '@/filters/filters'
-  import drag from '@/directive/drag'
-  import Emoji from '@/components/Emoji/Emoji'
-  import ChatLog from '@/components/ChatLog/ChatLog'
-  import {sendMsg,sendFile} from '@/api/webim/index'
-
-  export default {
-    props: {
-      mine: Object,
-      type: String,
-      ext: Array,
-      uploadName: String,
-      history: Object,
-      store: Object,
-      maxSize: Number
-    },
-    data () {
-      return {
-        focusClass: false,
-        sendMessage: '',
-        target: null,
-        emojiVisible: false,
-        currentImage: '',
-        prevVisible: false,
-        historyVisible: false,
-        maxByte: this.maxSize ? this.maxSize * 1024 * 1024 : 0,
-        fileName: ''
-      }
-    },
-    methods: {
-      handleMini () {
-        this.$parent.handleMini(true)
-      },
-      handleFocus () {
-        this.focusClass = true
-        this.emojiVisible = false
-      },
-      handleBlur () {
-        this.focusClass = false
-      },
-      handleKeydown (e) {
-        e = e || window.event
-        if (this.sendMessage.replace(/(^\s*)|(\s*$)/g, '') === '') {
-          this.$message({
-            message: '消息内容不能为空',
-            type: 'warning'
-          })
-          e.preventDefault()
-        }
-      },
-      handleScroll () {
-        this.$nextTick(() => {
-          const chatList = this.$refs['chat-list']
-          const chatMain = this.$refs['chat-main']
-          if (chatMain) {
-            chatMain.scrollTop = chatList.clientHeight
-          }
-        })
-      },
-      handleTimeVisible (item, index) {
-        if (index === 0) {
-          return true
-        } else {
-          return (this.records[index].time - this.records[index - 1].time > 10 * 60 * 1000)
-        }
-      },
-      handleSend (e) {
-        if (this.sendMessage.replace(/(^\s*)|(\s*$)/g, '').length > 800) {
-          this.$message('发送内容长度不能超过300')
-          return false
-        }
-        if (this.sendMessage.replace(/(^\s*)|(\s*$)/g, '') === '') {
-          this.$message('消息内容不能为空')
-          return
-        }
-        this.$refs.textarea.focus()
-        const sendData = {
-          content: this.sendMessage,
-          chatlogType: 'text'
-        }
-        this.afterSend(sendData)
-      },
-      handleSendEmoji (index) {
-        this.$refs.textarea.focus()
-        const sendData = {
-          content: '<i class="emoji-item emoji' + index + '"></i>',
-          chatlogType: 'text'
-        }
-        this.afterSend(sendData)
-      },
-      handleSendImage (src) {
-        this.$refs.textarea.focus()
-        const sendData = {
-          content: src,
-          chatlogType: 'image'
-        }
-        this.afterSend(sendData)
-      },
-      uploadFile (item) {
-        const self = this
-        this.$refs.textarea.focus()
-        let uploadData = new FormData()
-        uploadData.append('file', item.file)
-        sendFile(uploadData).then(response => {
-          if(response.code=="200") {
-            self.src = '/dev-api' + response.msg;
-            self.handleUploadSuccess(self.src);
-          }else{
-            self.handleUploadError();
-          }
-        });
-      },
-      handleSendFile (src) {
-        this.$refs.textarea.focus()
-        const content = {
-          src: src,
-          name: this.fileName
-        }
-        const sendData = {
-          content: content,
-          chatlogType: 'file'
-        }
-        this.afterSend(sendData)
-      },
-      handleBeforeUpload (file) {
-        const fileSize = file.size
-        if (this.maxByte && this.maxByte < fileSize) {
-          this.$message({
-            type: 'error',
-            message: `文件大小不能超过${this.maxSize}M`
-          })
-          return false
-        }
-        this.fileName = file.name
-      },
-      handleUploadSuccess (data) {
-        debugger
-        this.$message({
-          type: 'success',
-          message: '文件发送成功'
-        })
-        const src = data
-        const fileNameArr = this.fileName.split('.')
-        const ext = fileNameArr[fileNameArr.length - 1].toLowerCase()
-        const imgExt = ['bmp', 'jpg', 'jpeg', 'png', 'gif']
-        if (imgExt.indexOf(ext) > -1) {
-          this.handleSendImage(src)
-        } else {
-          this.handleSendFile(src)
-        }
-      },
-      handleUploadError () {
-        this.$message({
-          type: 'error',
-          message: '文件发送失败,请重试'
-        })
-      },
-      afterSend (sendData) {
-        Object.assign(sendData, {
-          mine: true,
-          avatar: this.mine.avatar,
-          sender: this.mine.id,
-          recver: this.currentChat.id,
-          time: new Date().getTime(),
-          sendername: this.mine.username,
-          recvername: this.currentChatInfo.username,
-          id: this.currentChat.id,
-          type: this.currentChat.type
-        })
-        this.handleScroll()
-        this.sendMessage = ''
-        this.$parent.emitSend(sendData)
-        debugger
-        this.store.commit('updateLocalHistory', sendData)
-        sendMsg(sendData)
-      },
-      handleEmojiVisible (status) {
-        this.emojiVisible = status === null ? !this.emojiVisible : status
-      },
-      handleFileChange (e) {
-        const file = e.target.files[0]
-        const name = e.target.name
-        const temp = file.name.split('.')
-        const ext = temp[temp.length - 1]
-        if (this.ext.length > 0 && this.ext.indexOf(ext) === -1) {
-          this.$message({
-            messsage: '文件格式不支持',
-            type: 'warning'
-          })
-          return
-        }
-        this.$refs.uploadForm.reset()
-        this.upload(name, file)
-      },
-      handlePrevImage (e) {
-        this.prevVisible = true
-        this.currentImage = e.target.src
-      },
-      handleClosePrev () {
-        this.prevVisible = false
-        this.currentImage = ''
-      },
-      handleHistoryVisible () {
-        debugger
-        this.historyVisible = true
-        let chat = Object.assign(this.currentChatInfo, this.currentChat)
-        this.$parent.handleHistoryVisible(chat)
-      },
-      chatTypeClass (type) {
-        return `chats-${type}`
-      },
-      userAvatar (userId) {
-        if (!this.userInfoCenter[userId]) {
-          return ''
-        } else {
-          return this.userInfoCenter[userId].avatar
-        }
-      },
-      userName (userId) {
-        if (!this.userInfoCenter[userId]) {
-          return ''
-        } else {
-          return this.userInfoCenter[userId].username
-        }
-      }
-    },
-    mounted () {
-      this.target = this.$parent.$refs.imdrag
-      this.$nextTick(() => {
-        this.handleScroll()
-      })
-    },
-    computed: {
-      userInfoCenter () {
-        return this.store.states.userInfoCenter
-      },
-      currentChat () {
-        return this.store.states.currentChat
-      },
-      currentChatInfo () {
-        return this.userInfoCenter[this.currentChat.id]
-      },
-      records () {
-        if (!this.currentChat) {
-          return []
-        } else {
-          return this.store.states.localHistory[this.currentChat.id]
-        }
-      }
-    },
-    watch: {
-      currentChat: {
-        handler () {
-          this.$nextTick(() => {
-            this.handleScroll()
-          })
-        }
-      },
-      records: {
-        handler (newV) {
-          this.$nextTick(() => {
-            this.handleScroll()
-          })
-        },
-        deep: true
-      }
-    },
-    filters: {
-      formatDate
-    },
-    directives: {
-      drag
-    },
-    components: {
-      Emoji,
-      ChatLog
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .send-btn{
-    background: #1d93ec;
-  }
-  .clearfix::after{
-    content: " ";
-    display:block;
-    height: 0;
-    overflow: hidden;
-    clear: both;
-  }
-  .chat-box{
-    flex: 1;
-    background: #fff;
-    min-width: 400px;
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    border-right: 1px solid #e7e7e7;
-    .chat-box-head{
-      height: 40px;
-      line-height: 40px;
-      padding:0 20px;
-      font-size: 20px;
-      border-bottom: 1px solid #e7e7e7;
-    }
-  .chat-box .main-chat{
-    height: 325px !important;
-    overflow: auto;
-  }
-    .brief-avater {
-      display: inline-block;
-      width: 45px;
-      height: 45px;
-      border-radius: 5px;
-      vertical-align: middle;
-    }
-    .username {
-      display: inline-block;
-      vertical-align: middle;
-    }
-    .mini-mark {
-      float: right;
-      font-size: 30px;
-      display: inline-block;
-      padding:13px 10px 17px;
-      margin-top: 15px;
-      line-height: 0;
-      cursor: pointer;
-      &:hover {
-        background: #e7e7e7;
-      }
-    }
-    .main-chat{
-      margin: 0;
-      padding: 0;
-      height: 65%;
-      overflow: auto;
-      border-bottom: 1px solid #e7e7e7;
-      box-sizing: border-box;
-      .chat-list{
-        margin: 0;
-        padding: 0 10px;
-      }
-      .chat-item{
-        box-sizing: border-box;
-        width: 100%;
-        padding: 10px;
-      }
-      .avatar{
-        float: left;
-        width: 40px;
-        height: 40px;
-        img{
-          width: 100%;
-          height: 100%;
-          border-radius: 5px;
-        }
-      }
-      .chats{
-        display: inline-block;
-        margin: 4px 15px;
-        padding: 5px 10px;
-        line-height: 1.5;
-        font-size: 14px;
-        background: #e8e8e8;
-        min-width: 30px;
-        text-align: center;
-        border-radius: 15px;
-      }
-      .chats-image {
-        height: auto;
-        padding: 10px;
-        width: 79%;
-        cursor: pointer;
-        max-width: 400px;
-      }
-      .mine {
-        overflow: hidden;
-        padding-right: 10px;
-        text-align: right;
-        .chats {
-          background: #d8e8f9;
-        }
-        .avatar{
-          float: right;
-        }
-      }
-    }
-    .chat-input {
-      position: relative;
-      height: 35%;
-      box-sizing: border-box;
-      padding: 0 10px;
-      .tool-bar {
-        height: 20%;
-        line-height: 40px;
-        .tool-bar-item {
-          margin-right: 8px;
-          cursor: pointer;
-          color: #777;
-          vertical-align: middle;
-        }
-      }
-      .emjoi{
-        font-size: 20px;
-      }
-      .history {
-        display: inline-block;
-        float: right;
-        font-size: 14px;
-      }
-      .input-box {
-        height: 60%;
-        textarea {
-          width: 100%;
-          height: 100%;
-          line-height: 1.4;
-          resize: none;
-          border: none;
-          outline: none;
-          background: #fff;
-          overflow: auto;
-          &:focus {
-            background: #fff;
-          }
-        }
-      }
-      .send {
-        text-align: right;
-        height: 20%;
-      }
-      .send-btn {
-        line-height: 26px;
-        width: 60px;
-        color: #fff;
-        border: 1px solid #e7e7e7;
-        font-size: 14px;
-        border-radius: 3px;
-        margin-right: 10px;
-        cursor: pointer;
-      }
-    }
-    .time {
-      text-align: center;
-      span {
-        display: inline-block;
-        padding: 3px 8px;
-        color: #999;
-        border-radius: 3px;
-        font-size: 14px;
-      }
-    }
-    .emoji-item {
-      margin: 2px 5px 0 5px;
-    }
-    .image-file {
-      position: absolute;
-      top: 0;
-      opacity: 0;
-      z-index: -1;
-    }
-    .image-prev {
-      cursor: pointer;
-      position: fixed;
-      top: 0;
-      right: 0;
-      bottom: 0;
-      left: 0;
-      display: flex;
-      z-index: 1000;
-      background: rgba(0,0,0,0.5);
-      justify-content: center;
-      align-items: center;
-      img {
-        max-width: 80%;
-      }
-    }
-    .file-upload {
-      display: inline-block;
-    }
-    .down-link {
-      color: #000;
-      text-decoration: none;
-      cursor: pointer;
-      &:hover .down-link-file {
-        text-decoration: underline;
-      }
-    }
-    .down-link-icon {
-      font-size: 30px;
-    }
-    .down-link-file {
-      display: inline-block;
-      margin-left: 10px;
-    }
-  }
-  .focus {
-    background: #fff;
-  }
-  .main-chat-wrap {
-    display: flex;
-    justify-content: space-between;
-    height: calc(100% - 40px);
-  }
-  .main-chat-container {
-    flex: 1;
-  }
-</style>

+ 0 - 186
src/components/ChatList/ChatList.vue

@@ -1,186 +0,0 @@
-<template>
-  <!--  图片文件发送模块-->
-  <div class="middle">
-    <ul class="list">
-      <li class="list-item" v-for="(item, index) in lists" :key="index" @click="handleChatChange(item)" :class="{'current': currentChat && currentChat.id === item.id}">
-        <div class="avatar">
-          <img :src="userAvatar(item)">
-        </div>
-        <div class="user">
-          <div class="username">{{userName(item)}}</div>
-          <div class="message" v-if="item.chatlogType === 'image'">图片</div>
-          <div class="message" v-else-if="item.chatlogType === 'file'">文件</div>
-          <div class="message" v-else v-html="item.chatlog"></div>
-        </div>
-        <div class="newmsg-bubble" v-show="item.count">{{item.count}}</div>
-        <div class="time">{{item.time | formatDate}}</div>
-        <div class="chat-close" @click.stop="handleChatClose(index)">&times;</div>
-      </li>
-    </ul>
-  </div>
-</template>
-<script>
-  import { formatDate } from '@/filters/filters'
-  export default {
-    name: 'middle',
-    props: {
-      store: Object
-    },
-    data () {
-      return {
-        clearVisible: false
-      }
-    },
-    methods: {
-      handleChatChange (item) {
-        this.store.commit('setCurrentChat', item)
-        if (item.count !== 0) {
-          item.count = 0
-          this.store.commit('resetItemCount', item)
-        }
-      },
-      handleClearSearch () {
-        if (this.keyword !== '') {
-          this.keyword = ''
-          this.$parent.handleClearSearch()
-        }
-        this.clearVisible = false
-      },
-      handleClearVisible () {
-        this.clearVisible = true
-      },
-      handleChatClose (index) {
-        this.store.commit('removeChatLog', index)
-      },
-      userAvatar (item) {
-        let id
-        if (item.type === 'friend') {
-          id = item.id
-        } else {
-          id = item.groupId
-        }
-        if (!this.userInfoCenter[id]) {
-          return ''
-        } else {
-          return this.userInfoCenter[id].avatar
-        }
-      },
-      userName (item) {
-        let id
-        if (item.type === 'friend') {
-          id = item.id
-        } else {
-          id = item.groupId
-        }
-        if (!this.userInfoCenter[id]) {
-          return ''
-        } else {
-          return this.userInfoCenter[id].username
-        }
-      }
-    },
-    filters: {
-      formatDate
-    },
-    computed: {
-      lists () {
-        return this.store.states.chatLogsList
-      },
-      currentChat () {
-        return this.store.states.currentChat
-      },
-      userInfoCenter () {
-        return this.store.states.userInfoCenter
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .middle{
-    height: 100%;
-    overflow: hidden;
-    width: 230px;
-    border-right: 1px solid #e7e7e7;
-    background: #fafafa;
-    .list{
-      overflow-y: auto;
-      padding: 0;
-      margin: 0;
-      height: 100%;
-      .list-item{
-        display: flex;
-        padding: 10px;
-        position: relative;
-        cursor: pointer;
-        border-bottom: 1px solid #e5e5e5;
-        &:hover .chat-close {
-          display: block;
-        }
-      }
-  .current{
-    background: #ebebec;
-  }
-      .avatar {
-        width: 40px;
-        height: 40px;
-        img{
-          width: 100%;
-          height: 100%;
-          border-radius: 50%;
-        }
-      }
-      .user{
-        position: relative;
-        margin-left: 15px;
-        font-size: 14px;
-        .username {
-          width: 100px;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          white-space: nowrap;
-        }
-        .message{
-          width: 155px;
-          margin-top: 5px;
-          height: 18px;
-          overflow: hidden;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          font-size: 12px;
-        }
-      }
-      .newmsg-bubble {
-        position: absolute;
-        right: 20px;
-        bottom: 7px;
-        width: 30px;
-        height: 20px;
-        line-height: 20px;
-        border-radius: 20px;
-        color: #fff;
-        background: #ff3b30;
-        font-size: 12px;
-        text-align: center;
-      }
-      .time{
-        position: absolute;
-        right: 10px;;
-        font-size: 12px;
-      }
-    }
-    .chat-close {
-      display: none;
-      position: absolute;
-      top: 21px;
-      right: 10px;
-      width: 20px;
-      height: 20px;
-      line-height: 18px;
-      font-size: 20px;
-      text-align: center;
-      background: #1d93ec;
-      border-radius: 50%;
-      color: #fff;
-    }
-  }
-</style>

+ 0 - 211
src/components/ChatLog/ChatLog.vue

@@ -1,211 +0,0 @@
-<template>
-  <transition name="collapse">
-    <div class="chatlog" v-if="visible">
-      <div class="chatlog-wrap">
-        <div class="title">
-          <span>聊天记录</span>
-          <span class="close" @click="handleHistoryVisible">&times;</span>
-        </div>
-        <ul class="log-list">
-          <li class="log-item" v-for="(item, index) in cloneHistory.records" :class="{'mine': item.mine}">
-            <div class="time" v-if="handleTimeVisible(item, index)"><span>{{item.time | formatDate(true) }}</span></div>
-            <div class="avatar">
-              <img :src="item.avatar">
-            </div>
-            <div class="message message-image" v-if="item.chatlogType === 'image'">
-              <img :src="item.content" style="width: 90%;height: auto">
-            </div>
-            <div class="message message-file" v-else-if="item.chatlogType === 'file'">
-              <a class="down-link" :href="item.content.src" :download="item.content.name"><i class="fa fa-cloud-download down-link-icon"></i><span class="down-link-file">{{item.content.name}}</span></a>
-            </div>
-            <div class="message" v-else v-html="item.content"></div>
-          </li>
-        </ul>
-        <div class="page" v-show="history.total">
-          <el-pagination
-            layout="prev, pager, next"
-            :total="history.total || 0"
-            :page-size="history.size"
-            @current-change="handlePageChange">
-          </el-pagination>
-        </div>
-      </div>
-    </div>
-  </transition>
-</template>
-
-<script>
-
-
-
-  import { formatDate } from '@/filters/filters'
-  import { deepCopy } from '@/utils/utils.js'
-  import { getChatlog } from '@/api/webim/index.js'
-  export default {
-    name: 'chatlog',
-    props: {
-      history: Object,
-      value: {
-        type: Boolean,
-        default: false
-      },
-      mine: Object
-    },
-    data () {
-      return {
-        visible: this.value,
-        cloneHistory: []
-      }
-    },
-    methods: {
-      handleTimeVisible (item, index) {
-        const self = this
-        if (index === 0) {
-          return true
-        } else {
-          return (self.history.records[index].time - self.history.records[index - 1].time > 10 * 60 * 1000)
-        }
-      },
-      handleHistoryVisible () {
-        this.visible = false
-        this.$emit('input', this.visible)
-      },
-      handlePageChange (page) {
-        this.$parent.$parent.handlePageChange(page)
-      },
-      makeCloneHistory () {
-        // if (this.history && !this.history.records) return
-        // let history = deepCopy(this.history)
-        const self = this
-        getChatlog(self.mine.id).then(function (response) {
-          let history =response.data
-          history.records.forEach(item => {
-            item.mine = item.sender == self.mine.id.toString()
-          })
-          return self.cloneHistory=history
-        })
-      }
-    },
-    filters: {
-      formatDate
-    },
-    mounted () {
-      this.makeCloneHistory()
-    },
-    watch: {
-      value (newV) {
-        this.visible = newV
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .chatlog {
-    width: 350px;
-    overflow: hidden;
-    .chatlog-wrap {
-      width: 100%;
-      height: 100%;
-      border-left: 1px solid rgba(0,0,0,.14);
-      background: #fff;
-      .title {
-        height: 40px;
-        line-height: 40px;
-        background: #fff;
-        font-size: 14px;
-        padding: 0 15px;
-        border-bottom: 1px solid #e7e7e7;
-        .close {
-          float: right;
-          font-size: 24px;
-          font-weight: bold;
-          cursor: pointer;
-          height: 30px;
-          line-height: 30px;
-        }
-      }
-    }
-    .log-list{
-      margin: 0 auto 30px;
-      padding: 0 10px;
-      height: 100%;
-      overflow: auto;
-    }
-    .log-item{
-      box-sizing: border-box;
-      width: 100%;
-      padding: 5px;
-    }
-    .avatar{
-      float: left;
-      width: 30px;
-      height: 30px;
-      img{
-        width: 100%;
-        height: 100%;
-        border-radius: 50%;
-      }
-    }
-    .message{
-      display: inline-block;
-      margin: 4px 15px;
-      padding: 3px 5px;
-      font-size: 14px;
-      background: #fff;
-      /*font-size: 12px;*/
-    }
-    .mine {
-      overflow: hidden;
-      padding-right: 10px;
-      text-align: right;
-      .avatar{
-        float: right;
-      }
-    }
-    .time {
-      text-align: center;
-      span {
-        font-size: 12px;
-        display: inline-block;
-        padding: 3px 8px;
-        color: #000;
-        border-radius: 3px;
-      }
-    }
-    .page {
-      position: sticky;
-      width: 100%;
-      background: #fff;
-      bottom: 0;
-      height: 33px;
-      .rs-pagination{
-        text-align: right;
-      }
-      .rs-pagination .pagination{
-        margin: 0;
-      }
-    }
-    .down-link {
-      color: #000;
-      text-decoration: none;
-      cursor: pointer;
-      &:hover .down-link-file {
-        text-decoration: underline;
-      }
-    }
-    .down-link-icon {
-      font-size: 30px;
-    }
-    .down-link-file {
-      display: inline-block;
-      margin-left: 10px;
-    }
-  }
-  .collapse-enter-active, .collapse-leave-active {
-    transition: all 0.5s;
-  }
-  .collapse-enter, .collapse-leave-to {
-    width: 0;
-    transform: translate3d(350px);
-  }
-</style>

Разлика између датотеке није приказан због своје велике величине
+ 8 - 13
src/layout/components/Navbar.vue


+ 3 - 3
src/views/activiti/modeler/index.vue

@@ -173,12 +173,12 @@
       /** 新增按钮操作 */
       handleAdd() {
         this.reset()
-        this.src = 'http://192.168.1.20:8081/modeler/create?r=' + Math.random()
+        this.src = 'http://127.0.0.1:8081/modeler/create?r=' + Math.random()
         this.editOpen = true
       },
       /** 编辑按钮操作 */
       handleUpdate(row) {
-        this.src = 'http://192.168.1.20:8081/modeler/activiti/index?modelId=' + row.id
+        this.src = 'http://127.0.0.1:8081/modeler/activiti/index?modelId=' + row.id
         document.getElementById('activiti_main').contentWindow.location.reload()
         this.editOpen = true
       },
@@ -199,7 +199,7 @@
       },
       /** 导出按钮操作 */
       handleExport(row) {
-        window.location.href = 'http://192.168.1.20:8081/activiti/modeler/export?modelId=' + row.id
+        window.location.href = 'http://127.0.0.1:8081/activiti/modeler/export?modelId=' + row.id
       },
       /** 删除按钮操作 */
       handleDelete(row, index) {

+ 1 - 1
src/views/system/actform/fawen/iWebOffice.vue

@@ -66,7 +66,7 @@
         this.webOfficeObj.setObj(document.getElementById('WebOffice'))
         try {
           setTimeout(() => {
-          this.webOfficeObj.ServerUrl = "http://localhost/dev-api";
+          this.webOfficeObj.ServerUrl = "http://localhost/prod-api";
           // this.webOfficeObj.RecordID = "web";  //RecordID:本文档记录编号
           this.webOfficeObj.UserName = this.fileData.user;
           this.webOfficeObj.FileName = this.fileData.filePath;

+ 2 - 2
src/views/system/process/index.vue

@@ -363,12 +363,12 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
-        this.src = 'http://192.168.1.20:8081/modeler/create?f=' + this.queryParams.activitiCategory + '&r=' + Math.random()
+        this.src = 'http://127.0.0.1:8081/modeler/create?f=' + this.queryParams.activitiCategory + '&r=' + Math.random()
         this.editOpen = true
       },
       /** 编辑按钮操作 */
       handleUpdate(row) {
-        this.src = 'http://192.168.1.20:8081/modules/WorkFlow/Activiti/index.html?modelId=' + row.activitiId
+        this.src = 'http://127.0.0.1:8081/modules/WorkFlow/Activiti/index.html?modelId=' + row.activitiId
         this.editOpen = true
       },
       /** 部署按钮操作 */

+ 0 - 406
src/views/webim/im.vue

@@ -1,406 +0,0 @@
-<template>
-  <div class="wrapper">
-    <div class="container" :class="skin">
-      <TheHeader :lists="lists" :mine="mine" :store="store" :brief="brief"></TheHeader>
-      <div class="vue-im" ref="imdrag" v-show="!miniVisible">
-
-        <Contacts
-          :need-ref="needRef"
-          v-show="currentTab === 'user' && !brief"
-          @on-view-members="handleViewGroupMembers"
-          @on-add-group="handleAddNewGroup"
-          :groups-list="groupsList"
-          :friends-list="lists"
-          :members-list="membersList"
-          :store="store"/>
-
-        <div class="im-chat-wrapper" v-show="currentTab === 'chat'">
-          <ChatList :store="store"/>
-          <ChatBox
-            :mine="mine"
-            :ext="ext"
-            :max-size="maxSize"
-            :history="history"
-            :upload-name="uploadName"
-            :store="store"/>
-        </div>
-      </div>
-      <audio v-if="voice" :src="voice" ref="voice"></audio>
-    </div>
-  </div>
-</template>
-
-<script>
-  import ChatList from '@/components/ChatList/ChatList.vue'
-  import ChatBox from '@/components/ChatBox/ChatBox.vue'
-  import Contacts from '@/components/Contacts/Contacts'
-  import TheHeader from '@/components/Header/TheHeader'
-  import { device, typeOf } from '@/utils/utils'
-  import storage from '@/utils/storage'
-  import IMStore from '@/store/store'
-  import {list,newList,getMine,getHistory,getChatlog,setOnlineStatus} from '@/api/webim/index'
-
-
-  export default {
-    name: 'vue-im',
-    props: {
-      history: {
-        type: Object,
-        default () {
-          return {
-            total: 0,
-            size: 10,
-            records: []
-          }
-        }
-      },
-      lists: {
-        type: Array,
-        default () {
-          return []
-        }
-      },
-      unReadList: {
-        type: Array,
-        default () {
-          return []
-        }
-      },
-      groupsList: {
-        type: Array,
-        default () {
-          return []
-        }
-      },
-      mine: {
-        type: Object,
-        required: true
-      },
-      voice: {
-        type: String,
-        default: require('@/assets/default.mp3')
-      },
-      ext: {
-        type: Array,
-        default () {
-          return []
-        }
-      },
-      uploadName: {
-        type: String,
-        default: 'image'
-      },
-      membersList: {
-        type: Array,
-        default () {
-          return []
-        }
-      },
-      maxSize: Number,
-      brief: {
-        type: Boolean,
-        default: false
-      },
-      chat: {
-        type: Object,
-        default () {
-          return {}
-        }
-      }
-    },
-    data () {
-      const store = new IMStore(this)
-      return {
-        miniVisible: this.mini,
-        historyVisible: false,
-        store,
-        needRef:false
-      }
-    },
-    created () {
-      this.getMine()
-      this.fetchUserList()
-    },
-    methods: {
-      //---------------websocket start
-      initWebSocket: function () {
-        // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
-        this.websock = new WebSocket("ws://192.168.1.56:8081/websocket/"+this.mine.id);
-        this.websock.onopen = this.websocketonopen;
-        this.websock.onerror = this.websocketonerror;
-        this.websock.onmessage = this.websocketonmessage;
-        this.websock.onclose = this.websocketclose;
-      },
-      websocketonopen: function () {
-        console.log("WebSocket连接成功");
-      },
-      websocketonerror: function (e) {
-        console.log("WebSocket连接发生错误");
-      },
-      websocketonmessage: function (e) {
-        console.log(e.data);
-        // debugger
-        this.message = eval('(' + e.data + ')');
-        if(this.message.chatlogType=="onlineNotice") {
-          this.$nextTick(()=>{
-            this.needRef = true;
-            this.fetchUserList()
-          })
-        }else{
-        this.getMessage(this.message);
-        }
-      },
-      websocketclose: function (e) {
-        this.websock.close()
-        console.log("connection closed");
-        this.setOnlineStatus('offline')
-      },
-      //---------------websocket end
-      getMine(){
-        const self = this
-        getMine().then(function (response) {
-          let mine = response.data
-          self.mine = mine
-        })
-      },
-      setOnlineStatus(sta){
-        const self = this
-        setOnlineStatus(sta)
-      },
-      getHistory(id){
-        const self = this
-        getChatlog(id).then(function (response) {
-          let history = response.data
-          // debugger
-          const localData = storage.readData('iminfo')
-          let currentChat = storage.readData('currentChat')
-          if (currentChat && currentChat.hostId === id) {
-            self.store.commit('setCurrentChat', currentChat)
-          } else {
-            self.store.commit('setCurrentChat', null)
-          }
-          if (self.brief && self.chat && self.chat.id) {
-            self.chat.type = self.chat.type || 'friend'
-            currentChat = self.chat
-            self.store.commit('updateUserInfoCenter', self.chat)
-            self.store.commit('setCurrentChat', self.chat)
-            self.store.commit('setCurrentTab', 'chat')
-          }
-          let tempData = {
-            avatar: self.mine.avatar,
-            id: self.mine.id,
-            username: self.mine.username
-          }
-          if (localData && localData.id === self.mine.id) {
-            tempData.history = localData.history
-            tempData.chatList = localData.chatList
-          } else {
-            tempData.history = {}
-            tempData.chatList = []
-          }
-          storage.saveData('iminfo', tempData)
-          let chatLogsList = tempData.chatList
-          if (currentChat !== null && currentChat !== undefined) {
-            const flag = chatLogsList.find(item => {
-              return item.id == currentChat.id.toString()
-            })
-            if (!flag) {
-              chatLogsList.unshift(currentChat)
-            }
-          }
-          self.store.commit('setLocalHistory', tempData.history)
-          self.store.commit('updateChatLogsList', chatLogsList)
-          self.history=history
-        })
-      },
-      fetchUserList () {
-        const self = this
-        list().then(function (response) {
-          // debugger
-            let lists = response.data
-            self.lists = lists
-          })
-      },
-      initIM () {
-        if (!this.mine || !this.mine.id) {
-          return
-        } else {
-          this.store.states.mine = this.mine
-          this.store.commit('updateUserInfoCenter', this.mine)
-
-          this.getHistory(this.mine.id)
-        }
-        this.setOnlineStatus('online')
-        this.initWebSocket()
-      },
-      emitSend (message) {
-        this.$emit('on-send', message)
-      },
-      getMessage (message) {
-        if(message.chatlogType=="file"){
-          message.content=eval('(' + message.content + ')')
-        }
-        this.handleVoice()
-        this.store.commit('getNewMsg', message)
-        message.username = message.sendername
-        message.id = message.sender
-        message.count = this.store.states.newMsgLists[message.id].length
-        if (this.store.states.currentChat === null) {
-          this.store.commit('setCurrentChat', message)
-        }
-        // this.store.commit('updateUserInfoCenter', message)
-        this.store.commit('updateChatLogsList', message)
-        this.store.commit('updateLocalHistory', message)
-      },
-      // 控制消息提示音
-      handleVoice () {
-        if (!this.voice) return
-        const IE = device()
-        if (IE && IE < 9) return
-        this.$refs.voice.play()
-      },
-      handleViewGroupMembers (contact) {
-        this.$emit('on-view-members', contact)
-      },
-      handleAddNewGroup (group) {
-        this.$emit('on-add-group', group)
-      },
-      handleHistoryVisible (chat) {
-        this.$emit('on-view-history', chat)
-      },
-      handlePageChange (page) {
-        this.$emit('on-page-change', page)
-      },
-      handleChatChange (item) {
-      }
-    },
-    components: {
-      ChatBox,
-      TheHeader,
-      ChatList,
-      Contacts
-    },
-    watch: {
-      mine: {
-        handler () {
-          this.initIM()
-        },
-        deep: true
-      },
-      unReadList: {
-        handler (newV) {
-          if (typeOf(newV) === 'array') {
-            newV.forEach(item => {
-              this.getMessage(item)
-            })
-          } else {
-            this.getMessage(newV)
-          }
-        }
-      },
-      lists: {
-        handler (newV) {
-          this.store.commit('setUserInfoCenter', newV)
-        },
-        deep: true
-      },
-      groupsList: {
-        handler (newV) {
-          this.store.commit('setUserInfoCenter', newV)
-        },
-        deep: true
-      },
-      chat: {
-        handler: function () {
-          if (this.brief && this.chat && this.chat.id) {
-            this.chat.type = this.chat.type || 'friend'
-            this.store.commit('updateUserInfoCenter', this.chat)
-            this.store.commit('setCurrentChat', this.chat)
-            this.store.commit('setCurrentTab', 'chat')
-          }
-        },
-        deep: true
-      }
-    },
-    mounted () {
-      this.initIM()
-      const skin = storage.getItem('im-skin')
-      if (skin && skin !== this.skin) {
-        this.store.commit('setSkin', skin)
-      }
-    },
-    computed: {
-      skin () {
-        return this.store.states.skin
-      },
-      currentTab () {
-        return this.store.states.currentTab
-      }
-    }
-  }
-</script>
-<style lang="scss">
-  .wrapper {
-    /*width: 100%;*/
-    height: 100%;
-    margin: 12px;
-    background: #fff;
-    padding: 20px;
-  ::-webkit-scrollbar {
-    width: 5px;
-    height: 12px;
-    -webkit-border-radius: 40%;
-  }
-  ::-webkit-scrollbar-thumb {
-    background: #c3c3c3;
-    -webkit-border-radius: 12px;
-  }
-  .container {
-    width: 100%;
-    height: 100%;
-  }
-  .vue-im {
-    display: flex;
-    justify-content: space-between;
-    width: 100%;
-    min-width: 800px;
-    height: calc(100% - 61px);
-    min-height: 540px;
-    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
-  }
-  .im-chat-wrapper {
-    display: flex;
-    text-justify: space-between;
-    width: 100%;
-  }
-  .brief {
-    width: 60%;
-  }
-  .mini {
-    position: fixed;
-    bottom: 30px;
-    right: 40px;
-    cursor: pointer;
-    width: 36px;
-    height: 36px;
-    border-radius: 5px;
-    padding: 5px;
-    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
-  img {
-    width: 100%;
-    height: 100%;
-  }
-  }
-  }
-  @keyframes twinkle {
-    0% {opacity: 1}
-    25% {opacity: 0}
-    50% {opacity: 1}
-    75% {opacity: 0}
-    100% {opacity: 1}
-  }
-</style>
-<style scoped>
-  @import '/static/dist/vue-im.min.css';
-  @import 'https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css';
-</style>