230320a303 1 年之前
父節點
當前提交
312f4fd497

文件差異過大導致無法顯示
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-009e258b.6f70ed40.css → dist/static/css/chunk-c9b8d98c.6f70ed40.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.da512e3c.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.dad5dd1d.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-009e258b.e4de45f9.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-07fc91a6.2e8c0d25.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-36ef19b0.ac39c362.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-c9b8d98c.e61972d5.js


+ 3 - 0
src/api/user.js

@@ -4,6 +4,9 @@
 import { getRequest, getRequestNoSort } from '@/utils/request'
 
 export default {
+  admadminchangepwd: params => { // 后台用户 重置密码
+    return getRequest('/adm/admin/change/pwd', params)
+  },
   admwechatuserlist: params => { // 小程序 用户列表
     return getRequest('/adm/wechat/user/list', params)
   },

+ 71 - 0
src/views/user/components/popup/PwdReset.vue

@@ -0,0 +1,71 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.nickname + '-重置密码'"
+      :fullscreen="false"
+      width="400px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  components: { },
+  props: {
+    curObj: Object,
+    isShow: Boolean,
+  },
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.formData = [
+          { label: '新密码', key: 'new_pwd'},
+          { label: '再输一遍', key: 'repeat_pwd'},
+        ]
+      }
+    },
+  },
+  methods: {
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            let newForm = { ...oldform }
+            newForm.id = this.curObj.id
+            this.$api.user.admadminchangepwd(newForm).then(res => {
+              this.$msg('修改成功~')
+            })
+            this.$emit('close', newForm)
+          }
+        })
+      } else {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 23 - 0
src/views/user/index.vue

@@ -21,12 +21,18 @@
       :curObj="curObj"
       @close="closePopup"
     />
+    <pwd-reset
+      :isShow="isPrShow"
+      :curObj="curObj"
+      @close="closePrPopup"
+    />
   </div>
 </template>
 <script>
 import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import PopupEdit from './components/popup/IndexEdit'
+import PwdReset from './components/popup/PwdReset'
 import baseTable from '_m/baseTable.js'
 import xData from './mixin'
 export default {
@@ -34,6 +40,7 @@ export default {
   components: {
     SearchForm,
     PopupEdit,
+    PwdReset,
   },
   provide() {
     return {
@@ -46,6 +53,7 @@ export default {
       apiStr: 'user.admadminlist',
       searchForm: null,
       isDtlShow: false,
+      isPrShow: false,
       curObj: {},
       ...xData
     }
@@ -73,6 +81,7 @@ export default {
         { label: '操作', width: 200, type: 'handle2', operations:
           [
             { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '重置密码', func: this.openPrPopup, btnType: 'success' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }
@@ -113,6 +122,20 @@ export default {
       } else {
         this.isDtlShow = false
       }
+    },
+    openPrPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isPrShow = true
+    },
+    closePrPopup(obj) {
+      this.isPrShow = false
+      if (obj) {
+        this.fetchData()
+      }
     }
   }
 }

部分文件因文件數量過多而無法顯示