关于-功能联调

main
ysn 2 days ago
parent 5c83ec6c85
commit 0378107f8e
  1. 16
      src/api/login.js
  2. 34
      src/layout/components/AboutDialog.vue
  3. 11
      src/layout/components/Navbar.vue

@ -66,3 +66,19 @@ export function getCommonConfigOptions(data) {
data: data
})
}
// 用户状态列表
export function postUserStateList() {
return request({
url: '/users/ops/state/list',
method: 'post',
data: {}
})
}
// 版本更新
export function postCommonCheckVersion(data) {
return request({
url: '/common/check/version',
method: 'post',
data: data
})
}

@ -18,7 +18,7 @@
</div>
<div class="button-group">
<el-button type="primary" class="green-btn" @click="checkUpdate">
版本更新
当前为最新版本
</el-button>
<el-button type="primary" class="green-btn" @click="confirm">
确定
@ -51,30 +51,32 @@
</template>
<script>
import { postCommonCheckVersion } from "@/api/login";
export default {
name: "AboutDialog",
props: {
visible: {
type: Boolean,
default: false,
},
},
watch: {
visible(newVal) {
if (newVal) {
//
}
},
data() {
return {
visible: false,
};
},
methods: {
show() {
this.visible = true;
},
checkUpdate() {
this.$message.info("正在检查更新...");
postCommonCheckVersion({
system: "",
version: "V01.01.16",
}).then((res) => {
this.$message.success("当前版本为最新版本");
this.visible = false;
});
},
confirm() {
this.$emit("update:visible", false);
this.visible = false;
},
handleClose() {
this.$emit("update:visible", false);
this.visible = false;
},
},
};

@ -77,9 +77,9 @@
<!-- <el-dropdown-item @click.native="setLayout" v-if="setting" icon="el-icon-setting">
<span>布局设置</span>
</el-dropdown-item> -->
<el-dropdown-item @click.native="lockScreen" icon="el-icon-lock">
<!-- <el-dropdown-item @click.native="lockScreen" icon="el-icon-lock">
<span>锁定屏幕</span>
</el-dropdown-item>
</el-dropdown-item> -->
<el-dropdown-item
@click.native="showSystemSetting = true"
icon="el-icon-setting"
@ -87,7 +87,7 @@
<span>系统设置</span>
</el-dropdown-item>
<el-dropdown-item
@click.native="showAbout = true"
@click.native="handleAboutClick"
icon="el-icon-warning-outline"
>
<span>关于</span>
@ -111,7 +111,7 @@
<!-- 系统设置弹窗 -->
<SystemSettingDialog :visible="showSystemSetting" />
<!-- 关于弹窗 -->
<AboutDialog :visible="showAbout" />
<AboutDialog ref="aboutDialogRef" />
</div>
</template>
@ -207,6 +207,9 @@ export default {
this.$router.push("/lock");
});
},
handleAboutClick() {
this.$refs.aboutDialogRef.show();
},
logout(title) {
this.$confirm(title, "提示", {
confirmButtonText: "确定",

Loading…
Cancel
Save