关于-功能联调

main
ysn 3 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 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>
<div class="button-group"> <div class="button-group">
<el-button type="primary" class="green-btn" @click="checkUpdate"> <el-button type="primary" class="green-btn" @click="checkUpdate">
版本更新 当前为最新版本
</el-button> </el-button>
<el-button type="primary" class="green-btn" @click="confirm"> <el-button type="primary" class="green-btn" @click="confirm">
确定 确定
@ -51,30 +51,32 @@
</template> </template>
<script> <script>
import { postCommonCheckVersion } from "@/api/login";
export default { export default {
name: "AboutDialog", name: "AboutDialog",
props: { data() {
visible: { return {
type: Boolean, visible: false,
default: false, };
},
},
watch: {
visible(newVal) {
if (newVal) {
//
}
},
}, },
methods: { methods: {
show() {
this.visible = true;
},
checkUpdate() { checkUpdate() {
this.$message.info("正在检查更新..."); postCommonCheckVersion({
system: "",
version: "V01.01.16",
}).then((res) => {
this.$message.success("当前版本为最新版本");
this.visible = false;
});
}, },
confirm() { confirm() {
this.$emit("update:visible", false); this.visible = false;
}, },
handleClose() { 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"> <!-- <el-dropdown-item @click.native="setLayout" v-if="setting" icon="el-icon-setting">
<span>布局设置</span> <span>布局设置</span>
</el-dropdown-item> --> </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> <span>锁定屏幕</span>
</el-dropdown-item> </el-dropdown-item> -->
<el-dropdown-item <el-dropdown-item
@click.native="showSystemSetting = true" @click.native="showSystemSetting = true"
icon="el-icon-setting" icon="el-icon-setting"
@ -87,7 +87,7 @@
<span>系统设置</span> <span>系统设置</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
@click.native="showAbout = true" @click.native="handleAboutClick"
icon="el-icon-warning-outline" icon="el-icon-warning-outline"
> >
<span>关于</span> <span>关于</span>
@ -111,7 +111,7 @@
<!-- 系统设置弹窗 --> <!-- 系统设置弹窗 -->
<SystemSettingDialog :visible="showSystemSetting" /> <SystemSettingDialog :visible="showSystemSetting" />
<!-- 关于弹窗 --> <!-- 关于弹窗 -->
<AboutDialog :visible="showAbout" /> <AboutDialog ref="aboutDialogRef" />
</div> </div>
</template> </template>
@ -207,6 +207,9 @@ export default {
this.$router.push("/lock"); this.$router.push("/lock");
}); });
}, },
handleAboutClick() {
this.$refs.aboutDialogRef.show();
},
logout(title) { logout(title) {
this.$confirm(title, "提示", { this.$confirm(title, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

Loading…
Cancel
Save