优化页面样式
This commit is contained in:
parent
33f6069fea
commit
80df6d082d
|
|
@ -1,28 +1,105 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<theme-picker />
|
||||
</div>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<theme-picker />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ThemePicker from "@/components/ThemePicker";
|
||||
import ThemePicker from '@/components/ThemePicker'
|
||||
import { getHomeNoticeApi, setQueryNoticeApi } from '@/api/system/notice.js'
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: { ThemePicker },
|
||||
name: 'App',
|
||||
components: { ThemePicker },
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
||||
titleTemplate: title => {
|
||||
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
||||
}
|
||||
title:
|
||||
this.$store.state.settings.dynamicTitle &&
|
||||
this.$store.state.settings.title,
|
||||
titleTemplate: (title) => {
|
||||
return title
|
||||
? `${title} - ${process.env.VUE_APP_TITLE}`
|
||||
: process.env.VUE_APP_TITLE
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
notifyPromise: Promise.resolve(),
|
||||
whiteList: [
|
||||
'/login',
|
||||
'/register',
|
||||
'/auth/sendCode',
|
||||
'/qrCode/qrCodePage',
|
||||
],
|
||||
isWindowRefresh: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// window.addEventListener('beforeunload', this.handleBeforeUnload)
|
||||
// if (this.isWindowRefresh) {
|
||||
// this.getHomeNoticeFun()
|
||||
// }
|
||||
},
|
||||
|
||||
updated() {
|
||||
// if (!this.isWindowRefresh) {
|
||||
// this.getHomeNoticeFun()
|
||||
// }
|
||||
},
|
||||
|
||||
methods: {
|
||||
async getHomeNoticeFun() {
|
||||
const urlHref = window.location.href
|
||||
const isWhite = this.whiteList.some((e) => urlHref.indexOf(e) > 1)
|
||||
|
||||
if (isWhite) {
|
||||
return
|
||||
}
|
||||
const res = await getHomeNoticeApi()
|
||||
if (res.code == 200) {
|
||||
res.data.forEach((item) => {
|
||||
this.notifyPromise = this.notifyPromise.then(() => {
|
||||
this.$notify({
|
||||
title: `通知公告`,
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: `${item.noticeContent}`,
|
||||
duration: 0,
|
||||
onClose: async () => {
|
||||
const params = {
|
||||
noticeId: item.noticeId,
|
||||
userId: sessionStorage.getItem('userId'),
|
||||
}
|
||||
const res = await setQueryNoticeApi(params)
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleBeforeUnload() {
|
||||
this.isWindowRefresh = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
<style scoped >
|
||||
#app .theme-picker {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.el-notification {
|
||||
width: 440px;
|
||||
}
|
||||
.el-notification__title {
|
||||
font-size: 18px;
|
||||
}
|
||||
.el-notification__content {
|
||||
margin: 15px 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -41,4 +41,20 @@ export function delNotice(noticeId) {
|
|||
url: '/system/notice/' + noticeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 首页公告查询
|
||||
export function getHomeNoticeApi() {
|
||||
return request({
|
||||
url: '/system/notice/getList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 首页公告关闭时通知后台 下次登录将不会提醒
|
||||
export function setQueryNoticeApi(data) {
|
||||
return request({
|
||||
url: '/system/notice/addUserId',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
@ -100,8 +100,6 @@
|
|||
v-model="queryParams.phone"
|
||||
placeholder="请输入退料人电话"
|
||||
clearable
|
||||
maxlength="11"
|
||||
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -429,10 +427,15 @@ export default {
|
|||
{
|
||||
required: true,
|
||||
message: '请输入退料人手机号',
|
||||
trigger: 'change',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ validator: validatePhone, trigger: 'blur' },
|
||||
{ min: 11, message: '手机号不足11位', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
// { validator: validatePhone, trigger: 'blur' },
|
||||
// { min: 11, message: '手机号不足11位', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
unitList: [], //单位 集合
|
||||
|
|
|
|||
|
|
@ -224,7 +224,10 @@
|
|||
@click="handleReturn(scope.row, 'see')"
|
||||
icon="el-icon-d-arrow-right"
|
||||
v-hasPermi="['return:receive:handler']"
|
||||
v-if="scope.row.taskStatus != '40'"
|
||||
v-if="
|
||||
scope.row.taskStatus == 38 ||
|
||||
scope.row.taskStatus == 39
|
||||
"
|
||||
>
|
||||
退料
|
||||
</el-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue