codeMan 2 years ago
parent
commit
a6dcbede0d

+ 22 - 4
src/SManagement/archives_ad/components/detail.vue

@@ -25,7 +25,8 @@
       <div class="file-item" v-for="(item,index) in currentSelectFile.attinfos" :key="index">
         <file-item :itemStyle="itemStyle" 
                    :fileData="[item]"
-                   :isDownLoad="true">
+                   :isDownLoad="true"
+                   @updateDownLoadRecord="updateDownLoadRecord">
         </file-item>
       </div>
     </div>
@@ -78,9 +79,26 @@ export default {
      } 
   },
   methods: {
-    downLoad() {
-      window.open(this.currentSelectFile.url)
-    },
+    //更新下载记录
+    updateDownLoadRecord(data) {
+      this.$api.requested({
+        "classname": "saletool.sharematerial.sharematerial",
+        "method": "updateDownloadLog",
+        "content": {
+                "sat_sharematerialid":this.currentSelectFile.sat_sharematerialid
+        }
+      }).then( res => {
+        console.log(res);
+        
+        if(res.code != 1) {
+          this.$notify({
+            title:'提示',
+            message:'下载更新记录失败',
+            type:'warning'
+          })
+        }
+      })
+    }
   }
 };
 </script>

+ 19 - 4
src/SManagement/archives_sc/archives_details/detail.vue

@@ -18,7 +18,8 @@
       <div class="file-box">
         <file-item :itemStyle="itemStyle" 
                    :fileData="currentSelectFile.attinfos | fileType"
-                   :isDownLoad="true">
+                   :isDownLoad="true"
+                   @updateDownLoadRecord="updateDownLoadRecord">
         </file-item>
       </div>
     </div>
@@ -69,9 +70,23 @@ export default {
     downLoad () {
       window.open(this.currentSelectFile.url)
     },
-    //预览
-    seeClick () {
-
+    //更新下载记录
+    updateDownLoadRecord(data) {
+      this.$api.requested({
+        "classname": "saletool.courseware.courseware",
+        "method": "updateDownloadLog",
+        "content": {
+                "sat_coursewareid":this.currentSelectFile.sat_coursewareid
+        }
+      }).then( res => {
+        if(res.code != 1) {
+          this.$notify({
+            title:'提示',
+            message:'下载更新记录失败',
+            type:'warning'
+          })
+        }
+      })
     }
   }
 };

+ 1 - 1
src/SManagement/archives_upload/components/upload.vue

@@ -62,7 +62,7 @@ export default {
       default() {
         return ''
       }
-    },
+    }
   },
   computed: {
     calcFileType() {

+ 25 - 3
src/SManagement/notice/notice_detail/NoticeDetail.vue

@@ -16,7 +16,12 @@
       <div class="file-download">
         <p class="title">附件下载</p>
         <div class="file-list" v-if="tool.checkAuth($route.name,'read')">
-          <file-item :isDownLoad="true" :itemStyle="itemStyle" :sat_noticeid="detailData.sat_noticeid" :fileData="detailData.attinfos">
+          <file-item 
+                    :isDownLoad="true" 
+                    :itemStyle="itemStyle" 
+                    :sat_noticeid="detailData.sat_noticeid" 
+                    :fileData="detailData.attinfos"
+                    @updateDownLoadRecord="updateDownLoadRecord">
           </file-item>
         </div>
       </div>
@@ -122,8 +127,7 @@ export default {
       })
     },
     //发表
-    sendComment () {
-      
+    sendComment () { 
       if (!this.send.content.leavemessage == true || this.send.content.score == 0) {
         this.$notify({
           title:'提示',
@@ -159,6 +163,24 @@ export default {
         this.send.content.score = res.data[0].score
         this.send.content.leavemessage = res.data[0].leavemessage
       })
+    },
+    //更新下载记录
+    updateDownLoadRecord(data) {
+      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'
+          })
+        }
+      })
     }
   }
 };

+ 39 - 16
src/SManagement/user/role-edit/components/RolePowerSelect.vue

@@ -26,9 +26,9 @@
                   </el-checkbox>
                 </template>
               </el-checkbox-group>
-              <!-- <div class="footer padd">
-                <el-checkbox label="" :checked="allCheck"  v-if="bbb">{{checkAll}}</el-checkbox>
-              </div> -->
+              <div class="footer padd">
+                <el-checkbox label="" :checked="allCheck"  v-if="bbb" @change="allCheckClick">{{checkAll}}</el-checkbox>
+              </div>
             </div>
           </el-col>
           <el-col :span="8">
@@ -93,8 +93,7 @@ export default {
     //是否选中
     isCheck () {
       return (data) => {
-        let result
-        if (result = this.currentItem.optionids.find(item => item == data.optionid)) {
+        if (this.currentItem.optionids.find(item => item == data.optionid) != undefined) {
           return true
         } else {
           return false
@@ -149,6 +148,8 @@ export default {
         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
       })
     },
@@ -185,16 +186,40 @@ export default {
     rowClick (data) {
       this.checkList = []
       this.currentItem = data
+      this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
       //解决数据刷新 视图不刷新
       this.aaa = false
+      this.bbb = false
       setTimeout(() => {
         this.aaa = true
-        this.allCheck = this.currentItem.options.length == this.currentItem.optionids.length       
+        this.bbb = true
       }, 100)
     },
     //group值发生改变时
     groupChange () {
       this.currentItem.optionids = this.checkList
+      this.allCheck = this.currentItem.optionids.length == this.currentItem.options.length
+      this.bbb = false
+      setTimeout(() => {
+        this.bbb = true
+      })
+    },
+    allCheckClick() {
+      this.allCheck = !this.allCheck
+      if(this.allCheck) {
+        this.currentItem.options.forEach(item => {
+          if(this.currentItem.optionids.find(item2 => item2 == item.optionid) == undefined) {
+            this.currentItem.optionids.push(item.optionid)
+          }
+        })
+      } else {
+        this.currentItem.optionids = []
+        this.checkList = []
+      }
+      this.aaa = false;
+      setTimeout(() => {
+        this.aaa = true
+      })
     },
     clearData () {
       this.power.content.where.condition = ''
@@ -210,16 +235,13 @@ export default {
       this.power.content.pageNumber = n
       this.getPowerList()
     },
-    // allCheckClick() {
-    //   this.allCheck = !this.allCheck
-    //   this.allCheck ? this.currentItem.optionids = [] : this.currentItem.optionids = this.currentItem.options
-    //   this.aaa = false
-    //   setTimeout(() => {
-    //     this.aaa = true
-    //   }, 100)
-    //   console.log(this.currentItem.optionids);
-      
-    // },
+    //重新渲染checkbox
+    refreshItem(target) {
+      target.bbb = false
+      setTimeout(() => {
+        target.bbb = true
+      })
+    }
   },
 };
 </script>
@@ -253,6 +275,7 @@ export default {
   bottom: 24px;
   border-top: 1px solid #cccccc;
   width: 100%;
+  height: 22.7px;
 }
 .role-power-select .power-block .el-checkbox-group {
   display: flex;

+ 1 - 1
src/SManagement/user/user-info/UserInfo.vue

@@ -3,7 +3,7 @@
       <div class="top">
         <div class="avatar">
           <img :src="getAvatar || require('@/assets/normal_avatar.png')" alt="">
-            <up-load target="avatar" @onSuccess="onSuccess" v-if="tool.checkAuth($route.name,'update')"></up-load>
+            <up-load target="avatar" @onSuccess="onSuccess" classType="1" v-if="tool.checkAuth($route.name,'update')"></up-load>
         </div>
       </div>
       <base-info :userInfo="userInfo" ref="userInfo">

+ 61 - 6
src/SManagement/user/user-info/components/PassEdit.vue

@@ -2,15 +2,15 @@
   <div class="password">
     <span @click="dialogVisible=true">编辑</span>
     <el-dialog title="修改密码" :visible.sync="dialogVisible" :before-close="handleClose">
-      <el-form ref="form" :model="form" label-width="80px">
-        <el-form-item label="原密码">
+      <el-form ref="form" :rules="rules" :model="form" label-width="80px">
+        <el-form-item label="原密码" prop="pass">
           <el-input v-model="form.pass" placeholder="请输入原密码"></el-input>
         </el-form-item>
-        <el-form-item label="新密码">
-          <el-input v-model="form.newpass" placeholder="请输入新密码"></el-input>
+        <el-form-item label="新密码" prop="newpass">
+          <el-input placeholder="请输入新密码" v-model="form.newpass" show-password></el-input>
         </el-form-item>
-        <el-form-item label="确认密码">
-          <el-input v-model="form.checkpass" placeholder="请再次输入密码"></el-input>
+        <el-form-item label="确认密码" prop="checkpass">
+          <el-input v-model="form.checkpass" placeholder="请再次输入密码" show-password></el-input>
         </el-form-item>
       </el-form>
       <div class="footer">
@@ -23,15 +23,35 @@
 </template>
 
 <script>
+import md5 from 'js-md5'
 export default {
   name: 'PassEdit',
   data () {
+    let checkPass = (rule,value,callback) => {
+      if(this.form.newpass != this.form.checkpass) {
+        callback(new Error('两次输入密码不一致'))
+      } else {
+        callback()
+      }
+    }
     return {
       dialogVisible: false,
       form: {
         pass:'',
         newpass:'',
         checkpass:''
+      },
+      rules:{
+        pass:[
+          { required: true, message: '请输入密码', trigger: 'blur' },
+        ],
+        newpass:[
+          { required: true, message: '请输入密码', trigger: 'blur' },
+        ],
+        checkpass:[
+          { required: true, message: '请输入密码', trigger: 'blur' },
+          { validator: checkPass, trigger: 'blur' },
+        ]
       }
     };
   },
@@ -45,6 +65,41 @@ export default {
       this.dialogVisible = false
     },
     passEdit() {
+      this.$refs.form.validate(val => {
+        if(val) {
+          this.$api.requested({
+            "accesstoken": "299697db3f25396622f7f4a7f1673405",
+            "classname": "common.usercenter.usercenter",
+            "method": "changePassWord",
+            "content": {
+                "password":md5(this.form.pass),
+                "newpassword":md5(this.form.checkpass)
+            }
+          }).then( res => {
+            if(res.code == 1) {
+              this.$notify({
+                title:'提示',
+                message:'密码修改成功',
+                type:'success'
+              })
+              this.$refs.form.resetFields()
+            } else {
+              this.$notify({
+                title:'提示',
+                message:'密码修改失败',
+                type:'warning'
+              })
+              this.$refs.form.resetFields()
+            }
+          })
+        } else {
+          this.$notify({
+            title:'提示',
+            message:'请按照要求修改密码',
+            type:'warning'
+          })
+        }
+      })
     },
   },
 };

+ 16 - 3
src/SManagement/user/user-info/components/PhoneEdit.vue

@@ -5,8 +5,8 @@
     title="修改手机号"
     :visible.sync="dialogVisible"
     :before-close="handleClose">
-    <el-form ref="form" :model="form" label-width="80px">
-      <el-form-item label="手机号">
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="手机号" prop="phonenumber">
         <el-input v-model="form.phonenumber" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="验证码">
@@ -28,13 +28,26 @@ 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: {
         phonenumber: ''
       },
       count:0,
-      logCode:''
+      logCode:'',
+      rules: {
+        phonenumber:[
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { validator: checkPhone , trigger: 'blur' }
+        ]
+      }
     };
   },
   props:['userInfo'],

+ 1 - 10
src/components/file-block/index.vue

@@ -86,16 +86,7 @@ export default {
       }
     },
     downLoad(item) {
-      if(this.sat_noticeid) {
-        this.$api.requested({
-          "classname": "saletool.notice.notice",
-          "method": "updateDownloadRecord",
-          "content": {
-            "sat_noticeid":this.sat_noticeid
-          }
-        }).then(res => {
-        })
-      }
+      this.$emit('updateDownLoadRecord',item)
       window.open(item.url,'_self')
     }
   },

+ 0 - 1
yos/css/250.9d5c997c.css

@@ -1 +0,0 @@
-.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}

+ 0 - 1
yos/css/380.9d5c997c.css

@@ -1 +0,0 @@
-.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}

+ 0 - 1
yos/css/628.6ba9c916.css

@@ -1 +0,0 @@
-.el-input-group__append,.el-input-group__prepend{background-color:#4f7bfd;color:#fff;border:1px solid #4f7bfd;cursor:pointer}.search-panel p[data-v-761553c6]{flex:1 0 auto;width:40px;font-size:14px}.dialog-footer[data-v-2aabbbe0],.dialog-footer[data-v-48c8820a]{margin-top:32px;text-align:center}.role_panel{padding:10px;border:1px solid #ebe3e3;font-size:.875rem;cursor:pointer;border-radius:4px;color:#666;transition:.2s linear}.on[data-v-0096b51c]{border:1px solid #4f7bfd;background:#4f7bfd;color:#fff}.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}.borderRight[data-v-4cff6729]{border-right:1px solid #ccc}

File diff suppressed because it is too large
+ 0 - 0
yos/css/about.4cda0a1b.css


File diff suppressed because it is too large
+ 0 - 0
yos/css/app.6e80de32.css


BIN
yos/favicon.ico


BIN
yos/fonts/element-icons.f1a45d74.ttf


BIN
yos/fonts/element-icons.ff18efd1.woff


BIN
yos/img/bg.e258adac.png


+ 0 - 1
yos/img/more.58cd973b.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><defs><style>.a{fill:none;}.b{fill:#fff;}</style></defs><g transform="translate(-262.326 -384.891)"><rect class="a" width="22" height="22" transform="translate(262.326 384.891)"/><g transform="translate(63.177 -349.635)"><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 735.525)"/><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 744.166)"/><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 752.806)"/></g></g></svg>

+ 0 - 1
yos/img/work_station.550df9c4.svg

@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><defs><style>.a{fill:none;}.b{fill:#fff;}</style></defs><g transform="translate(80 -466)"><rect class="a" width="30" height="30" transform="translate(-80 466)"/><path class="b" d="M86.087,724.24l-4.151,4.15a2.607,2.607,0,0,1-3.688,0L74.1,724.24a2.608,2.608,0,0,1,0-3.689l4.151-4.151a2.607,2.607,0,0,1,3.688,0l4.151,4.151a2.608,2.608,0,0,1,0,3.689Zm-16.757,17.4H63.46a2.608,2.608,0,0,1-2.609-2.609v-5.87a2.609,2.609,0,0,1,2.609-2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.608,2.608,0,0,1-2.609,2.609Zm0-13.7H63.46a2.609,2.609,0,0,1-2.609-2.609v-5.87a2.608,2.608,0,0,1,2.609-2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.609,2.609,0,0,1-2.609,2.609Zm7.827,2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.608,2.608,0,0,1-2.609,2.609h-5.87a2.608,2.608,0,0,1-2.609-2.609v-5.87a2.609,2.609,0,0,1,2.609-2.609Zm0,0" transform="translate(-138.851 -247.636)"/></g></svg>

+ 0 - 1
yos/index.html

@@ -1 +0,0 @@
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.c9090366.js"></script><script defer="defer" type="module" src="js/app.355d6dd4.js"></script><link href="css/app.6e80de32.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.7ae3c426.js" nomodule></script><script defer="defer" src="js/app-legacy.aefdb83c.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because it is too large
+ 0 - 0
yos/js/250.748d9d27.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/380-legacy.9e5898f1.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/628-legacy.6fd929cd.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/628.8b846ef5.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/about-legacy.b0124e2e.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/about.8ef2253b.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/app-legacy.aefdb83c.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/app.355d6dd4.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/chunk-vendors-legacy.7ae3c426.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/chunk-vendors.c9090366.js


Some files were not shown because too many files changed in this diff