zhuliu 9 місяців тому
батько
коміт
ff210f8a9d

+ 1 - 1
src/assets/css/layout.less

@@ -127,6 +127,6 @@
 }
 
 .notify_overlap{
-  bottom: 16px !important;
+  bottom: 35px !important;
   cursor: pointer;
 }

+ 16 - 7
src/views/backStageManage/layout/Layout.vue

@@ -41,7 +41,9 @@ export default {
         mobile: this.device === 'mobile'
       }
     },
-
+    userinfo(){
+      return this.$store.getters.userinfo
+    }
   },
   created(){
     this.showMessage()
@@ -59,8 +61,13 @@ export default {
         return
       }
       sessionStorage.setItem('showMessage',true)
-      this.expirationNotice()
-      this.taskReminder()
+      setTimeout(()=>{
+        this.expirationNotice()
+      },1000)
+      setTimeout(()=>{
+        this.taskReminder()
+      },2000)
+      
       
     },
     //到期通知
@@ -76,7 +83,7 @@ export default {
           var html = `<div>您所在企业下有<span style="color:red;">${num}</span>个账号即将到期,具体详情请点击前往人员管理查看<div>`
           var that = this
           var message = this.$notify({
-            title: '到期通知',
+            title: '即将到期提醒',
             dangerouslyUseHTMLString: true,
             message: html,
             duration:0,
@@ -86,9 +93,11 @@ export default {
               message.close()
               that.$router.push(
                 {
-                  path:'/administrator/personnel',
-                  query:{
-
+                  // path:'/administrator/personnel',
+                  name:'Administrator_personnel',
+                  params:{
+                    tenant:this.userinfo.tenantId,
+                    expitrDays:'0'
                   }
                 }
               )

+ 96 - 5
src/views/backStageManage/organization/personnel/components/personnel.vue

@@ -17,6 +17,20 @@
 					</el-option>
 				</el-select>
               </el-form-item>
+              <el-form-item label="到期时间:">
+                <el-date-picker
+                    v-model="queryParams.expitrTime"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="请选择到日期">
+                </el-date-picker>
+              </el-form-item>
+              <el-form-item label="到期范围:">
+                <el-select v-model="queryParams.expitrDays" clearable placeholder="请选择">
+                    <el-option label="自定义" value="-100" @click.native.stop="addOption('expitrDays',defaultExpitrDays)"></el-option>
+                    <el-option  v-for="(item,key) in defaultExpitrDays"  :key="key" :label="item" :value="key"></el-option>
+                </el-select>
+              </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -103,17 +117,47 @@
             </el-pagination>
         </el-footer>
       </el-container>
+
+
+      <el-dialog
+        title="自定义"
+        :visible.sync="addOptionMessage.visible"
+        width="300px"
+        :append-to-body="true" 
+        :close-on-click-modal="false"
+        custom-class="expitrDays"
+        @close="handleClose">
+        <el-input-number
+            v-model="addOptionMessage.value"
+            :min="1"
+            controls-position="right"
+            size="small"></el-input-number>
+            <span>天内到期</span>
+        <span slot="footer" class="dialog-footer">
+            <el-button size="mini" @click="handleClose">取消</el-button>
+            <el-button type="primary" size="mini" @click="confirmInput">确定</el-button>
+        </span>
+        </el-dialog>
     </div>
 </template>
   
 <script>
 const defaultSearchForm = {
     name:'',
-    tenant:''
+    tenant:'',
+    expitrDays:null,
+    expitrTime:null,
 }
 export default {
     components: {},
-    props: {},
+    props: {
+        searchQuery:{
+            type:Object,
+            default:()=>{
+                return {}
+            }
+        }
+    },
     data() {
         return {
             // 遮罩层
@@ -128,10 +172,19 @@ export default {
                 size: 10,
                 departmentIds:[],
                 positionIds:[],
-                ...defaultSearchForm
+                ...defaultSearchForm,
+                ...this.searchQuery,
             },
             editMessage:{
                 loading:false
+            },
+            addOptionMessage:{
+                visible:false,
+                value:1
+            },
+            defaultExpitrDays:{
+                0:'即将到期',
+                '-1':'已到期',
             }
         };
     },
@@ -147,7 +200,30 @@ export default {
         this.getTenantList();
     },
     methods: {
-        
+        //下拉框添加选项
+        addOption(field,data){
+            this.$set(this.queryParams,field,null)
+            this.addOptionMessage={
+                value : 1,
+                visible:true,
+                field:field,
+                data:data
+            }
+        },
+        handleClose(){
+            this.addOptionMessage={
+                value : 1,
+                visible:false
+            }
+        },
+        confirmInput(){
+            if(!this.addOptionMessage.data[this.addOptionMessage.value]){
+                this.addOptionMessage.data[this.addOptionMessage.value] = this.addOptionMessage.value + '天内到期'
+            }
+            this.$set(this.queryParams,this.addOptionMessage.field,this.addOptionMessage.value+'')
+            this.handleClose()
+        },
+        //添加编辑信息
         addEditMessage(field,data){
             this.$set(this.editMessage,field,data)
         },  
@@ -183,7 +259,7 @@ export default {
             }else{
                 remainDays = Math.ceil((endTime - now) / dataTime)
             }
-            var maxDay = 20
+            var maxDay = 30
             if(remainDays == '已过期' || remainDays<=maxDay){
                 if(remainDays == '已过期'){
                     return `<span style="color:red">${remainDays}</span>`
@@ -300,6 +376,21 @@ export default {
     },
 };
 </script>
+<style lang="scss">
+.expitrDays{
+    height: 160px;
+    position: absolute;
+    inset: 0;
+    margin: auto !important;
+    .el-dialog__body{
+        padding: 10px;
+        font-size: 16px;
+        &>span{
+            margin-left:10px;
+        }
+    }
+}
+</style>
 <style lang="scss" scoped>
 .header{
     width: 100%;

+ 6 - 2
src/views/backStageManage/organization/personnel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="height_100">
-    <personnel></personnel>
+    <personnel :searchQuery="searchQuery"></personnel>
   </div>
 </template>
 
@@ -16,7 +16,11 @@ export default {
     };
   },
   watch: {},
-  computed: {},
+  computed: {
+    searchQuery(){
+        return this.$route.params
+    }
+  },
   created() {},
   mounted() {},
   methods: {},

+ 6 - 1
src/views/register/index.vue

@@ -51,7 +51,7 @@
           </el-form>
         </div>
         <div class="content_btn">
-          <el-button type="primary" size="small" @click="submit">注册</el-button>
+          <el-button type="primary" :loading="btnLoading" size="small" @click="submit">注册</el-button>
         </div>
     </div>
     <div class="copyright">
@@ -69,6 +69,7 @@ export default {
       qiaoBiVipType:[],
       form:{},
       phoneCodeText:'获取验证码',
+      btnLoading:false,
       rules:{
         phoneNum: [
           { required: true, message: "请输入手机号码", trigger: "blur" },
@@ -171,9 +172,11 @@ export default {
           if(this.invitationCode){
             this.form.inviteCode = this.invitationCode
           }
+          this.btnLoading  =true
           this.$api.personnelSignUp(this.form).then(response=>{
             if(response.code == 200){
               this.$message.success('注册成功')
+              this.btnLoading = false
               this.$router.replace(
                 {
                   path:'/home',
@@ -182,6 +185,8 @@ export default {
             }else{
               this.$message.error(response.message)
             }
+          }).catch(error=>{
+            this.btnLoading = false
           })
           
         }else {