浏览代码

登录后修改密码提示

sangwenwei 1 年之前
父节点
当前提交
4f979ea9a3

+ 2 - 1
src/views/dashboard/index.vue

@@ -26,7 +26,8 @@ export default {
 			pageLoading: true,
 			pageLoading: true,
 		};
 		};
 	},
 	},
-	mounted() {},
+	mounted() {
+	},
 	methods: {
 	methods: {
 		onMounted() {
 		onMounted() {
 			this.pageLoading = false;
 			this.pageLoading = false;

+ 8 - 15
src/views/dashboard/widgets/components/TodoList.vue

@@ -1,5 +1,4 @@
 <template>
 <template>
-	<div>
 	<el-card class="box-card">
 	<el-card class="box-card">
 		<template #header>
 		<template #header>
 			<div class="card-header">
 			<div class="card-header">
@@ -153,9 +152,7 @@
 		></flow-chart>
 		></flow-chart>
 	</v-dialog>
 	</v-dialog>
 
 
-		<UpdatePassword :innerVisible="innerVisible" v-on:innerDialog="getInnerStatus($event)"></UpdatePassword>
-
-	</div>
+	<UpdatePassword :innerVisible="innerVisible" v-on:innerDialog="getInnerStatus($event)"></UpdatePassword>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -187,12 +184,10 @@
 				currentTask: null,
 				currentTask: null,
 				processInstanceId: "",
 				processInstanceId: "",
 				timer: null,
 				timer: null,
-				innerVisible:true
 			};
 			};
 		},
 		},
 		mounted() {
 		mounted() {
 
 
-			// this.$refs.updatePassword.test()
 			// 页面加载后
 			// 页面加载后
 			// 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
 			// 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
 			// 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
 			// 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
@@ -202,28 +197,26 @@
 			}, 60000)
 			}, 60000)
 
 
 
 
+		},
+		created(){
+			// 判断当前用户是否为管理员
 			userService.is().then((data) => {
 			userService.is().then((data) => {
 				console.log('是否为管理员', data)
 				console.log('是否为管理员', data)
-				// this.$router.replace({
-				// 	path:"/UpdataPassword.vue"
-				// })
 				if (!data) {
 				if (!data) {
 					// 如果当前用户不是管理员,则判断是否修改过密码
 					// 如果当前用户不是管理员,则判断是否修改过密码
 					userService.isUpdatePassword().then((data) => {
 					userService.isUpdatePassword().then((data) => {
 						console.log('是否修改过密码', data)
 						console.log('是否修改过密码', data)
-						if (!data){
+						if (!data) {
+							console.log('是否修改过密码2',data)
 							// 如果没有修改过密码,则弹出密码修改窗口
 							// 如果没有修改过密码,则弹出密码修改窗口
 							this.innerVisible = true
 							this.innerVisible = true
-							// this.$refs.updatePassword.init(true);
-							// console.log(this.$refs.updatePassword,11111111111111111111111111)
+							// this.$refs.updatePassword.init(data)
+
 						}
 						}
 					})
 					})
 				}
 				}
 			})
 			})
 		},
 		},
-		activated(){
-
-		},
 		beforeDestroy () {
 		beforeDestroy () {
 			clearInterval(this.timer)
 			clearInterval(this.timer)
 			this.timer = null
 			this.timer = null

+ 4 - 8
src/views/home/components/TodoList2.vue

@@ -76,7 +76,8 @@
 		></flow-chart>
 		></flow-chart>
 	</v-dialog>
 	</v-dialog>
 
 
-	<UpdatePassword :innerVisible="innerVisible" v-on:innerDialog="getInnerStatus($event)"></UpdatePassword></template>
+	<UpdatePassword :innerVisible="innerVisible" v-on:innerDialog="getInnerStatus($event)"></UpdatePassword>
+</template>
 
 
 <script>
 <script>
 	// import FlowChart from '../modeler/FlowChart'
 	// import FlowChart from '../modeler/FlowChart'
@@ -84,7 +85,7 @@
 	import UserSelect from "@/components/userSelect/UserSelectDialog";
 	import UserSelect from "@/components/userSelect/UserSelectDialog";
 	import taskService from "@/api/flowable/taskService";
 	import taskService from "@/api/flowable/taskService";
 	import userService from "@/api/sys/UserService";
 	import userService from "@/api/sys/UserService";
-	import UpdatePassword from "@/views/layout/UpdatePassword.vue";
+	import UpdatePassword from "@/views/layout/UpdatePassword2.vue";
 	export default {
 	export default {
 		// title: "我的待办",
 		// title: "我的待办",
 		// icon: "wodedaiban",
 		// icon: "wodedaiban",
@@ -107,7 +108,6 @@
 				currentTask: null,
 				currentTask: null,
 				processInstanceId: "",
 				processInstanceId: "",
 				timer: null,
 				timer: null,
-				innerVisible:true
 			};
 			};
 		},
 		},
 		mounted() {
 		mounted() {
@@ -126,7 +126,7 @@
 					userService.isUpdatePassword().then((data) => {
 					userService.isUpdatePassword().then((data) => {
 						console.log('是否修改过密码', data)
 						console.log('是否修改过密码', data)
 						if (!data) {
 						if (!data) {
-							console.log('是否修改过密码2',data)
+							console.log('是否修改过密码',data)
 							// 如果没有修改过密码,则弹出密码修改窗口
 							// 如果没有修改过密码,则弹出密码修改窗口
 							this.innerVisible = true
 							this.innerVisible = true
 							// this.$refs.updatePassword.init(data)
 							// this.$refs.updatePassword.init(data)
@@ -141,10 +141,6 @@
 			clearInterval(this.timer)
 			clearInterval(this.timer)
 			this.timer = null
 			this.timer = null
 		},
 		},
-		activated() {
-
-
-		},
 		components: {
 		components: {
 			UserSelect,
 			UserSelect,
 			UpdatePassword
 			UpdatePassword

+ 2 - 25
src/views/home/index.vue

@@ -24,9 +24,6 @@
 			</el-row>
 			</el-row>
 		</div>
 		</div>
 	</div>
 	</div>
-	<UpdatePassword :innerVisible="innerVisible" v-on:innerDialog="getInnerStatus($event)"></UpdatePassword>
-
-<!--	<UpdatePassword ref="updatePassword"></UpdatePassword>-->
 </template>
 </template>
 
 
 <script>
 <script>
@@ -37,7 +34,6 @@ import PopularContent from "./components/popular-content.vue";
 import CateforiesPercent from "./components/categories-percent.vue";
 import CateforiesPercent from "./components/categories-percent.vue";
 import RecentlyVisited from "./components/recently-visited.vue";
 import RecentlyVisited from "./components/recently-visited.vue";
 import QuickOperation from "./components/quick-operation.vue";
 import QuickOperation from "./components/quick-operation.vue";
-import UpdatePassword from "@/views/layout/UpdatePassword2.vue";
 
 
 // import TodoList from './components/todoList.vue'
 // import TodoList from './components/todoList.vue'
 import Announcement from "./components/announcement.vue";
 import Announcement from "./components/announcement.vue";
@@ -47,7 +43,6 @@ import Carousel from "./components/carousel.vue";
 import Docs from "./components/docs.vue";
 import Docs from "./components/docs.vue";
 import Wx from "./components/wx.vue";
 import Wx from "./components/wx.vue";
 import Footer from "@/components/footer/index.vue";
 import Footer from "@/components/footer/index.vue";
-import userService from "@/api/sys/UserService";
 export default {
 export default {
 	name: "Dashboard", // If you want the include property of keep-alive to take effect, you must name the component
 	name: "Dashboard", // If you want the include property of keep-alive to take effect, you must name the component
 	data(){
 	data(){
@@ -70,28 +65,10 @@ export default {
 		Docs,
 		Docs,
 		Wx,
 		Wx,
 		Footer,
 		Footer,
-		UpdatePassword,
-		// updatePassword
+
 	},
 	},
 	 activated() {
 	 activated() {
-		 userService.is().then((data) => {
-			 console.log('是否为管理员', data)
-			 // this.$router.replace({
-			 // 	path:"/UpdataPassword.vue"
-			 // })
-			 if (!data) {
-				 // 如果当前用户不是管理员,则判断是否修改过密码
-				 userService.isUpdatePassword().then((data) => {
-					 console.log('是否修改过密码', data)
-					 if (!data){
-						 // 如果没有修改过密码,则弹出密码修改窗口
-						 this.innerVisible = true
-						 // this.$refs.updatePassword.init(true);
-						 // console.log(this.$refs.updatePassword,11111111111111111111111111)
-					 }
-				 })
-			 }
-		 })
+
 	},
 	},
 	methods:{
 	methods:{
 		getInnerStatus(status){
 		getInnerStatus(status){

+ 0 - 1
src/views/layout/UpdatePassword2.vue

@@ -99,7 +99,6 @@
 			handleClose(done) {
 			handleClose(done) {
 				this.$emit("innerDialog",false)
 				this.$emit("innerDialog",false)
 			},
 			},
-
 			// 初始化
 			// 初始化
 			init (showTip) {
 			init (showTip) {
 				if (this.commonJS.isNotEmpty(showTip)) {
 				if (this.commonJS.isNotEmpty(showTip)) {