licp
2024-08-10 41c2f79abd464e6c063166d680b51f746d6f0456
src/view/index.vue
@@ -394,6 +394,7 @@
      </span>
    </el-dialog>
    <notice ref="notice" @goNoticeDetail="checkForUnreadData()" />
    <timer></timer>
   </div>
</template>
@@ -411,9 +412,10 @@
   import menus from '../../static/js/menu.js'
   import nullFace from '../view/404.vue'
  import notice from './notice.vue'
  import timer from './timer.vue';
   comObj['nullFace'] = nullFace
   export default {
      components: {...comObj,notice},
      components: {...comObj,notice,timer},
      data() {
         return {
            userName: "value",
@@ -435,6 +437,15 @@
      },
      created() {
         this.menu = menus.menu
      if (this.PROJECT !== '装备电缆') { // 检测中心暂无'原材料检验下单'功能
        const index = this.menu.findIndex(item => item.v === '业务管理')
        if (index > -1) {
          const index2 = this.menu[index].c.findIndex(obj => obj.v === '原材料检验下单')
          if (index2 > -1) {
            this.menu[index].c.splice(index2, 1)
          }
        }
      }
      },
      mounted() {
         this.userName = JSON.parse(localStorage.getItem("user")).name;
@@ -600,13 +611,21 @@
        this.editVisible = true;
      },
      handleEdit(){
        const reg2 =
          /^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?\d)(?=.*?[~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?])[a-zA-Z\d~!#@$%^*&()_+{}\[\]|\\;:'",<.>\/?]*$/;
        if (!this.query.oldPassword) {
          this.$message.error('请填写旧密码')
          return
        }else if (!reg2.test(this.query.oldPassword)) {
          this.$message.error('密码必须包括数字、大小写字母以及特殊字符')
            return
        }
        if (!this.query.newPassWord) {
          this.$message.error('请填写旧密码')
          return
        }else if (!reg2.test(this.query.newPassWord)) {
          this.$message.error('密码必须包括数字、大小写字母以及特殊字符')
            return
        }
        this.$axios.post(this.$api.user.upUserPassword, {...this.query}).then(res => {
            if (res.code == 201) {