Parcourir la source

优化角色详情页

zhangqiOMG il y a 3 ans
Parent
commit
ec1e1582c4
52 fichiers modifiés avec 608 ajouts et 980 suppressions
  1. 1 2
      src/HManagement/archives_ad/archives_adclass/index.vue
  2. 0 4
      src/HManagement/archives_ad/index.vue
  3. 25 24
      src/HManagement/archvies_mag/modules/add.vue
  4. 84 71
      src/HManagement/archvies_mag/modules/list.vue
  5. 2 4
      src/HManagement/notice/list/modules/edit_notice.vue
  6. 1 1
      src/SManagement/archives/components/FileList.vue
  7. 28 23
      src/SManagement/archives/index.vue
  8. 5 22
      src/SManagement/archives_ad/components/delete.vue
  9. 104 97
      src/SManagement/archives_ad/components/detail.vue
  10. 10 24
      src/SManagement/archives_ad/index.vue
  11. 27 33
      src/SManagement/archives_admag/index.vue
  12. 17 23
      src/SManagement/archives_sc/index.vue
  13. 0 3
      src/SManagement/archives_upload/components/FileList.vue
  14. 2 4
      src/SManagement/archives_upload/components/Set.vue
  15. 4 17
      src/SManagement/archives_upload/components/delete.vue
  16. 10 11
      src/SManagement/archives_upload/components/save.vue
  17. 17 16
      src/SManagement/archives_upload/index.vue
  18. 13 17
      src/SManagement/archivesmag/index.vue
  19. 4 7
      src/SManagement/notice/index.vue
  20. 19 38
      src/SManagement/notice/notice_detail/NoticeDetail.vue
  21. 10 26
      src/SManagement/orderclue/components/add.vue
  22. 12 26
      src/SManagement/orderclue/components/edit.vue
  23. 4 5
      src/SManagement/orderclue/components/export.vue
  24. 9 11
      src/SManagement/orderclue/components/follow.vue
  25. 5 7
      src/SManagement/orderclue/components/list.vue
  26. 10 12
      src/SManagement/orderclue/components/move.vue
  27. 0 5
      src/SManagement/orderclue/index.vue
  28. 4 6
      src/SManagement/orderclue_detail/components/followDetail.vue
  29. 3 5
      src/SManagement/orderclue_detail/index.vue
  30. 51 76
      src/SManagement/submitedit_details/components/SubmiteditAction.vue
  31. 3 4
      src/SManagement/submitedit_details/components/SubmiteditItemInfo.vue
  32. 8 12
      src/SManagement/submitedit_details/index.vue
  33. 4 5
      src/SManagement/submitedit_more/index.vue
  34. 0 2
      src/SManagement/submitedit_one/components/list.vue
  35. 4 9
      src/SManagement/submitedit_one/index.vue
  36. 35 65
      src/SManagement/user/role-edit/RoleEdit.vue
  37. 19 25
      src/SManagement/user/role-edit/components/RolePowerSelect.vue
  38. 2 26
      src/SManagement/user/role-manage/RoleManage.vue
  39. 6 17
      src/SManagement/user/role-manage/components/removeRole.vue
  40. 4 5
      src/SManagement/user/team-manage/TeamManage.vue
  41. 10 27
      src/SManagement/user/team-manage/components/AddUser.vue
  42. 6 13
      src/SManagement/user/team-manage/components/RemoveTeam.vue
  43. 8 17
      src/SManagement/user/user-info/UserInfo.vue
  44. 0 1
      src/SManagement/user/user-info/components/PassEdit.vue
  45. 9 29
      src/SManagement/user/user-info/components/PhoneEdit.vue
  46. 3 10
      src/SManagement/user/user-info/components/baseInfo.vue
  47. 1 2
      src/components/my-editor/Editor.vue
  48. 1 1
      src/router/index.js
  49. 0 2
      src/utils/removeFile.js
  50. 0 4
      src/utils/tool.js
  51. 0 77
      src/utils/weapp-jwt.js
  52. 4 7
      src/views/message/index.vue

+ 1 - 2
src/HManagement/archives_ad/archives_adclass/index.vue

@@ -2,8 +2,7 @@
     <div>
         <list ref="list">
             <Header slot="add" v-if="tool.checkAuth($route.name, 'insert')">
-                <el-button slot="save" icon="el-icon-plus" type="primary" size="small" @click="openDialog('新增分类')">新建分类
-                </el-button>
+                <el-button icon="el-icon-plus" type="primary" size="small" @click="openDialog('新增分类')">新建分类</el-button>
             </Header>
 
             <template v-slot:release="scope">

+ 0 - 4
src/HManagement/archives_ad/index.vue

@@ -42,9 +42,6 @@
 <script>
 import Header from '@/SManagement/archives_upload/components/Header';//业务端上传
 import save from '@/SManagement/archives_upload/components/save';
-import {weAtob,weBtoa} from "@/utils/weapp-jwt"
-
-
 
 import list from './modules/list.vue';
 import detail from '@/SManagement/archives_ad/components/detail'
@@ -82,7 +79,6 @@ export default {
         }
       }
       this.$api.requested(param).then(res => {
-        res.data.content = weAtob(res.data.content)
         res.data.attinfos = this.fileType.fileList(res.data.attinfos)
         this.currentFile = res.data
         this.$nextTick(() => {

+ 25 - 24
src/HManagement/archvies_mag/modules/add.vue

@@ -11,7 +11,8 @@
       </scopeOfauth>
       <div class="dialog-footer">
         <el-button size="small" @click="dialogFolderVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="createFolderComplete(folder)" class="normal-btn-width btn-warning">确 定</el-button>
+        <el-button size="small" type="warning" @click="createFolderComplete(folder)"
+          class="normal-btn-width btn-warning">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -20,55 +21,55 @@
 <script>
 import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
 export default {
-  components:{
+  components: {
     scopeOfauth,
   },
-  data () {
+  data() {
     return {
-      dialogFolderVisible:false,
-      defaultData:{},
-      folder:{
-        document:''
+      dialogFolderVisible: false,
+      defaultData: {},
+      folder: {
+        document: ''
       },
-      attachmentid:null,
-      params:{
+      attachmentid: null,
+      params: {
         "classname": "system.attachment.MediaCenter",
         "method": "createFolder",
         "content": {
           "foldername": "文件夹名称",
-          "parentid":  ''
+          "parentid": ''
         }
       }
     }
   },
-  methods:{
-    createFolder () {},
-     // 获取保存授权范围数据
-    onChecked (param) {
+  methods: {
+    createFolder() { },
+    // 获取保存授权范围数据
+    onChecked(param) {
       this.authData = param
     },
-    async createFolderComplete (folder) {
-      let id = this.$route.query.id?this.$route.query.id:JSON.parse(sessionStorage.getItem('folderid')).salematerialfolderid
+    async createFolderComplete(folder) {
+      let id = this.$route.query.id ? this.$route.query.id : JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid
       this.params.content.parentid = id
       this.params.content.foldername = folder.document
       const res = await this.$api.requested(this.params)
       this.$emit('onSuccess')
-      this.tool.showMessage(res,()=>{this.dialogFolderVisible = false})
-      res.code === 1?this.insertCoursewareauth(res.data.attachmentid):''
+      this.tool.showMessage(res, () => { this.dialogFolderVisible = false })
+      res.code === 1 ? this.insertCoursewareauth(res.data.attachmentid) : ''
     },
     // 新增授权范围
-    async insertCoursewareauth (attachmentid) {
+    async insertCoursewareauth(attachmentid) {
       this.authData.attachmentid = attachmentid
       const res = await this.$api.requested({
         "classname": "webmanage.saletool.salematerial.salematerialAuth",
         "method": "insertOrUpdate",
         "content": this.authData
       })
-      res.code === 0?this.$notify({
-        title:'失败',
-        message:res.data,
-        type:'error'
-      }):''
+      res.code === 0 ? this.$notify({
+        title: '失败',
+        message: res.data,
+        type: 'error'
+      }) : ''
     },
   }
 }

+ 84 - 71
src/HManagement/archvies_mag/modules/list.vue

@@ -1,51 +1,55 @@
 <template>
-  <div> 
-    <div  class="flex-align-center flex-between border-bottom container normal-panel">
+  <div>
+    <div class="flex-align-center flex-between border-bottom container normal-panel">
       <div class="flex-align-center">
         <slot name="upload"></slot>
         <slot name="add"></slot>
         <slot name="btngroup"></slot>
       </div>
       <div class="flex-align-center">
-        <el-input size="small" style="width:160px;margin-right:16px" prefix-icon="el-icon-search" v-model="params.content.where.condition" @keyup.enter.native="queryAttachment(params.content.pageNumber = 1)" @clear="queryAttachment(params.content.pageNumber = 1)" placeholder="搜索全部" clearable></el-input>
+        <el-input size="small" style="width:160px;margin-right:16px" prefix-icon="el-icon-search"
+          v-model="params.content.where.condition" @keyup.enter.native="queryAttachment(params.content.pageNumber = 1)"
+          @clear="queryAttachment(params.content.pageNumber = 1)" placeholder="搜索全部" clearable></el-input>
         <sort :sort="sort" @onSort="onSort"></sort>
-        <i class="el-icon-refresh" style="margin-left:16px" @click="queryAttachment(params.content.where.condition = '')"></i>
+        <i class="el-icon-refresh" style="margin-left:16px"
+          @click="queryAttachment(params.content.where.condition = '')"></i>
       </div>
     </div>
     <div ref="ele" id="scroll" style="height:calc(100vh - 255px);overflow-y:scroll" class="container normal-panel">
       <el-row :gutter="10" class="folder-list">
         <el-col :span="2" v-for="folder in list" :key="folder.id">
-          <div  class="folder-item" :class="folder.ischeck?'checked':''">
+          <div class="folder-item" :class="folder.ischeck ? 'checked' : ''">
             <el-checkbox class="folder-checkbox" v-model="folder.ischeck" @change="onChange(folder)"></el-checkbox>
             <div @click.stop="folderDetails(folder)" class="img-panel">
-              <img v-if="folder.postfix === 'DOC' || folder.postfix === 'DOCX'"  src="../../../assets/file_icons/word.png" alt="">
-              <img v-else-if="folder.postfix === 'PDF'"  src="../../../assets/file_icons/PDF.png" alt="">
-              <img v-else-if="folder.postfix === 'MP4' || folder.postfix === 'AVI'"  src="../../../assets/file_icons/video.png" alt="">
-              <img v-else-if="folder.postfix === 'XLS' || folder.postfix === 'XLSX'"  src="../../../assets/file_icons/excel.png" alt="">
-              <img v-else-if="folder.postfix === 'PNG' || folder.postfix === 'JPG'|| folder.postfix === 'JPEG'"  src="../../../assets/file_icons/image.png" alt="">
-              <img v-else-if="folder.postfix === 'PPT' || folder.postfix === 'PPTX'"  src="../../../assets/file_icons/PPT.png" alt="">
-              <img v-else-if="folder.postfix === 'FOLDER'"  src="../../../assets/file_icons/folder.png" alt="">
-              <img v-else  src="../../../assets/file_icons/unknow.png" alt="">
+              <img v-if="folder.postfix === 'DOC' || folder.postfix === 'DOCX'"
+                src="../../../assets/file_icons/word.png" alt="">
+              <img v-else-if="folder.postfix === 'PDF'" src="../../../assets/file_icons/PDF.png" alt="">
+              <img v-else-if="folder.postfix === 'MP4' || folder.postfix === 'AVI'"
+                src="../../../assets/file_icons/video.png" alt="">
+              <img v-else-if="folder.postfix === 'XLS' || folder.postfix === 'XLSX'"
+                src="../../../assets/file_icons/excel.png" alt="">
+              <img v-else-if="folder.postfix === 'PNG' || folder.postfix === 'JPG' || folder.postfix === 'JPEG'"
+                src="../../../assets/file_icons/image.png" alt="">
+              <img v-else-if="folder.postfix === 'PPT' || folder.postfix === 'PPTX'"
+                src="../../../assets/file_icons/PPT.png" alt="">
+              <img v-else-if="folder.postfix === 'FOLDER'" src="../../../assets/file_icons/folder.png" alt="">
+              <img v-else src="../../../assets/file_icons/unknow.png" alt="">
             </div>
-            <input v-if="folder.newfolder" type="text" v-model="folder.document" autofocus size="mini" @blur="changeFolderName(folder)">
+            <input v-if="folder.newfolder" type="text" v-model="folder.document" autofocus size="mini"
+              @blur="changeFolderName(folder)">
             <!-- <p v-else>{{folder.document}}</p> -->
-            <p v-else>{{folder.document}}</p>
+            <p v-else>{{ folder.document }}</p>
           </div>
         </el-col>
       </el-row>
-      <div v-if="list.length === 0" class="flex-align-center" style="height:calc(100vh - 200px);justify-content:space-around">
+      <div v-if="list.length === 0" class="flex-align-center"
+        style="height:calc(100vh - 200px);justify-content:space-around">
         <el-empty description="暂无文件,请点击左上角的“上传”按钮添加"></el-empty>
       </div>
     </div>
     <div style="margin:16px 0;text-align:right">
-      <el-pagination
-        background
-        small
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="params.content.pageSize"
-        layout="total, prev, pager, next, jumper"
+      <el-pagination background small @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="currentPage" :page-size="params.content.pageSize" layout="total, prev, pager, next, jumper"
         :total="total">
       </el-pagination>
     </div>
@@ -54,39 +58,39 @@
 
 <script>
 export default {
-  data () {
+  data() {
     return {
-      params:{
+      params: {
         "classname": "webmanage.saletool.salematerial.salematerial",
         "method": "selectList",
         "content": {
-          "parentid":0,
-          "pageNumber":1,
-          "pageSize":20,
-            "where":{
-                "condition":""
-            }
+          "parentid": 0,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
         }
       },
-      list:[],
-      sort:[],
-      total:0,
-      currentPage:0,
-      isLoad:true,
-      msg:"正在加载"
+      list: [],
+      sort: [],
+      total: 0,
+      currentPage: 0,
+      isLoad: true,
+      msg: "正在加载"
     }
   },
-  methods:{
+  methods: {
     // 排序
-    onSort (sort) {
+    onSort(sort) {
       this.params.content.sort = [sort]
       this.queryAttachment(this.params.content.parentid)
     },
-    async queryAttachment () {
-      this.params.content.parentid = this.$route.query.id?this.$route.query.id:JSON.parse(sessionStorage.getItem('folderid')).salematerialfolderid
+    async queryAttachment() {
+      this.params.content.parentid = this.$route.query.id ? this.$route.query.id : JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid
       const res = await this.$api.requested(this.params)
-      res.data.map(e=>{
-        e.postfix  = e.postfix.toUpperCase()
+      res.data.map(e => {
+        e.postfix = e.postfix.toUpperCase()
         e.ischeck = false
       })
       this.list = res.data
@@ -104,46 +108,46 @@ export default {
       this.params.content.pageNumber = val
       this.queryAttachment(this.params.content.parentid)
     },
-    changeFolderName (folder) {
-      this.$emit('onNameChange',folder)
+    changeFolderName(folder) {
+      this.$emit('onNameChange', folder)
     },
-    onChange (folder) {
+    onChange(folder) {
       let checkArray = []
-      this.list.forEach((e,index)=>{
+      this.list.forEach((e, index) => {
         if (e.ischeck === true) {
           checkArray.push(e)
         }
       })
-      this.$emit('folderChecked',checkArray)
+      this.$emit('folderChecked', checkArray)
     },
-    folderDetails (folder) {
+    folderDetails(folder) {
       if (folder.postfix === 'FOLDER') {
-        this.$router.push({path:'/archvies_mag',query:{id:folder.attachmentid}})
-        this.$emit('toFolderDetail',folder.attachmentid)
+        this.$router.push({ path: '/archvies_mag', query: { id: folder.attachmentid } })
+        this.$emit('toFolderDetail', folder.attachmentid)
         this.queryAttachment(folder.attachmentid)
       }
     },
-    restChecked () {
-      this.list.forEach((e,index)=>{
+    restChecked() {
+      this.list.forEach((e, index) => {
         e.ischeck = false
       })
     },
   },
 
-  mounted () {
+  mounted() {
     // 根据容器高度计算需要的数据条数
     var heightCss = window.getComputedStyle(this.$refs.ele).height
-    this.params.content.pageSize = Math.ceil((heightCss.match(/\d+/g) / 114)) *12
+    this.params.content.pageSize = Math.ceil((heightCss.match(/\d+/g) / 114)) * 12
     this.queryAttachment()
   },
   // 离开这个页面销毁滚动条事件,不然会给每一个页面都触发
   beforeDestroy() {
   },
-  watch:{
-    $route () {
+  watch: {
+    $route() {
       this.queryAttachment()
       // 路由发生变化的时候初始化选择数组
-      this.$emit('folderChecked',[])
+      this.$emit('folderChecked', [])
     }
   }
 }
@@ -152,16 +156,16 @@ export default {
 <style>
 .folder-item {
   position: relative;
-  padding:10px 5px;
+  padding: 10px 5px;
   text-align: center;
-  color:#333;
+  color: #333;
   margin-bottom: 15px;
   cursor: pointer;
   font-size: 14px;
   /* min-height: 110px; */
 }
 
-.folder-item p{
+.folder-item p {
   line-height: 25px;
   width: calc(100% - 20px);
   padding: 0 10px;
@@ -174,47 +178,56 @@ export default {
 
   -webkit-box-orient: vertical;
 
-  -webkit-line-clamp: 1; /* 这里是超出几行省略 */
+  -webkit-line-clamp: 1;
+  /* 这里是超出几行省略 */
 
   overflow: hidden;
 }
-.folder-item input{
+
+.folder-item input {
   width: calc(100% - 8px);
   padding: 2px;
-  margin-top:10px;
+  margin-top: 10px;
 }
+
 .img-panel {
   width: 64px;
   /* height: 64px; */
-  margin:0 auto;
+  margin: 0 auto;
   text-align: center;
 }
-.img-panel > img{
+
+.img-panel>img {
   width: 80%;
 }
-.folder-checkbox{
+
+.folder-checkbox {
   display: none;
   position: absolute;
-  top:5px;
+  top: 5px;
   left: 5px;
 }
-.checked{
+
+.checked {
   background: #f1f2f3;
   border-radius: 3px;
 }
+
 .checked .folder-checkbox {
   display: block;
 }
+
 .folder-item:hover .folder-checkbox {
   display: block;
 }
+
 .folder-item:hover {
   background: #f1f2f3;
   border-radius: 3px;
 }
 </style>
 <style scoped>
-.border-bottom{
+.border-bottom {
   border-bottom: 1px solid #f1f2f3;
 }
 </style>

+ 2 - 4
src/HManagement/notice/list/modules/edit_notice.vue

@@ -101,9 +101,6 @@ import attachmentList from '@/components/attachment_list/index.vue'
 import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
 import myEditor from '@/components/my-editor/Editor.vue'
 import store from '@/store'
-import {
-  weBtoa
-} from "@/utils/weapp-jwt";
 export default {
   components: {
     upload,
@@ -159,7 +156,7 @@ export default {
     onSubmit() {
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false;
-        this.form.content = weBtoa(this.$refs.editor.html);
+        this.form.content = this.$refs.editor.html
         const res = await this.$api.requested({
           "classname": "webmanage.saletool.notice.notice",
           "method": "insertormodify_notice",
@@ -209,6 +206,7 @@ export default {
         }
       })
       this.options = res.data
+      this.form.sat_notice_classid = res.data[0].sat_notice_classid
     },
     // 获取封面信息
     async queryFileLink() {

+ 1 - 1
src/SManagement/archives/components/FileList.vue

@@ -123,7 +123,7 @@ export default {
         } else {
           this.$notify({
             title: "提示",
-            message: "修改失败",
+            message: "操作失败",
             type: "error"
           });
         }

+ 28 - 23
src/SManagement/archives/index.vue

@@ -8,11 +8,11 @@
       <!-- <select-panl :titleLists="titleLists" @CurrentSelectType="CurrentSelectType" ref="selectPanl" v-if="tool.checkAuth($route.name,'read')"></select-panl> -->
       <search @searchActive="searchActive" @clearData="clearData"></search>
       <!--切换最热最新-->
-      <hot-new-control @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name,'read')"></hot-new-control>
+      <hot-new-control @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name, 'read')"></hot-new-control>
     </div>
     <!--文件展示-->
     <file-list :fileData="fileData" @upFileData="upFileData" @statusChange="statusChange" :isCollect="true"
-      v-if="tool.checkAuth($route.name,'read')">
+      v-if="tool.checkAuth($route.name, 'read')">
     </file-list>
 
   </div>
@@ -24,18 +24,20 @@ import SelectPanl from '@/SManagement/submitedit_one/components/SelectPanl'
 import HotNewControl from '@/components/hot-new-control/HotNewControl'
 import search from '@/components/search/index'
 import BreadCrumbs from '@/components/bread-crumbs/BreadCrumbs'
+import { log } from '@antv/g2plot/lib/utils'
 export default {
   name: 'index',
-  data () {
+  data() {
     return {
       params: {
         "accesstoken": "14fed62faa62714a6a1e2ebe2d3997e3",
         "classname": "saletool.salematerial.salematerial",
         "method": "selectList",
         "content": {
+          "nocache": true,
           "pageNumber": 1,
           "pageSize": 9999999999999,
-          "parentid": 1,
+          "parentid": JSON.parse(sessionStorage.getItem("folderid")).salematerialfolderid,
           "where": {
             "condition": "",
           }
@@ -86,32 +88,30 @@ export default {
   watch: {
 
   },
-  created () {
+  created() {
     this.getFileList()
     this.tempFileData[0].id = 1
   },
   methods: {
-    //获取文件数据
-    getFileList () {
-      this.$api.requested(this.params).then(res => {
-        console.log(res);
-        
-        this.total = res.total;
-        this.params.content.sort = res.sort
-        this.allFileData = this.fileType.fileList(res.data)
-        this.fileData = this.filterFileData(this.allFileData, this.isType)
-      })
+    //获取文件数据 //salematerialfolderid
+    async getFileList() {
+      console.log(this.params)
+      let res = await this.$api.requested(this.params)
+      this.total = res.total
+      this.params.content.sort = res.sort
+      this.allFileData = this.fileType.fileList(res.data)
+      this.fileData = this.filterFileData(this.allFileData, this.isType)
     },
-    searchActive (txt) {
+    searchActive(txt) {
       this.params.content.where.condition = txt
       this.getFileList()
     },
-    clearData () {
+    clearData() {
       this.params.content.where.condition = ''
       this.getFileList()
     },
     //监听文件夹单击事件
-    upFileData (parentid, name, id) {
+    upFileData(parentid, name, id) {
       this.params.content.parentid = id
       this.currentFileIndex = id
       this.tempFileData[this.tempFileData.length - 1].id = parentid
@@ -123,12 +123,12 @@ export default {
 
     },
     //监听类型选择组件发出的更改事件
-    CurrentSelectType (type) {
+    CurrentSelectType(type) {
       this.isType = type
       this.fileData = this.filterFileData(this.allFileData, type)
     },
     //面包屑发出的事件
-    async BreadCrumbsChange (index) {
+    BreadCrumbsChange(index) {
       if (this.tempFileData.length <= 1) return
       this.isType = 'all'
       this.params.content.parentid = index
@@ -138,12 +138,12 @@ export default {
 
     },
     //修改收藏状态
-    statusChange (id, item) {
+    statusChange(id, item) {
       this.params.content.parentid = item.parentid
       this.getFileList()
     },
     //监听最热组件变化
-    sortTypeChange (name) {
+    sortTypeChange(name) {
       for (let i = 0; i < this.params.content.sort.length; i++) {
         this.params.content.sort[i].sorted = this.params.content.sort[i].sortname == name ? 1 : 0
       }
@@ -151,7 +151,7 @@ export default {
       this.currentFileIndex = 0
     },
     //数据过滤
-    filterFileData (file, type) {
+    filterFileData(file, type) {
       if (type == 'all') return file
       return file.filter(item => {
         return item.fileType == type
@@ -165,6 +165,7 @@ export default {
 * {
   box-sizing: border-box;
 }
+
 .normal-card {
   -webkit-user-select: none;
   -moz-user-select: none;
@@ -173,17 +174,21 @@ export default {
   min-height: 100%;
   position: relative;
 }
+
 .normal-card .el-breadcrumb {
   margin-bottom: 34px;
 }
+
 .normal-card .header-panl {
   display: flex;
   justify-content: space-between;
   margin-bottom: 30px;
 }
+
 .normal-card .header-panl .el-dropdown-link {
   display: flex;
 }
+
 .normal-card .header-panl .el-dropdown .el-dropdown-link .select {
   margin-left: 8px;
 }

+ 5 - 22
src/SManagement/archives_ad/components/delete.vue

@@ -26,9 +26,7 @@ export default {
   watch:{
   },
   methods: {
-    remove () {
-      console.log(this.data.sat_sharematerialid);
-      
+    async remove () {
       let param = {
         "classname": "webmanage.saletool.sharematerial.sharematerial",
         "method": "delete",
@@ -36,25 +34,10 @@ export default {
           "sat_sharematerialid": [this.data.sat_sharematerialid]
         }
       }
-      this.$api.requested(param).then(res => {
-        console.log(res);
-        
-        if (res.code == 1) {
-          this.$notify({
-            title: "提示",
-            message: '删除成功',
-            type: 'success'
-          })
-          this.$emit('removeSuccess')
-          this.dialogVisible = false
-          
-        } else {
-          this.$notify({
-            title: "提示",
-            message: '删除失败',
-            type: 'error'
-          })
-        }
+      let res = this.$api.requested(param)
+      this.tool.showMessage(res,() => {
+        this.$emit('removeSuccess')
+        this.dialogVisible = false
       })
     },
     handleClose() {

+ 104 - 97
src/SManagement/archives_ad/components/detail.vue

@@ -1,32 +1,23 @@
 <template>
   <el-drawer title="详情" :visible.sync="isFileInfoPanlShow" :with-header="true" v-if="currentSelectFile.length != 0">
     <div class="header">
-      <p class="title">{{currentSelectFile.title}}</p>
+      <p class="title">{{ currentSelectFile.title }}</p>
       <div class="detail-info">
-        <span><span>浏览数:</span>{{currentSelectFile.readcount}}</span>
-        <span><span>分享数:</span>{{currentSelectFile.sharecount}}</span>
-        <span><span>拉新数:</span>{{currentSelectFile.newcount}}</span>
-        <span><span>创建人:</span>{{currentSelectFile.changeby}}</span>
-        <span><span>上传时间:</span>{{currentSelectFile.createdate}}</span>
+        <span><span>浏览数:</span>{{ currentSelectFile.readcount }}</span>
+        <span><span>分享数:</span>{{ currentSelectFile.sharecount }}</span>
+        <span><span>拉新数:</span>{{ currentSelectFile.newcount }}</span>
+        <span><span>创建人:</span>{{ currentSelectFile.changeby }}</span>
+        <span><span>上传时间:</span>{{ currentSelectFile.createdate }}</span>
       </div>
     </div>
-    <div class="content"  v-if="this.currentSelectFile.content && decodeURIComponent(this.currentSelectFile.content) != '<p><br></p>'">
+    <div class="content" v-if="this.currentSelectFile.content && this.currentSelectFile.content != '<p><br></p>'">
       <div ref="fwb" class="fwb">
       </div>
     </div>
-    <div class="file2">
-      <!-- <p class="title" v-if="currentSelectFile.attinfos && currentSelectFile.attinfos.length > 0">附件</p> -->
-      <!-- <div class="image" v-if="currentSelectFile.type == 1">
-        <img :src="item.url" alt="" v-for="(item,index) in currentSelectFile.attinfos" :key="index">
-      </div>
-      <div class="video" v-if="currentSelectFile.type == 2">
-        <video :src="item.url" v-for="(item,index) in currentSelectFile.attinfos" controls :key="index"></video>
-      </div> -->
-      <div class="file-item" v-for="(item,index) in currentSelectFile.attinfos" :key="index">
-        <file-item :itemStyle="itemStyle" 
-                   :fileData="[item]"
-                   :isDownLoad="true"
-                   @updateDownLoadRecord="updateDownLoadRecord">
+    <div class="file2" v-if="currentSelectFile.type != 3">
+      <div class="file-item" v-for="(item, index) in currentSelectFile.attinfos" :key="index">
+        <file-item :itemStyle="itemStyle" :fileData="[item]" :isDownLoad="true"
+          @updateDownLoadRecord="updateDownLoadRecord">
         </file-item>
       </div>
     </div>
@@ -44,13 +35,13 @@ export default {
       isFileInfoPanlShow: false,
       //itemfile样式
       itemStyle: {
-          itemWidth:1020,
-          img: {
-            width:64,
-            height:64
-          },
-          title:16,
-          descript: 12
+        itemWidth: 1020,
+        img: {
+          width: 64,
+          height: 64
+        },
+        title: 16,
+        descript: 12
       },
     };
   },
@@ -72,91 +63,107 @@ export default {
     }
   },
   updated() {
-     if(this.$refs.fwb) {
-      this.$refs.fwb.innerHTML = this.currentSelectFile.content
-     } 
+    if (this.$refs.fwb) this.$refs.fwb.innerHTML = this.currentSelectFile.content
   },
   methods: {
     //更新下载记录
-    updateDownLoadRecord(data) {
-      this.$api.requested({
+    async updateDownLoadRecord(data) {
+      let res = await this.$api.requested({
         "classname": "saletool.sharematerial.sharematerial",
         "method": "updateDownloadLog",
         "content": {
-                "sat_sharematerialid":this.currentSelectFile.sat_sharematerialid
-        }
-      }).then( res => {
-        if(res.code != 1) {
-          this.$notify({
-            title:'提示',
-            message:'下载更新记录失败',
-            type:'warning'
-          })
+          "sat_sharematerialid": this.currentSelectFile.sat_sharematerialid
         }
       })
+      if (res.code != 1) {
+        this.$notify({
+          title: '提示',
+          message: '下载更新记录失败',
+          type: 'warning'
+        })
+      }
     }
   }
 };
 </script>
 
 <style scoped>
-*{
+* {
   box-sizing: border-box;
 }
+
+/deep/video,
+/deep/img {
+  width: 100% !important;
+}
+
 /deep/.el-drawer {
-    width: 546px !important;
-  }
-  
-  /deep/.el-drawer__header {
-    font-size: 16px;
-    font-family: PingFang SC-Bold, PingFang SC;
-    font-weight: bold;
-    color: #333333;
-    margin-bottom: 0;
-  }
-  /deep/.el-drawer__body {
-    
-  }
-  .el-drawer__body .title {
-    font-size: 16px;
-    font-family: PingFang SC-Bold, PingFang SC;
-    font-weight: bold;
-    color: #333333;
-  }
-  .header {
-    padding: 20px 20px;
-    border-bottom: 10px solid #FAFAFA;
-  }
-  .title {
-    margin-bottom: 15px;
-  }
-  .header .detail-info {
-    display: flex;
-    flex-wrap: wrap;
-  }
-  .header .detail-info span {
-    margin:0 50px 10px 0;
-    font-size: 14px;
-    font-weight: 400;
-    color: #333333;
-  }
-  .header .detail-info span span {
-    margin-right: 8px;
-  }
-  .content {
-    padding: 20px;
-    width: 100%;
-  }
-  .fwb {
-    width: 100%;
-  }
-  /deep/.fwb p img {
-    width: 100%;
-  }
-  .file2 {
-    padding: 20px;
-  }
-  .image,.image img,.video,.video video {
-    width: 100%;
-  }
+  width: 546px !important;
+}
+
+/deep/.el-drawer__header {
+  font-size: 16px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #333333;
+  margin-bottom: 0;
+}
+
+/deep/.el-drawer__body {}
+
+.el-drawer__body .title {
+  font-size: 16px;
+  font-family: PingFang SC-Bold, PingFang SC;
+  font-weight: bold;
+  color: #333333;
+}
+
+.header {
+  padding: 20px 20px;
+  border-bottom: 10px solid #FAFAFA;
+}
+
+.title {
+  margin-bottom: 15px;
+}
+
+.header .detail-info {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.header .detail-info span {
+  margin: 0 50px 10px 0;
+  font-size: 14px;
+  font-weight: 400;
+  color: #333333;
+}
+
+.header .detail-info span span {
+  margin-right: 8px;
+}
+
+.content {
+  padding: 20px;
+  width: 100%;
+}
+
+.fwb {
+  width: 100%;
+}
+
+/deep/.fwb p img {
+  width: 100%;
+}
+
+.file2 {
+  padding: 20px;
+}
+
+.image,
+.image img,
+.video,
+.video video {
+  width: 100%;
+}
 </style>

+ 10 - 24
src/SManagement/archives_ad/index.vue

@@ -13,7 +13,7 @@
         <hot-new-control @sortTypeChange="sortTypeChange" v-if="tool.checkAuth($route.name, 'read')"></hot-new-control>
       </div>
       <!--素材列表-->
-      <list :fileData="fileData" @listItemClick="listItemClick" @itemEdit="itemEdit" :isHandle="false"
+      <list :fileData="fileData" @listItemClick="listItemClick" :isHandle="false"
         v-if="tool.checkAuth($route.name, 'read')">
       </list>
       <pagination :total="total" :pageSize="params.content.pageSize" :currentPage="params.content.pageNumber"
@@ -44,7 +44,7 @@ export default {
         "content": {
           "pageNumber": 1,
           "pageSize": 12,
-          "nocache":true,
+          "nocache": true,
           "where": {
             "condition": "",
             "sat_sharematerial_classid": null
@@ -87,8 +87,8 @@ export default {
   },
   methods: {
     //获取文件数据
-    getFileList() {
-      this.$api.requested(this.params).then(res => {
+    async getFileList() {
+      let res = await this.$api.requested(this.params)
         this.total = res.total
         for (let i = 0; i < res.data.length; i++) {
           let list = this.fileType.fileList(res.data[i].attinfos)
@@ -103,14 +103,10 @@ export default {
         res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
         if (deleteList.length != 0) this.handleDelete(deleteList);
         this.fileData = res.data
-        console.log(res.data);
-        
         this.params.content.sort = res.sort
-      })
     },
     /* 处理批量删除 */
     handleDelete(list) {
-      console.log("处理删除")
       this.$api.requested({
         "classname": "webmanage.saletool.sharematerial.sharematerial",
         "method": "delete",
@@ -118,7 +114,6 @@ export default {
           "sat_sharematerialid": list
         }
       }).then(res => {
-        console.log("处理删除", res);
         if (res.msg == '成功') this.getList();
       })
     },
@@ -150,7 +145,7 @@ export default {
       this.getFileList()
     },
     //列表单击事件
-    listItemClick(data) {
+    async listItemClick(data) {
       let param = {
         "classname": "saletool.sharematerial.sharematerial",
         "method": "selectDetail",
@@ -158,20 +153,11 @@ export default {
           "sat_sharematerialid": data.sat_sharematerialid
         }
       }
-      this.$api.requested(param).then(res => {
-        res.data.content = atob(res.data.content)
-        res.data.attinfos = this.fileType.fileList(res.data.attinfos)
-        this.currentFile = res.data
-        this.$nextTick(() => {
-          this.$refs.detail.isFileInfoPanlShow = true
-        })
-      })
-    },
-    itemEdit(data) {
-      return console.log("应该没有用到")
-      this.$router.push({
-        path: '/upload_archives',
-        params: JSON.stringify(data)
+      let res = await this.$api.requested(param)
+      res.data.attinfos = this.fileType.fileList(res.data.attinfos)
+      this.currentFile = res.data
+      this.$nextTick(() => {
+        this.$refs.detail.isFileInfoPanlShow = true
       })
     },
     clearData() {

+ 27 - 33
src/SManagement/archives_admag/index.vue

@@ -104,19 +104,18 @@ export default {
   },
   methods: {
     //获取文件数据
-    getFileList() {
-      this.$api.requested(this.params).then(res => {
-        let initID = '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid;
-        let deleteList = [];
-        res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
-        if (deleteList.length != 0) return this.handleDelete(deleteList);
-        this.total = res.total
-        this.fileData = res.data
-        this.fileData.forEach((item) => {
-          item.attinfos = matchingFileType.fileList(item.attinfos)
-        })
-        this.params.content.sort = res.sort
+    async getFileList() {
+      let res = await this.$api.requested(this.params)
+      let initID = '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid;
+      let deleteList = [];
+      res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
+      if (deleteList.length != 0) return this.handleDelete(deleteList);
+      this.total = res.total
+      this.fileData = res.data
+      this.fileData.forEach((item) => {
+        item.attinfos = matchingFileType.fileList(item.attinfos)
       })
+      this.params.content.sort = res.sort
     },
     /* 处理批量删除 */
     handleDelete(list) {
@@ -127,25 +126,22 @@ export default {
                 "sat_sharematerialid": list
             }
         }).then(res => {
-            console.log("处理删除", res);
             if(res.msg=='成功') this.getFileList();
         })
     },
     //获取分类列表
-    getSelectList() {
-      this.$api.requested(this.select).then(res => {
-        this.selectList = res.data
-      })
+    async getSelectList() {
+      let res = await this.$api.requested(this.select)
+      this.selectList = res.data
     },
     //查询
-    searchActive(result) {
+    async searchActive(result) {
       if (!result) return
       this.params.content.where.condition = result
-      this.$api.requested(this.params).then(res => {
-        this.fileData = res.data
-        this.fileData.forEach((item) => {
-          item.attinfos = matchingFileType.fileList(item.attinfos)
-        })
+      let res = await this.$api.requested(this.params)
+      this.fileData = res.data
+      this.fileData.forEach((item) => {
+        item.attinfos = matchingFileType.fileList(item.attinfos)
       })
     },
     sortTypeChange(name) {
@@ -164,7 +160,7 @@ export default {
       this.getFileList()
     },
     //列表单击事件
-    listItemClick(data) {
+    async listItemClick(data) {
       let param = {
         "classname": "saletool.sharematerial.sharematerial",
         "method": "selectDetail",
@@ -172,13 +168,11 @@ export default {
           "sat_sharematerialid": data.sat_sharematerialid
         }
       }
-      this.$api.requested(param).then(res => {
-        res.data.content = atob(res.data.content)
-        res.data.attinfos = this.fileType.fileList(res.data.attinfos)
-        this.currentFile = res.data
-        this.$nextTick(() => {
-          this.$refs.detail.isFileInfoPanlShow = true
-        })
+      let res = await this.$api.requested(param)
+      res.data.attinfos = this.fileType.fileList(res.data.attinfos)
+      this.currentFile = res.data
+      this.$nextTick(() => {
+        this.$refs.detail.isFileInfoPanlShow = true
       })
     },
     itemEdit(data) {
@@ -205,7 +199,7 @@ export default {
 }
 
 .normal-card {
-  min-height: 100%;
+  min-height: calc(100% - 83px);
   box-sizing: border-box;
   position: relative;
 }
@@ -213,7 +207,7 @@ export default {
 .normal-card .header-panl {
   display: flex;
   justify-content: space-between;
-  margin: 20px 0 30px 0;
+  margin-bottom: 30px;
 }
 
 .normal-card .header-panl .left {

+ 17 - 23
src/SManagement/archives_sc/index.vue

@@ -104,29 +104,24 @@ export default {
   },
   methods: {
     //获取列表数据
-    getFileData () {
-      this.$api.requested(this.param).then(res => {
-        this.total = res.total
-        this.list = res.data
-        console.log(this.list);
-
-        this.param.content.sort = res.sort
-      })
+    async getFileData () {
+      let res = await this.$api.requested(this.param)
+      this.total = res.total
+      this.list = res.data
+      this.param.content.sort = res.sort
     },
     //获取分类列表
-    getSelectList () {
-      this.$api.requested(this.select).then(res => {
-        this.selectList = res.data
-      })
+    async getSelectList () {
+      let res = await this.$api.requested(this.select)
+      this.selectList = res.data
     },
     //查询
-    searchActive (result) {
+    async searchActive (result) {
       this.param.content.where.condition = result
       this.param.content.where.pageNumber = 1
-      this.$api.requested(this.param).then(res => {
-        this.list = res.data
-        this.total = res.total
-      })
+      let res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
     },
     //清除查询
     clearData () {
@@ -145,13 +140,12 @@ export default {
       this.getFileData()
     },
     //单击进入详情
-    itemClick (item) {
+    async itemClick (item) {
       this.detail.content.sat_coursewareid = item.sat_coursewareid
-      this.$api.requested(this.detail).then(res => {
-        this.currentSelectFile = res.data
-        this.$nextTick(() => {
-          this.$refs.detail.isFileInfoPanlShow = true
-        })
+      let res = await this.$api.requested(this.detail)
+      this.currentSelectFile = res.data
+      this.$nextTick(() => {
+        this.$refs.detail.isFileInfoPanlShow = true
       })
     },
     changeSelect (id) {

+ 0 - 3
src/SManagement/archives_upload/components/FileList.vue

@@ -11,8 +11,6 @@
         <template slot-scope="scope">
           <div class="editor-handle">
             <span>{{ scope.row.document.substr(0, scope.row.document.indexOf('.')) }}</span>
-            <!-- <img src="@/assets/edit.png" alt="" style="vertical-align: middle;margin-left:10px;cursor:pointer" @click="isShow = true"> -->
-            <!-- <el-input @blur="inputFocus()" v-if="isShow" v-model="text"></el-input> -->
           </div>
         </template>
       </el-table-column>
@@ -62,7 +60,6 @@ export default {
     },
     randerData(list) {
       this.attinfos = list;
-      console.log(list)
     },
   },
 };

+ 2 - 4
src/SManagement/archives_upload/components/Set.vue

@@ -21,10 +21,10 @@ export default {
   data() {
     return {
       select: {
-        "accesstoken": "0b62a25619912a732160863854a9f19d",
         "classname": "saletool.sharematerial.sharematerial",
         "method": "select",
         "content": {
+          "nocache": true,
           "parentid": 0
         }
       },
@@ -51,7 +51,7 @@ export default {
         ],
       },
       seleteList: [],
-      aaa:true
+      aaa: true
     };
   },
   components: {
@@ -77,8 +77,6 @@ export default {
     getSeleteData() {
       this.$api.requested(this.select).then(res => {
         this.seleteList = res.data
-        console.log(this.seleteList);
-        
       })
     }
   },

+ 4 - 17
src/SManagement/archives_upload/components/delete.vue

@@ -17,23 +17,10 @@ export default {
   props: { obj: Object, deleteFile: Function },
   methods: {
     //删除文件
-    handle() {
-      removeFile.removeFileList([this.obj]).then(res => {
-        if (res == 1) {
-          this.$notify({
-            title: '提示',
-            message: '删除成功',
-            type: 'success'
-          })
-          this.$emit("deleteFile", this.obj.linksid)
-          // this.$parent.$parent.$parent.$parent.uploadCacheData.attinfos.splice(this.$parent.$parent.$parent.$parent.uploadCacheData.attinfos.filter(item => this.data == item),1)
-        } else {
-          this.$notify({
-            title: '提示',
-            message: '删除失败',
-            type: 'error'
-          })
-        }
+    async handle() {
+      let res = removeFile.removeFileList([this.obj])
+      this.tool.showMessage(res,() => {
+        this.$emit("deleteFile", this.obj.linksid)
       })
     },
   },

+ 10 - 11
src/SManagement/archives_upload/components/save.vue

@@ -44,9 +44,9 @@ export default {
   },
   methods: {
     /* 新增并编辑素材 */
-    add(type) {
+    async add(type) {
       let classid = '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid;
-      this.$api.requested({
+      let res = await this.$api.requested({
         "classname": "webmanage.saletool.sharematerial.sharematerial",
         "method": "insertOrUpdate",
         "content": {
@@ -59,16 +59,15 @@ export default {
           "sat_sharematerialid": 0,
           type
         }
-      }).then(res => {
-        if (res.msg != '成功') return this.$message.error(res.data);
-        window.sessionStorage.setItem('newMaterial', JSON.stringify(res.data));
-        this.$router.push({
-          path: '/upload_archives',
-          query: {
-            id: res.data.sat_sharematerialid
-          }
-        });
       })
+      if (res.msg != '成功') return this.$message.error(res.data);
+      window.sessionStorage.setItem('newMaterial', JSON.stringify(res.data));
+      this.$router.push({
+        path: '/upload_archives',
+        query: {
+          id: res.data.sat_sharematerialid
+        }
+      });
     },
     btnClick(){
       this.$emit("btnClick")

+ 17 - 16
src/SManagement/archives_upload/index.vue

@@ -49,7 +49,6 @@ import delete1 from '@/SManagement/archives_upload/components/delete'
 import download from '@/SManagement/archives_upload/components/download'
 import Editor from '@/components/my-editor/Editor'
 
-import { weAtob, weBtoa } from "@/utils/weapp-jwt"
 import removeFile from '@/utils/removeFile'
 import { log } from '@antv/g2plot/lib/utils'
 export default {
@@ -125,7 +124,7 @@ export default {
     },
     /* 更新附件列表数据 */
     randerData() {
-      if(this.uploadType != 3) this.$refs.attFileList.randerData(this.uploadCacheData.attinfos)
+      if (this.uploadType != 3) this.$refs.attFileList.randerData(this.uploadCacheData.attinfos)
     },
     deleteFile(id) {
       this.uploadCacheData.attinfos = this.uploadCacheData.attinfos.filter(v => v.linksid != id);
@@ -135,9 +134,15 @@ export default {
     save() {
       this.$refs.set.$refs.form.validate((val) => {
         if (val) {
-          if (this.uploadType == '3') this.cacheInfo.content.content = weBtoa(this.$refs.editor.editor.getHtml())
+          //判断有无内容
+          if (this.uploadType == '3') {
+            const content = this.$refs.editor.editor.getHtml();
+            if (content == "<p><br></p>") return this.$message.error('您还未编辑图文内容');
+            this.cacheInfo.content.content = content;
+          } else {
+            if (this.uploadCacheData.attinfos.length == 0) return this.$message.error('您还未上传附件');
+          }
           this.cacheInfo.content.type = this.uploadType;
-          console.log(this.cacheInfo.content)
           //判断所属ID是否为初始ID
           if (this.cacheInfo.content.sat_sharematerial_classid == '9999' + JSON.parse(window.sessionStorage.getItem("active_account")).userid) return this.$message.error('请选择素材分类');
           this.$api.requested(this.cacheInfo).then(res => {
@@ -202,7 +207,7 @@ export default {
     },
 
     //文件上传成功
-    onSuccess(id) {
+    async onSuccess(id) {
       let param = {
         "classname": "system.attachment.Attachment",
         "method": "createFileLink",
@@ -213,15 +218,14 @@ export default {
           "attachmentids": [id]
         }
       }
-      this.$api.requested(param).then(res => {
-        if (res.msg != '成功') return this.$notify({
-          title: '提示',
-          message: '上传失败',
-          type: 'error'
-        })
-        this.uploadCacheData.attinfos = this.uploadCacheData.attinfos.concat(res.data);
-        this.randerData();
+      let res = await this.$api.requested(param)
+      if (res.msg != '成功') return this.$notify({
+        title: '提示',
+        message: '上传失败',
+        type: 'error'
       })
+      this.uploadCacheData.attinfos = this.uploadCacheData.attinfos.concat(res.data);
+      this.randerData();
     },
     //退出后对数据进行销毁
     async removeAllData() {
@@ -242,8 +246,6 @@ export default {
           }
         }
         let result = await this.$api.requested(param)
-        console.log(result);
-
       }
     },
     //重置所有数据
@@ -262,7 +264,6 @@ export default {
     /* set组件 title填写回调 */
     titleChange(name) {
       this.cacheInfo.content.title = name;
-      console.log(this.cacheInfo.content.title);
     },
   },
 };

+ 13 - 17
src/SManagement/archivesmag/index.vue

@@ -5,9 +5,6 @@
                   @BreadCrumbsChange="BreadCrumbsChange"></bread-crumbs>
     <div class="header-panl">
       <!--类型选择面板-->
-      <!-- <select-panl :titleLists="titleLists"
-                   @CurrentSelectType="CurrentSelectType"
-                   ref="selectPanl" v-if="tool.checkAuth($route.name,'read')"></select-panl> -->
       <search @searchActive="searchActive" @clearData="clearData"></search>
       <!--切换最热最新-->
       <hot-new-control :sortType= 'params.content.where.sorttype'
@@ -39,13 +36,14 @@ export default {
         "classname": "saletool.salematerial.salematerial",
         "method": "selectMyList",
         "content": {
-            "pageNumber": 1,
-            "pageSize": 99999999,
-            "parentid": 1,
-            "where": {
-                "condition": "",
-                "sorttype": 1
-            }
+          "nocache":true, 
+          "pageNumber": 1,
+          "pageSize": 99999999,
+          "parentid": 1,
+          "where": {
+              "condition": "",
+              "sorttype": 1
+          }
         }
       },
       /**
@@ -100,11 +98,10 @@ export default {
   },
   methods: {
     //获取文件数据
-    getFileList() {
-      this.$api.requested(this.params).then(res => {
-        this.total = res.total
-        this.fileData = matchingFileType.fileList(res.data)
-      })
+    async getFileList() {
+      let res = await this.$api.requested(this.params)
+      this.total = res.total
+      this.fileData = matchingFileType.fileList(res.data)
     },
     searchActive (txt) {
       this.params.content.where.condition = txt
@@ -131,11 +128,10 @@ export default {
       this.$api.requested(this.params).then(res => {
         this.fileData = this.filterFileData(matchingFileType.fileList(res.data),type)
         this.total = !this.fileData ? 0 : this.fileData.length
-
       })
     },
     //面包屑发出的事件
-    async BreadCrumbsChange(index) {
+    BreadCrumbsChange(index) {
       if(this.tempFileData.length <=1) return 
       this.isType = 'all'
       this.params.content.parentid = index

+ 4 - 7
src/SManagement/notice/index.vue

@@ -52,24 +52,21 @@ export default {
   mounted() {},
   methods: {
     //获取通告列表
-    getNoticeData() {
-      this.$api.requested(this.param).then(res =>{
+    async getNoticeData() {
+      let res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
-      })
     },
     pageChange(val) {
       this.param.content.pageNumber = val
       this.getNoticeData()
     },
 
-    searchActive(data) {
-      if(!data) return 
+    async searchActive(data) {
       this.param.content.where.condition = data.trim()
-      this.$api.requested(this.param).then(res =>{
+      let res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
-      })
     },
     clearData() {
       this.param.content.where.condition = ''

+ 19 - 38
src/SManagement/notice/notice_detail/NoticeDetail.vue

@@ -49,14 +49,12 @@
 
 <script>
 import FileItem from '@/components/file-block/index'
-import {weAtob,weBtoa} from "@/utils/weapp-jwt"
 export default {
   name: "NoticeDetail",
   data () {
     return {
       //拉取数据配置
       param: {
-          "accesstoken": "c94ae676c321f1ce91e05797ba2f9bc3",
           "classname": "saletool.notice.notice",
           "method": "queryNoticeMain",
           "content": {   
@@ -66,7 +64,6 @@ export default {
       },
       //发表配置
       send: {
-        "accesstoken": "2337e72d40da54ce343c631b509ca873",
         "classname": "saletool.notice.notice",
         "method": "updateReadRecord",
         "content": {
@@ -112,20 +109,18 @@ export default {
   methods: {
     //解析富文本
     compileFWB () {
-      // let con = weAtob(this.detailData.content);
-      document.getElementById('fwb').innerHTML = weAtob(this.detailData.content);
+      document.getElementById('fwb').innerHTML = this.detailData.content
     },
     //获取详情数据
-    getNoticeDetail () {
+    async getNoticeDetail () {
       this.param.content.sat_noticeid = this.$route.query.sat_noticeid
-      this.$api.requested(this.param).then(res => {
-        this.detailData = res.data
-        this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)
-        this.compileFWB()
-      })
+      let res = await this.$api.requested(this.param)
+      this.detailData = res.data
+      this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)
+      this.compileFWB()
     },
     //发表
-    sendComment () { 
+    async sendComment () { 
       if (!this.send.content.leavemessage == true || this.send.content.score == 0) {
         this.$notify({
           title:'提示',
@@ -134,51 +129,37 @@ export default {
         })
         return
       } else {
-        this.$api.requested(this.send).then(res => {
-          if (res.code == 1) {
-            this.$notify({
-              title: '提示',
-              message: '发表成功',
-              type: 'success'
-            })
-            this.getCommentDetail()
-          }
+        let res = await this.$api.requested(this.send)
+        this.tool.showMessage(res,() => {
+          this.getCommentDetail()
         })
       }
       
     },
     //获取评论
-    getCommentDetail() {
-      this.$api.requested({
+    async getCommentDetail() {
+      let res = await this.$api.requested({
         "accesstoken": "148928f55b25f5c4636d5ae7cd339f93",
         "classname": "saletool.notice.notice",
         "method": "queryReadRecord",
         "content": {
             "sat_noticeid":this.$route.query.sat_noticeid
         }
-      }).then( res => {
-        this.commentData = res.data[0]    
-        this.send.content.score = res.data[0].score
-        this.send.content.leavemessage = res.data[0].leavemessage
       })
+      this.commentData = res.data[0]    
+      this.send.content.score = res.data[0].score
+      this.send.content.leavemessage = res.data[0].leavemessage
     },
     //更新下载记录
-    updateDownLoadRecord(data) {
-      this.$api.requested({
+    async updateDownLoadRecord(data) {
+      let res = await this.$api.requested({
         "classname": "saletool.notice.notice",
         "method": "updateDownloadRecord",
         "content": {
-                "sat_noticeid":this.$route.query.sat_noticeid
-        }
-      }).then( res => {
-        if(res.code != 1) {
-          this.$notify({
-            title:'提示',
-            message:'下载更新记录失败',
-            type:'warning'
-          })
+          "sat_noticeid":this.$route.query.sat_noticeid
         }
       })
+      this.tool.showMessage(res)
     }
   }
 };

+ 10 - 26
src/SManagement/orderclue/components/add.vue

@@ -44,20 +44,6 @@
 export default {
   name: 'add',
   data() {
-    let phoneCheck = (rule,value,callback) => {
-      if(!this.tool.checkPhoneFun(value)) {
-        callback(new Error('请输入正确手机号'))
-      }else {
-        callback()
-      }
-    }
-    let checkLength = (rule,value,callback) => {
-      if(value && value.length > 25) {
-        callback(new Error('字符限制在25个之内'))
-      }else {
-        callback()
-      }
-    }
     return {
       param: {
         "classname": "saletool.orderclue.web.orderclue",
@@ -65,7 +51,7 @@ export default {
         "content": {
             "sat_orderclueid": 0,
             "name": "",
-            "phonenumber": "13812345678",
+            "phonenumber": "",
             "province": "",
             "city": "",
             "county": "",
@@ -78,14 +64,14 @@ export default {
       rules: {
         phonenumber:[
           {required:true,message:'请输入手机号',trigger:'blur'},
-          {validator:phoneCheck,trigger:'blur'}
+          { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'blur' }
         ],
         province:[
           {required:true,message:'内容不能为空',trigger:'blur'},
         ],
         cluesource:[
           {required:true,message:'内容不能为空',trigger:'blur'},
-          {validator:checkLength,trigger:'blur'}
+          { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
         ],
       },
       arealist:[],
@@ -125,20 +111,18 @@ export default {
       } else if (this.areaSelectResult.length == 1) {
         this.param.content.province = this.areaSelectResult[0]
       }
-      this.$refs.ruleForm.validate( val => {
+      this.$refs.ruleForm.validate( async val => {
           if( !val ) return this.$notify({
             title:'提示',
             message:'请按照要求填写信息',
             type:'warning'
           })
-          this.$api.requested(this.param).then( res => {
-            if(res.code == 1) {
-              this.$refs.ruleForm.resetFields()
-              this.dialogVisible = false  
-              this.areaSelectResult = []
-              this.$emit('updataList')
-              this.tool.showMessage(res)
-            }
+          let res = await this.$api.requested(this.param)
+          this.tool.showMessage(res,() => {
+            this.$refs.ruleForm.resetFields()
+            this.dialogVisible = false  
+            this.areaSelectResult = []
+            this.$emit('updataList')
           })
       })
       

+ 12 - 26
src/SManagement/orderclue/components/edit.vue

@@ -50,20 +50,6 @@ import { log } from '@antv/g2plot/lib/utils';
 export default {
   name: 'add',
   data() {
-    let phoneCheck = (rule,value,callback) => {
-      if(!this.tool.checkPhoneFun(value)) {
-        callback(new Error('请输入正确手机号'))
-      }else {
-        callback()
-      }
-    }
-    let checkLength = (rule,value,callback) => {
-      if(value && value.length > 25) {
-        callback(new Error('字符限制在25个之内'))
-      }else {
-        callback()
-      }
-    }
     return {
       param: {
         "classname": "saletool.orderclue.web.orderclue",
@@ -71,7 +57,7 @@ export default {
         "content": {
             "sat_orderclueid": 0,
             "name": "",
-            "phonenumber": "13812345678",
+            "phonenumber": "",
             "province": "",
             "city": "",
             "county": "",
@@ -84,14 +70,14 @@ export default {
       rules: {
         phonenumber:[
           {required:true,message:'请输入手机号',trigger:'blur'},
-          {validator:phoneCheck,trigger:'blur'}
+          { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'blur' }
         ],
         province:[
           {required:true,message:'内容不能为空',trigger:'blur'},
         ],
         cluesource:[
           {required:true,message:'内容不能为空',trigger:'blur'},
-          {validator:checkLength,trigger:'blur'}
+          { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
         ],
       },
       arealist:[],
@@ -160,20 +146,20 @@ export default {
       } else {
         this.param.content.province = this.areaSelectResult[0]
       }
-      this.$refs.ruleForm.validate( val => {
+      this.$refs.ruleForm.validate( async val => {
         if( !val ) return this.$notify({
           title:'提示',
           message:'请按照要求输入信息',
           type:'warning'
         })
-        this.$api.requested(this.param).then( res => {
-          this.tool.showMessage(res)
-          this.$refs.ruleForm.resetFields()
-          this.dialogVisible = false  
-          this.areaSelectResult = []
-          this.$emit('updataList')
-          this.$emit('getDetail')
-        })
+        let res = await this.$api.requested(this.param)
+          this.tool.showMessage(res,() => {
+            this.$refs.ruleForm.resetFields()
+            this.dialogVisible = false  
+            this.areaSelectResult = []
+            this.$emit('updataList')
+            this.$emit('getDetail')
+          })
       })
       
     },

+ 4 - 5
src/SManagement/orderclue/components/export.vue

@@ -24,11 +24,10 @@ export default {
     }
   },
   methods:{
-    submit () {
-      this.$api.requested(this.param).then( res => {
-        if( res.code == 1) {
-          window.open(res.data[0].url,'_self')
-        }
+    async submit () {
+      let res = await this.$api.requested(this.param)
+      this.tool.showMessage(res,() => {
+        window.open(res.data[0].url,'_self')
       })
     }
   }

+ 9 - 11
src/SManagement/orderclue/components/follow.vue

@@ -29,7 +29,7 @@
             <el-form-item label="本次跟进结果" label-width="150px" label-position="left" prop="logtype">
               <el-radio-group v-model="param.content.logtype">
                 <el-radio label="跟进">跟进</el-radio>
-                <el-radio label="成交">成交</el-radio>
+                <el-radio label="成交">成交</el-radio>
                 <el-radio label="丢单">丢单</el-radio>
                 <el-radio label="无效">无效</el-radio>
               </el-radio-group>
@@ -47,7 +47,7 @@
             <el-form-item label="丢单原因" prop="content" v-if="param.content.logtype == '丢单'">
               <el-input type="textarea" v-model="param.content.content" size="small"></el-input>
             </el-form-item>
-            <el-form-item label="添加备注" prop="content" v-if="param.content.logtype == '成交'">
+            <el-form-item label="添加备注" prop="content" v-if="param.content.logtype == '成交'">
               <el-input type="textarea" v-model="param.content.content" size="small"></el-input>
             </el-form-item>
             <el-form-item label="无效原因" prop="content" v-if="param.content.logtype == '无效'">
@@ -125,21 +125,19 @@ export default {
       this.dialogVisible = false
     },
     followAction() {
-      this.$refs.ruleForm.validate( val => {
+      this.$refs.ruleForm.validate( async val => {
         if(!val) return this.$notify({
           title:'提示',
           message:'请按照要求填写信息',
           type:'warning'
         })
         this.param.content.sat_orderclueid = this.data.data.sat_orderclueid
-        this.$api.requested(this.param).then( res => {
-          if(res.code == 1) {
-            this.dialogVisible = false
-            this.$emit('updataList')
-            this.$emit('getDetail')
-            this.$refs.ruleForm.resetFields()
-          }
-          this.tool.showMessage(res)
+        let res = await this.$api.requested(this.param)
+        this.tool.showMessage(res,() => {
+          this.dialogVisible = false
+          this.$emit('updataList')
+          this.$emit('getDetail')
+          this.$refs.ruleForm.resetFields()
         })
       })
       

+ 5 - 7
src/SManagement/orderclue/components/list.vue

@@ -72,6 +72,7 @@ export default {
         "method": "selectList",
         "content": {
           "isAll": false,
+          "nocache":true,
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
@@ -105,13 +106,10 @@ export default {
     this.getList()
   },
   methods: {
-    getList () {
-      this.$api.requested(this.param).then(res => {
-        this.list = res.data
-        this.total = res.total
-        console.log(this.list);
-
-      })
+    async getList () {
+      let res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
     },
     searchActive (data) {
       this.param.content.where.condition = data

+ 10 - 12
src/SManagement/orderclue/components/move.vue

@@ -2,7 +2,7 @@
   <div class="move">
     <el-button type="warning" size="small" style="margin-left:10px" @click="dialogVisible=true" v-if="type == 'more'">批量转移</el-button>
     <p @click="dialogVisible=true" v-else>转移</p>
-    <el-dialog title="新建线索" :visible.sync="dialogVisible" width="500px" :before-close="handleClose">
+    <el-dialog title="转移" :visible.sync="dialogVisible" width="500px" :before-close="handleClose">
       <div class="handle">
         <p class="title">团队成员</p>
         <el-select placeholder="请选择转移人" v-model="param.content.sa_agent_hrid" size="small">
@@ -54,8 +54,8 @@ export default {
     this.getTeamList()
   },
   methods: {
-    getTeamList () {
-      this.$api.requested({
+    async getTeamList () {
+      let res = await this.$api.requested({
         "classname": "sale.team.team",
         "method": "query_teamList",
         "content": {
@@ -65,21 +65,19 @@ export default {
               "condition": ""
           }
         }
-      }).then(res => {
-        this.teamList = res.data
       })
+      this.teamList = res.data
     },
     handleClose () {
       this.dialogVisible = false
     },
-    followAction () {
+    async followAction () {
       this.param.content.sat_orderclueid = this.data
-      this.$api.requested(this.param).then( res => {
-        this.tool.showMessage(res,()=>{
-          this.dialogVisible = false
-          this.$emit('updataList')
-          this.param.content.sa_agent_hrid = ''
-        })
+      let res = await this.$api.requested(this.param)
+      this.tool.showMessage(res,() => {
+        this.dialogVisible = false
+        this.$emit('updataList')
+        this.param.content.sa_agent_hrid = ''
       })
     }
   }

+ 0 - 5
src/SManagement/orderclue/index.vue

@@ -54,11 +54,6 @@ export default {
     updataList() {
       this.$refs.list.param.content.pageNumber = 1
       this.$refs.list.getList()
-      console.log(11111);
-      
-    },
-    exportData() {
-
     },
   },
 };

+ 4 - 6
src/SManagement/orderclue_detail/components/followDetail.vue

@@ -68,12 +68,10 @@ export default {
     this.getFollowDetail()
   },
   methods: {
-    getFollowDetail() {
-      this.$api.requested(this.param).then( res => {
-        this.follow = res.data
-        this.total = res.total
-        console.log(this.follow);
-      })
+    async getFollowDetail() {
+      let res = await this.$api.requested(this.param)
+      this.follow = res.data
+      this.total = res.total
     },
     handleCurrentChange(n) {
       this.param.content.pageNumber = n

+ 3 - 5
src/SManagement/orderclue_detail/index.vue

@@ -71,15 +71,13 @@ export default {
     this.getDetail()
   },
   methods: {
-    getDetail() {
+    async getDetail() {
       this.$nextTick(() => {
         this.$refs.followDetatil.getFollowDetail()
       })
       this.param.content.sat_orderclueid = this.$route.query.id
-      this.$api.requested(this.param).then( res => {
-        this.detail = res.data
-        console.log(this.detail);
-      })
+      let res = await this.$api.requested(this.param)
+      this.detail = res.data
     }
   },
 };

+ 51 - 76
src/SManagement/submitedit_details/components/SubmiteditAction.vue

@@ -86,14 +86,13 @@ export default {
       this.getSubmitPanl()
     },
     //获取上传模板
-    getSubmitPanl () {
+    async getSubmitPanl () {
       this.param.content.sat_submiteditmodelid = this.detailData.sat_submiteditmodelid
-      this.$api.requested(this.param).then(res => {
-        this.upload_panl = res.data
-      })
+      let res = await this.$api.requested(this.param)
+      this.upload_panl = res.data
     },
     //删除提报记录
-    deleteSubmit () {
+    async deleteSubmit () {
       this.param.content.content = ''
       this.upload_panl.attinfos = ''
       let param = {
@@ -103,13 +102,10 @@ export default {
           "sat_submiteditid": this.upload_panl.sat_submiteditid
         }
       }
-      this.$api.requested(param).then(res => {
-        if (res.code != 1) {
-          console.log('提报删除失败');
-        }
-      })
+      let res = await this.$api.requested(param)
+      this.tool.showMessage(res)
     },
-    save () {
+    async save () {
       //新增
       if (this.param.content.content == false) {
         this.$notify({
@@ -122,8 +118,8 @@ export default {
       this.param.content.sat_submiteditmodelid = this.editData ? this.upload_panl.sat_submiteditmodelid : this.detailData.sat_submiteditmodelid
       this.param.content.sat_submiteditid = this.upload_panl.sat_submiteditid
       if (this.editData.attinfos) {
-        this.$api.requested(this.param).then(res => {
-          if(res.code == 1) {
+        let res = await this.$api.requested(this.param).then(res => {
+          this.tool.showMessage(res, async () => {
             this.isFileInfoPanlShow = false
             this.$parent.getDetailData()
             this.upload_panl = ''
@@ -137,73 +133,59 @@ export default {
                 "sat_submiteditid": "0"
               }
             }
-            this.$api.requested({
-              "accesstoken": "5750f12f3c6ad59ab82f7d6e26499cf5",
+            let res = await this.$api.requested({
               "classname": "saletool.submitedit.submitedit",
               "method": "sub_submitdetailed",
               "content": {
-                  "onceonly": this.$route.query.type == 'more' ? 1 : 0,
-                  "sat_submiteditmodelid":res.data.sat_submiteditmodelid,
-                  "sat_submiteditid":res.data.sat_submiteditid
+                "onceonly": this.$route.query.type == 'more' ? 1 : 0,
+                "sat_submiteditmodelid": res.data.sat_submiteditmodelid,
+                "sat_submiteditid": res.data.sat_submiteditid
               }
-            }).then( res => {
-                if( res.code == 1) {
-                  this.$notify({
-                    title:'提示',
-                    message:'修改成功',
-                    type:'success'
-                  })
-                  this.$parent.getDetailData()
-                } else {
-                  this.$notify({
-                    title:'提示',
-                    message:'修改失败',
-                    type:'success'
-                  })
-                }
-              })
-          }
+            })
+            this.tool.showMessage(res, () => {
+              this.$parent.getDetailData()
+            })
+          })
         })
       } else {
-        this.$api.requested(this.param).then(res => {
-          this.upload_panl.status = '发布'
-          if (res.code == 1) {
-            //提交提报明细
-            let param2 = {
-              "classname": "saletool.submitedit.submitedit",
-              "method": "sub_submitdetailed",
-              "content": {
-                "onceonly": this.$route.query.type == 'more' ? 1 : 0,
-                "sat_submiteditmodelid": this.detailData.sat_submiteditmodelid,
-                "sat_submiteditid": this.upload_panl.sat_submiteditid
-              }
+        let res = await this.$api.requested(this.param)
+        this.upload_panl.status = '发布'
+        this.tool.showMessage(res, async () => {
+          //提交提报明细
+          let param2 = {
+            "classname": "saletool.submitedit.submitedit",
+            "method": "sub_submitdetailed",
+            "content": {
+              "onceonly": this.$route.query.type == 'more' ? 1 : 0,
+              "sat_submiteditmodelid": this.detailData.sat_submiteditmodelid,
+              "sat_submiteditid": this.upload_panl.sat_submiteditid
             }
-            this.$api.requested(param2).then(res => {
-              if (res.code == 1) {
-                
-                this.upload_panl.status = '发布'
-                this.upload_panl.attinfos = null
-                this.param = {
-                  "classname": "saletool.submitedit.submitedit",
-                  "method": "insertorupdate",
-                  "content": {
-                    "sat_submiteditmodelid": "",
-                    "content": "",
-                    "sat_submiteditid": "0"
-                  }
-                },
-                  this.isFileInfoPanlShow = false
-                this.$parent.getDetailData()
-              }
-            })
           }
+          let res = await this.$api.requested(param2).then(res => {
+            this.tool.showMessage(res,() => {
+              this.upload_panl.status = '发布'
+              this.upload_panl.attinfos = null
+              this.param = {
+                "classname": "saletool.submitedit.submitedit",
+                "method": "insertorupdate",
+                "content": {
+                  "sat_submiteditmodelid": "",
+                  "content": "",
+                  "sat_submiteditid": "0"
+                }
+              },
+                this.isFileInfoPanlShow = false
+              this.$parent.getDetailData()
+            })
+
+          })
         })
       }
 
 
 
     },
-    onSuccess (id) {
+    async onSuccess (id) {
       this.fileId = id
       let param = {
         "classname": "system.attachment.Attachment",
@@ -217,16 +199,9 @@ export default {
           ]
         }
       }
-      this.$api.requested(param).then(res => {
-        if (res.msg != '成功') {
-          this.$notify({
-            title: '提示',
-            message: '上传失败',
-            type: 'error'
-          })
-        } else {
-          this.upload_panl.attinfos = this.fileType.fileList(this.upload_panl.attinfos.concat(res.data[0]))
-        }
+      let res = await this.$api.requested(param)
+      this.tool.showMessage(res,() => {
+        this.upload_panl.attinfos = this.fileType.fileList(this.upload_panl.attinfos.concat(res.data[0]))
       })
     },
     deleteSuccess (data) {

+ 3 - 4
src/SManagement/submitedit_details/components/SubmiteditItemInfo.vue

@@ -74,8 +74,6 @@ export default {
   },
   methods: {
     itemClick (item) {
-      console.log(item);
-      
       this.isFileInfoPanlShow = true
       this.currentFile = item
       this.currentFile.attinfos = this.fileType.fileList(this.currentFile.attinfos)
@@ -171,8 +169,9 @@ export default {
   display:-webkit-box;
   -webkit-box-orient:vertical; 
   -webkit-line-clamp:2;     
-  overflow:hidden;             
-  text-overflow:ellipsis;
+  overflow:hidden;        
+  white-space: nowrap;   
+  text-overflow: ellipsis;  
   margin-bottom: 16px;
 }
 .list .list-item .time {

+ 8 - 12
src/SManagement/submitedit_details/index.vue

@@ -42,7 +42,6 @@ export default {
   data() {
     return {
       param: {
-          "accesstoken": "f7a9c8b3d7bb1e7372bd91dcb848e624",
           "classname": "saletool.submitedit.submitedit",
           "method": "select_submitdetailed",
           "content": {
@@ -80,18 +79,17 @@ export default {
     this.getDetailData()
   },
   methods: {
-    getDetailData() {
+    async getDetailData() {
       this.param.content.sat_submiteditmodelid = this.$route.query.id
-      this.$api.requested(this.param).then( res =>{
-        this.detailData = res.data
-        //删除未提报记录明细
-        this.deteleNoSubmit()
-        this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)
-      })
+      let res = await this.$api.requested(this.param)
+      this.detailData = res.data
+      //删除未提报记录明细
+      this.deteleNoSubmit()
+      this.detailData.attinfos = this.fileType.fileList(this.detailData.attinfos)
     },
     //删除未提报的提报记录
     deteleNoSubmit() {
-      this.detailData.submitedit.forEach(element => {
+      this.detailData.submitedit.forEach( async element => {
         if(element.status == '未提报') {
           let param = {
               "classname": "saletool.submitedit.submitedit",
@@ -100,8 +98,7 @@ export default {
                   "sat_submiteditid":element.sat_submiteditid
               }
           }
-          this.$api.requested(param).then( res =>{
-          })
+          let res = await this.$api.requested(param)
           this.detailData.submitedit = this.detailData.submitedit.filter(item => item.status != '未提报')
         }
       })
@@ -118,7 +115,6 @@ export default {
       if(list) {
         return list.slice((this.currentIndex - 1) * this.pageSize,this.currentIndex * this.pageSize)
       }
-      
     }
   },
 };

+ 4 - 5
src/SManagement/submitedit_more/index.vue

@@ -50,11 +50,10 @@ export default {
   },
   methods: {
     //获取所有一事一报
-    getSubmitEditAction () {
-      this.$api.requested(this.param).then(res => {
-        this.oneData = res.data
-        this.total = res.total
-      })
+    async getSubmitEditAction () {
+      let res = await this.$api.requested(this.param)
+      this.oneData = res.data
+      this.total = res.total
     },
     pageChange (n) {
       this.param.content.pageNumber = n

+ 0 - 2
src/SManagement/submitedit_one/components/list.vue

@@ -40,8 +40,6 @@ export default {
   watch: {
   },
   mounted() {
-    console.log(this.list);
-    
   },
   methods: {
     itemClick (id,history) {

+ 4 - 9
src/SManagement/submitedit_one/index.vue

@@ -50,13 +50,10 @@ export default {
   },
   methods: {
     //获取所有一事一报
-    getSubmitEditAction () {
-      this.$api.requested(this.param).then(res => {
-        this.oneData = res.data
-        this.total = res.total
-        console.log(this.oneData);
-        
-      })
+    async getSubmitEditAction () {
+      let res = await this.$api.requested(this.param)
+      this.oneData = res.data
+      this.total = res.total
     },
     pageChange (n) {
       this.param.content.pageNumber = n
@@ -66,8 +63,6 @@ export default {
       this.param.content.where.begdate = time[0]
       this.param.content.where.enddate = time[1]
       this.param.content.pageNumber = 1
-      console.log(this.param.content.where);
-      
       this.getSubmitEditAction()
     },
     clearSelect() {

+ 35 - 65
src/SManagement/user/role-edit/RoleEdit.vue

@@ -22,17 +22,17 @@ export default {
         "classname": "sale.role.role",
         "method": "insertormodify_role",
         "content": {
-            "roleid":0,
-            "rolename":"",
-            "remarks":""
+          "roleid": 0,
+          "rolename": "",
+          "remarks": ""
         }
       },
       roleid: parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')).roleid,
       editData: parseInt(window.sessionStorage.getItem('currentEditRole')) == 0 ? 0 : JSON.parse(window.sessionStorage.getItem('currentEditRole')),
-      allPower:[]
+      allPower: []
     };
   },
-  components: {roleInfoHandle,HandleTop,save,RolePowerSelect},
+  components: { roleInfoHandle, HandleTop, save, RolePowerSelect },
   computed: {
   },
   watch: {
@@ -42,8 +42,8 @@ export default {
   },
   methods: {
     //初始化
-    init() {
-      if(this.editData) {
+    init () {
+      if (this.editData) {
         this.$nextTick(() => {
           this.$refs.info.ruleForm.name = this.editData.rolename
           this.$refs.info.ruleForm.descript = this.editData.remarks
@@ -51,11 +51,11 @@ export default {
       }
     },
     //计算选中的所有权限
-    getAllPower() {
+    getAllPower () {
       this.$refs.power.tempPowerList.forEach(item => {
-        if(item.optionids.length < 1) return
+        if (item.optionids.length < 1) return
         let result = this.allPower.find(item2 => item2.systemappid == item.systemappid)
-        if(result == undefined) {
+        if (result == undefined) {
           let obj = {}
           obj.systemappid = item.systemappid
           obj.optionids = item.optionids
@@ -64,72 +64,42 @@ export default {
           result.optionids = result.optionids
         }
       })
-      console.log(this.allPower);
-      
     },
-    save() {
+    async save () {
       this.add.content.rolename = this.$refs.info.ruleForm.name
       this.add.content.remarks = this.$refs.info.ruleForm.descript
       this.getAllPower()
-      this.$refs.info.$refs.ruleForm.validate(val => {
-        if(val) {
-          if(this.editData != 0) {
-            console.log(11111111);
-            
-            this.$api.requested({
+      this.$refs.info.$refs.ruleForm.validate(async val => {
+        if (val) {
+          if (this.editData != 0) {
+            let res = await this.$api.requested({
               "classname": "sale.role.role",
               "method": "add_appauth",
               "content": {
-                  "roleid": this.roleid,
-                  "systemapps": this.allPower
-              }
-            }).then( res => {
-              if(res.code == 1) {
-                this.$notify({
-                  title:'提示',
-                  message:'操作成功',
-                  type:'success'
-                })
-                this.$router.back()
-              } else {
-                this.$notify({
-                  title:'提示',
-                  message:'操作失败',
-                  type:'warning'
-                })
+                "roleid": this.roleid,
+                "systemapps": this.allPower
               }
             })
-          } else {
-            console.log(22222222222221);
-            this.$api.requested(this.add).then( res => {
-              if(res.code == 1) {
-                this.$api.requested({
-                  "classname": "sale.role.role",
-                  "method": "add_appauth",
-                  "content": {
-                      "roleid": res.data.roleid,
-                      "systemapps": this.allPower
-                  }
-                }).then( res => {
-                  if(res.code == 1) {
-                    this.$notify({
-                      title:'提示',
-                      message:'操作成功',
-                      type:'success'
-                    })
-                    this.$router.back()
-                  } else {
-                    this.$notify({
-                      title:'提示',
-                      message:'操作失败',
-                      type:'warning'
-                    })
-                  }
-                })
-              }
+            this.tool.showMessage(res, () => {
+              this.$router.back()
             })
+          } else {
+            let res = await this.$api.requested(this.add)
+            if (res.code == 1) {
+              this.$api.requested({
+                "classname": "sale.role.role",
+                "method": "add_appauth",
+                "content": {
+                  "roleid": res.data.roleid,
+                  "systemapps": this.allPower
+                }
+              })
+              this.tool.showMessage(res, () => {
+                this.$router.back()
+              })
+            }
           }
-        }        
+        }
       })
     }
   },

+ 19 - 25
src/SManagement/user/role-edit/components/RolePowerSelect.vue

@@ -117,8 +117,6 @@ export default {
   watch: {
   },
   created () {
-    console.log(this.$root);
-    
     this.getAllHavePower()
   },
   mounted () {
@@ -127,9 +125,9 @@ export default {
   },
   methods: {
     //当编辑逻辑时 拉取所有数据 储存所有已授权数据
-    getAllHavePower () {
+    async getAllHavePower () {
       if (parseInt(window.sessionStorage.getItem('currentEditRole')) != 0) {
-        this.$api.requested({
+        let res = await this.$api.requested({
           "classname": "sale.role.role",
           "method": "query_appselect_web",
           "content": {
@@ -138,33 +136,29 @@ export default {
               "condition": ""
             }
           }
-        }).then(res => {
-          let data = res.data.filter(item => item.optionids.length > 0)
-          let result
-          this.tempPowerList.forEach((item, index) => {
-            result = data.find(item2 => item2.systemappid == item.systemappid)
-            this.tempPowerList.push(result)
-          })
-          this.getPowerList()
         })
+        let data = res.data.filter(item => item.optionids.length > 0)
+        let result
+        this.tempPowerList.forEach((item, index) => {
+          result = data.find(item2 => item2.systemappid == item.systemappid)
+          this.tempPowerList.push(result)
+        })
+        this.getPowerList()
       } else {
         this.getPowerList()
       }
     },
     //获取授权列表
-    getPowerList () {
-      this.$api.requested(this.power).then(res => {
-        this.selectList = res.tips.client
-        this.powerList = res.data
-        console.log(this.selectList);
-        
-        this.handleHavePower()
-        this.calcHavePower(this.powerList)
-        this.currentItem = this.powerList[0]
-        this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
-        this.refreshItem(this)
-        this.total = res.total
-      })
+    async getPowerList () {
+      let res = await this.$api.requested(this.power)
+      this.selectList = res.tips.client
+      this.powerList = res.data
+      this.handleHavePower()
+      this.calcHavePower(this.powerList)
+      this.currentItem = this.powerList[0]
+      this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
+      this.refreshItem(this)
+      this.total = res.total
     },
     //抓取所有操作过的数据
     handleHavePower () {

+ 2 - 26
src/SManagement/user/role-manage/RoleManage.vue

@@ -26,12 +26,12 @@ export default {
   data () {
     return {
       param: {
-        "accesstoken": "86cf5a6b5314094f4b412da2b0445ac1",
         "classname": "sale.role.role",
         "method": "query_roleList",
         "content": {
+          "nocache": true,
           "pageNumber": 1,
-          "pageSize": 10,
+          "pageSize": 9999999,
           "where": {
             "condition": ""
           }
@@ -56,7 +56,6 @@ export default {
     getRoleData () {
       this.$api.requested(this.param).then(res => {
         this.roleData = res.data
-        console.log(this.roleData);
       })
     },
     //角色编辑
@@ -79,29 +78,6 @@ export default {
         }
       })
     },
-    //删除未提交角色角色
-    // deleteNoRole () {
-    //   let result = this.roleData
-    //     .filter(item => item.remarks == false && item.rolename == false)
-    //     .map(item => item.roleid)
-    //   if(!result) return 
-    //   result.forEach(item => {
-    //     this.$api.requested({
-    //       "classname": "sale.role.role",
-    //       "method": "delete_role",
-    //       "content": {
-    //         "roleid": item
-    //       }
-    //     }).then(res => {
-    //       if(res.code == 1) {
-    //         this.getRoleData()
-    //         console.log(111);
-            
-    //       }
-    //     })
-    //   })
-
-    // }
   },
 };
 </script>

+ 6 - 17
src/SManagement/user/role-manage/components/removeRole.vue

@@ -25,28 +25,17 @@ export default {
   watch: {
   },
   methods: {
-    removeTarget() {
-      console.log(this.roleData.roleid);
-      
-      this.$api.requested({
-        "accesstoken": "86cf5a6b5314094f4b412da2b0445ac1",
+    async removeTarget() {
+      let res = await this.$api.requested({
         "classname": "sale.role.role",
         "method": "delete_role",
         "content": {
             "roleid":this.roleData.roleid
         }
-      }).then( res => {
-        if(res.code == 1) {
-          this.$notify({
-            title:'提示',
-            message:'删除成功',
-            type:'success'
-          })
-          console.log(res);
-          
-          this.$parent.$parent.$parent.$parent.getRoleData()
-          this.dialogVisible = false
-        }  
+      })
+      this.tool.showMessage(res,() => {
+        this.$parent.$parent.$parent.$parent.getRoleData()
+        this.dialogVisible = false
       })
     },
     handleClose() {

+ 4 - 5
src/SManagement/user/team-manage/TeamManage.vue

@@ -32,7 +32,7 @@ export default {
           "method": "query_teamList",
           "content": {
               "pageNumber": 1,
-              "pageSize": 20,
+              "pageSize": 999999,
               "where": {
                   "condition": ""
               }
@@ -64,10 +64,9 @@ export default {
         this.$refs.addUser.$refs.formInfo.resetFields()
       })
     },
-    getTeamData() {
-      this.$api.requested(this.param).then( res => {
-        this.teamData = res.data
-      })
+    async getTeamData() {
+      let res = await this.$api.requested(this.param)
+      this.teamData = res.data
     },
     editTargetFun(data) {
       this.editTarget = data

+ 10 - 27
src/SManagement/user/team-manage/components/AddUser.vue

@@ -46,13 +46,6 @@
 export default {
   name: 'AddUser',
   data () {
-    let checkPhone = (rule,value,callback) => {
-      if(!this.tool.checkPhoneFun(value)) {
-        return callback(new Error('请填写正确的手机号'))
-      } else {
-        callback()
-      }
-    }
     return {
       param: {
           "classname": "sale.team.team",
@@ -73,7 +66,7 @@ export default {
         ],
         phonenumber: [
           { required: true, message: '请输入手机号', trigger: 'blur' },
-          { validator: checkPhone , trigger: 'blur' }
+          { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'blur' }
         ],
         roleids: [
           { required: true, message: '请选择你的权限', trigger: 'blur' }
@@ -106,35 +99,25 @@ export default {
     handleClose () {
       this.dialogVisible = false
     },
-    getRoleList() {
-      this.$api.requested({
-        "accesstoken": "86cf5a6b5314094f4b412da2b0445ac1",
+    async getRoleList() {
+      let res= await this.$api.requested({
         "classname": "sale.team.team",
         "method": "queryRole",
         "content": {
             "sa_agent_hrid": 0
         }
-      }).then( res => {
-        this.checkList = res.data
       })
+      this.checkList = res.data
     },
     //提交
     submitTeam() {
-      this.$refs.formInfo.validate((val) => {
+      this.$refs.formInfo.validate( async val => {
         if(val) {
-          console.log(this.param);
-          this.$api.requested(this.param).then( res => {
-            console.log(res);
-            if(res.code == 1) {
-              this.$notify({
-                title:'提示',
-                message:'操作成功',
-                type:'success'
-              })
-              this.$refs.formInfo.resetFields()
-              this.dialogVisible = false
-              this.$parent.getTeamData()
-            }
+          let res = await this.$api.requested(this.param)
+          this.tool.showMessage(res,() => {
+            this.$refs.formInfo.resetFields()
+            this.dialogVisible = false
+            this.$parent.getTeamData()
           })
         }
       })

+ 6 - 13
src/SManagement/user/team-manage/components/RemoveTeam.vue

@@ -25,24 +25,17 @@ export default {
   watch: {
   },
   methods: {
-    removeTarget() {
-      this.$api.requested({
-        "accesstoken": "ca6adf190865e9a6a737d5ee2550d9e3",
+    async removeTarget() {
+      let res = await this.$api.requested({
         "classname": "sale.team.team",
         "method": "deleteHr",
         "content": {
             "sa_agent_hrid": this.teamData.sa_agent_hrid
         }
-      }).then( res => {
-        if(res.code == 1) {
-          this.$notify({
-            title:'提示',
-            message:'删除成功',
-            type:'success'
-          })
-          this.$parent.$parent.$parent.$parent.getTeamData()
-          this.dialogVisible = false
-        }  
+      })
+      this.tool.showMessage(res,() => {
+        this.$parent.$parent.$parent.$parent.getTeamData()
+        this.dialogVisible = false
       })
     },
     handleClose() {

+ 8 - 17
src/SManagement/user/user-info/UserInfo.vue

@@ -31,7 +31,6 @@ export default {
   data() {
     return {
       param: {
-        "accesstoken": "299697db3f25396622f7f4a7f1673405",
         "classname": "common.usercenter.usercenter",
         "method": "queryUserMsg",
         "content": {
@@ -61,10 +60,9 @@ export default {
   },
   methods: {
     //获取用户信息
-    getUserInfo() {
-      this.$api.requested(this.param).then( res => {
-        this.userInfo = res.data
-      })
+    async getUserInfo() {
+      let res = await this.$api.requested(this.param)
+      this.userInfo = res.data
     },
     //上传头像成功
     onSuccess(id) {
@@ -80,8 +78,8 @@ export default {
 
     },
     //文件绑定
-    bindFile(id) {
-      this.$api.requested({
+    async bindFile(id) {
+      let res = await this.$api.requested({
         "classname": "system.attachment.Attachment",
         "method": "createFileLink",
         "content": {
@@ -92,16 +90,9 @@ export default {
             id
           ]
         }
-      }).then(res => {
-        if (res.msg != '成功') {
-          this.$notify({
-            title: '提示',
-            message: '上传失败',
-            type: 'error'
-          })
-        } else {
-          this.getUserInfo()          
-        }
+      })
+      this.tool.showMessage(res,() => {
+        this.getUserInfo()    
       })
     },
     phoneChange(phone) {

+ 0 - 1
src/SManagement/user/user-info/components/PassEdit.vue

@@ -68,7 +68,6 @@ export default {
       this.$refs.form.validate(val => {
         if(val) {
           this.$api.requested({
-            "accesstoken": "299697db3f25396622f7f4a7f1673405",
             "classname": "common.usercenter.usercenter",
             "method": "changePassWord",
             "content": {

+ 9 - 29
src/SManagement/user/user-info/components/PhoneEdit.vue

@@ -28,13 +28,6 @@ import md5 from 'js-md5'
 export default {
   name: 'PhoneEdit',
   data() {
-    let checkPhone = (rule,value,callback) => {
-      if(!this.tool.checkPhoneFun(value)) {
-        return callback(new Error('请填写正确的手机号'))
-      } else {
-        callback()
-      }
-    }
     return {
       dialogVisible: false,
       form: {
@@ -45,7 +38,7 @@ export default {
       rules: {
         phonenumber:[
           { required: true, message: '请输入手机号', trigger: 'blur' },
-          { validator: checkPhone , trigger: 'blur' }
+          { pattern:/^1[3-9]\d{9}$/, message: '请输入正确手机号码',trigger: 'blur' }
         ]
       }
     };
@@ -95,7 +88,7 @@ export default {
       })
     },
     //修改手机号
-    phoneEdit() {
+    async phoneEdit() {
       if(this.logCode == false) {
         this.$notify({
           title:'提示',
@@ -104,8 +97,7 @@ export default {
         })
         return
       }
-      this.$api.requested({
-        "accesstoken": "299697db3f25396622f7f4a7f1673405",
+      let res = await this.$api.requested({
         "classname": "common.usercenter.usercenter",
         "method": "updateUserMsg",
         "content": {
@@ -113,24 +105,12 @@ export default {
           "phonenumber":this.form.phonenumber,
           "password":md5(this.logCode)
         }
-      }).then( res => {
-        if(res.code == 1) {
-          this.$notify({
-            title:'提示',
-            message:'修改成功',
-            type:'success'
-          })
-          this.$emit('phoneChange',this.form.phonenumber)
-          this.dialogVisible = false
-          this.logCode = ''
-          this.form.phonenumber = ''
-        } else {
-          this.$notify({
-            title:'提示',
-            message:'修改失败',
-            type:'error'
-          })
-        }
+      })
+      this.tool.showMessage(res,() => {
+        this.$emit('phoneChange',this.form.phonenumber)
+        this.dialogVisible = false
+        this.logCode = ''
+        this.form.phonenumber = ''
       })
     },
     handleClose() {

+ 3 - 10
src/SManagement/user/user-info/components/baseInfo.vue

@@ -99,7 +99,7 @@ export default {
     }
   },
   methods: {
-    save() {
+    async save() {
       if(this.ruleForm.name == this.userInfo.name) {
         this.$notify({
           title:'提示',
@@ -112,15 +112,8 @@ export default {
       this.status = true
       this.edit.content.name = this.ruleForm.name
       this.edit.content.phonenumber = this.ruleForm.phonenumber
-      this.$api.requested(this.edit).then( res => {
-        if(res.code == 1) {
-          this.$notify({
-            title:'提示',
-            message:'名称修改成功',
-            type:'success'
-          })
-        }
-      })
+      let res = await this.$api.requested(this.edit)
+      this.tool.showMessage(res)
     }
   },
 };

+ 1 - 2
src/components/my-editor/Editor.vue

@@ -18,7 +18,6 @@
 <script>
 import Vue from 'vue'
 import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
-import {weAtob,weBtoa} from "@/utils/weapp-jwt"
 
 export default Vue.extend({
     components: { Editor, Toolbar },
@@ -112,7 +111,7 @@ export default Vue.extend({
     mounted() {
         // 模拟 ajax 请求,异步渲染编辑器
         setTimeout(() => {
-          this.html = weAtob(this.content)
+          this.html = this.content
         }, 1000)
     },
     beforeDestroy() {

+ 1 - 1
src/router/index.js

@@ -63,7 +63,7 @@ let routes = [
 routes[2].children = [...routes[2].children,...HManagement,...SManagement]
 
 const router = new VueRouter({
-  // mode: 'history',
+  // mode: 'hhistory',
   base: process.env.BASE_URL,
   routes,
 });

+ 0 - 2
src/utils/removeFile.js

@@ -12,8 +12,6 @@ export default {
         linksids.push(file[i].linksid)
       }
     }
-    console.log(linksids);
-    
     let param = {
       "accesstoken": "4a6559d45d2a4c6e0ebac2c803344106",
       "classname": "system.attachment.Attachment",

+ 0 - 4
src/utils/tool.js

@@ -92,9 +92,5 @@ export default {
       const data = formatJson(filterVal, list);
       export_json_to_excel(tHeader, data, d);  //导出Excel 文件名
     })
-  },
-  //手机正则
-  checkPhoneFun(num) {
-    return /^[1][3-9][\d]{9}/.test(num)
   }
 } 

+ 0 - 77
src/utils/weapp-jwt.js

@@ -1,77 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
-exports.weBtoa = function (string) {
-    string = String(string);
-    var bitmap, a, b, c, result = "", i = 0, rest = string.length % 3;
-    for (; i < string.length;) {
-        if ((a = string.charCodeAt(i++)) > 255 ||
-            (b = string.charCodeAt(i++)) > 255 ||
-            (c = string.charCodeAt(i++)) > 255)
-            throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");
-        bitmap = (a << 16) | (b << 8) | c;
-        result += b64.charAt(bitmap >> 18 & 63) + b64.charAt(bitmap >> 12 & 63) +
-            b64.charAt(bitmap >> 6 & 63) + b64.charAt(bitmap & 63);
-    }
-    return rest ? result.slice(0, rest - 3) + "===".substring(rest) : result;
-};
-exports.weAtob = function (string) {
-    string = String(string).replace(/[\t\n\f\r ]+/g, "");
-    if (!b64re.test(string))
-        throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
-    string += "==".slice(2 - (string.length & 3));
-    var bitmap, result = "", r1, r2, i = 0;
-    for (; i < string.length;) {
-        bitmap = b64.indexOf(string.charAt(i++)) << 18 | b64.indexOf(string.charAt(i++)) << 12 |
-            (r1 = b64.indexOf(string.charAt(i++))) << 6 | (r2 = b64.indexOf(string.charAt(i++)));
-        result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) :
-            r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) :
-                String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
-    }
-    return result;
-};
-function b64DecodeUnicode(str) {
-    return decodeURIComponent(exports.weAtob(str).replace(/(.)/g, function (p) {
-        var code = p.charCodeAt(0).toString(16).toUpperCase();
-        if (code.length < 2) {
-            code = "0" + code;
-        }
-        return "%" + code;
-    }));
-}
-function base64_url_decode(str) {
-    var output = str.replace(/-/g, "+").replace(/_/g, "/");
-    switch (output.length % 4) {
-        case 0:
-            break;
-        case 2:
-            output += "==";
-            break;
-        case 3:
-            output += "=";
-            break;
-        default:
-            throw "Illegal base64url string!";
-    }
-    try {
-        return b64DecodeUnicode(output);
-    }
-    catch (err) {
-        return exports.weAtob(output);
-    }
-}
-function weappJwtDecode(token, options) {
-    if (typeof token !== "string") {
-        throw ("Invalid token specified");
-    }
-    options = options || {};
-    var pos = options.header === true ? 0 : 1;
-    try {
-        return JSON.parse(base64_url_decode(token.split(".")[pos]));
-    }
-    catch (e) {
-        throw ("Invalid token specified: " + e.message);
-    }
-}
-exports.default = weappJwtDecode;

+ 4 - 7
src/views/message/index.vue

@@ -46,14 +46,11 @@ export default {
     this.getMessageList()
   },
   methods: {
-    getMessageList () {
+    async getMessageList () {
       this.param.content.type = this.currentItem == 0 ? '系统' : '应用'
-      this.$api.requested(this.param).then(res => {
-        this.list = res.data
-        this.total = res.total
-        console.log(this.list);
-
-      })
+      let res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
     },
     selectFun (data) {
       this.param.content.pageNumber = 1