|
@@ -70,6 +70,14 @@
|
|
|
circle
|
|
|
@click="editAlert(scope.row)"
|
|
|
/>
|
|
|
+ <el-button
|
|
|
+ v-if="checkPermission(['admin/user/editUser'])"
|
|
|
+ type="warning"
|
|
|
+ icon="el-icon-key"
|
|
|
+ size="mini"
|
|
|
+ circle
|
|
|
+ @click="onChangePassword(scope.row)"
|
|
|
+ />
|
|
|
<el-button
|
|
|
v-if="checkPermission(['admin/user/delUser'])"
|
|
|
slot="reference"
|
|
@@ -102,7 +110,7 @@
|
|
|
<el-form-item label="工号">
|
|
|
<el-input v-model="alertForm.name" placeholder="工号" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="密码">
|
|
|
+ <el-form-item v-if="dialogStatus === 'create'" label="密码">
|
|
|
<el-input v-model="alertForm.pwd" :type="passwordType" placeholder="密码">
|
|
|
<i
|
|
|
slot="suffix"
|
|
@@ -156,14 +164,20 @@
|
|
|
<el-button v-else type="primary" @click="editSubmit">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <!-- 修改密码 -->
|
|
|
+ <PasswordDialogVue v-if="pwdData.bSwitch" :data="pwdData" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { addUser, userGroup, userList, delUser, editUser } from '@/api/user'
|
|
|
import { getDeportmentList } from '@/api/admin'
|
|
|
+import PasswordDialogVue from './components/PasswordDialog.vue'
|
|
|
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ PasswordDialogVue
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
listCount: 0,
|
|
@@ -212,7 +226,11 @@ export default {
|
|
|
},
|
|
|
count: 0,
|
|
|
groupList: [],
|
|
|
- deportments: []
|
|
|
+ deportments: [],
|
|
|
+ pwdData: {
|
|
|
+ bSwitch: false,
|
|
|
+ row: {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -341,6 +359,10 @@ export default {
|
|
|
this.getList()
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ onChangePassword(row) {
|
|
|
+ this.pwdData.row = row
|
|
|
+ this.pwdData.bSwitch = true
|
|
|
}
|
|
|
}
|
|
|
}
|