企业微信消息和oa待办
This commit is contained in:
@@ -482,7 +482,8 @@
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
height: 100%;
|
||||
max-width: 310px;
|
||||
/* 用户区按完整姓名、账号及操作按钮的实际宽度布局,避免退出按钮溢出后被顶栏裁切。 */
|
||||
width: max-content;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -618,6 +619,26 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 常见笔记本宽度下压缩导航留白,为完整用户信息与退出按钮腾出空间。 */
|
||||
@media (min-width: 1025px) and (max-width: 1440px) {
|
||||
.v4-nav {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.v4-nav-item {
|
||||
padding: 0 8px;
|
||||
column-gap: 6px;
|
||||
}
|
||||
|
||||
.v4-user-section {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.v4-user-info {
|
||||
padding: 0 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.v4-nav {
|
||||
gap: 24px;
|
||||
|
||||
@@ -342,7 +342,6 @@ layout("/layouts/platform.html"){
|
||||
officialCapacity: [{required: true, message: '请填写职称', trigger: ['blur', 'change']}],
|
||||
subsidyStandards: [{required: true, message: '请选择困难类型', trigger: ['blur', 'change']}],
|
||||
reason: [{required: true, message: '请填写申请原因', trigger: ['blur', 'change']}],
|
||||
sign: [{required: true, message: '请签字', trigger: ['blur', 'change']}]
|
||||
},
|
||||
|
||||
// 替他人申请相关
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
<div id="app">
|
||||
<div class="condolence-list-page">
|
||||
<van-nav-bar title="分工会主席审批" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
<van-nav-bar title="校工会主席审批" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="condolence-list-sticky">
|
||||
|
||||
+26
-9
@@ -9,7 +9,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="difficult-help-approval-page">
|
||||
<van-nav-bar title="帮扶分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="校工会办公室主任审批" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="difficult-help-approval-sticky">
|
||||
<van-search
|
||||
@@ -29,7 +29,7 @@ layout("/layouts/platform_h5.html"){
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
v-if="filterUserReady && $auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:options="unionList"
|
||||
@change="unionChange"
|
||||
@open="onFilterOpen"
|
||||
@@ -37,7 +37,7 @@ layout("/layouts/platform_h5.html"){
|
||||
v-model="pageForm.unionId">
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
v-if="filterUserReady && $auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:options="unitList"
|
||||
@change="doSearch"
|
||||
@open="onFilterOpen"
|
||||
@@ -228,6 +228,14 @@ layout("/layouts/platform_h5.html"){
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
computed: {
|
||||
// 首次进入时用户接口可能尚未返回;非管理员还需所属工会,避免空对象报错或请求全部工会。
|
||||
filterUserReady() {
|
||||
const user = this.$store.state.user
|
||||
if (!user || !Array.isArray(user.roles)) return false
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"]) || !!(user.union && user.union.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
@@ -419,13 +427,22 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// 先订阅弹框状态,工会加载异常也不能阻断等级选择器与确认框的打开、返回。
|
||||
if (window.h5HistoryLayerManager) {
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm"))
|
||||
this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker"))
|
||||
}))
|
||||
}
|
||||
this.initLevelDict()
|
||||
this.initUnion().then(() => this.flushUnits())
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.$set(this, "confirmVisible", stack.includes("difficult-help-action-confirm"))
|
||||
this.$set(this, "showLevelPicker", stack.includes("difficult-help-level-picker"))
|
||||
}))
|
||||
// 缓存已就绪时立即加载,否则等待用户接口回填;只初始化一次,避免重置已选筛选条件。
|
||||
// $watch 由当前 Vue 实例管理,页面销毁时自动注销。
|
||||
let filtersInitialized = false
|
||||
this.$watch("filterUserReady", (ready) => {
|
||||
if (!ready || filtersInitialized) return
|
||||
filtersInitialized = true
|
||||
this.initUnion().then(() => this.flushUnits())
|
||||
}, {immediate: true})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (typeof this.historyLayerUnsubscribe === "function") this.historyLayerUnsubscribe()
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="difficult-help-approval-page">
|
||||
<van-nav-bar title="帮扶校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="分管校领导审批" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="difficult-help-approval-sticky">
|
||||
<van-search
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="difficult-help-approval-page">
|
||||
<van-nav-bar title="帮扶二级党组织审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="校工会主席审批" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="difficult-help-approval-sticky">
|
||||
<van-search
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
const apps = {
|
||||
// 从“我的工具”进入时指定分类名称;空值表示恢复应用中心原有浏览状态。
|
||||
props: {
|
||||
initialCategoryName: {type: String, default: ""}
|
||||
},
|
||||
template: /*language=HTML*/ `
|
||||
<div class="apps-container">
|
||||
<van-nav-bar title="应用中心" placeholder fixed></van-nav-bar>
|
||||
@@ -201,7 +205,8 @@ const apps = {
|
||||
},
|
||||
mounted() {
|
||||
// 动态分类加载完成后再恢复分类,避免把缓存的动态分类误判为“全部应用”
|
||||
this.restoreAppsState()
|
||||
// 指定入口不恢复旧搜索词、滚动位置及子菜单弹框,避免目标分类被旧状态遮挡。
|
||||
if (!this.initialCategoryName) this.restoreAppsState()
|
||||
this.loadCategories().finally(() => {
|
||||
this.restoreActiveCategory()
|
||||
this.loadApps()
|
||||
@@ -249,6 +254,13 @@ const apps = {
|
||||
},
|
||||
|
||||
restoreActiveCategory() {
|
||||
// 动态分类返回后按名称定位;未配置或无可用分类时明确提示,并展示全部应用。
|
||||
if (this.initialCategoryName) {
|
||||
const targetIndex = this.allCategories.findIndex(item => item.name === this.initialCategoryName)
|
||||
this.$set(this, "activeTab", targetIndex >= 0 ? targetIndex : 0)
|
||||
if (targetIndex < 0) this.$toast("未找到“" + this.initialCategoryName + "”分类")
|
||||
return
|
||||
}
|
||||
const index = this.allCategories.findIndex(item => String(item.id) === String(this.cachedCategoryId))
|
||||
this.activeTab = index >= 0 ? index : 0
|
||||
},
|
||||
|
||||
@@ -73,7 +73,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<todo v-if="homeTabbarActive === 'todo'" @todo-count-change="updateTodoCount"></todo>
|
||||
<work v-if="homeTabbarActive === 'work'"></work>
|
||||
<mine v-if="homeTabbarActive === 'mine'" @switch-tab="switchHomeTab"></mine>
|
||||
<apps v-if="homeTabbarActive === 'apps'"></apps>
|
||||
<apps v-if="homeTabbarActive === 'apps'" :initial-category-name="appsCategoryName"></apps>
|
||||
<msg v-if="homeTabbarActive === 'msg'" @unread-count-change="updateUnreadMessageCount"></msg>
|
||||
</div>
|
||||
|
||||
@@ -111,19 +111,25 @@ layout("/layouts/platform_h5.html"){
|
||||
data() {
|
||||
return {
|
||||
homeTabbarActive: "home",
|
||||
appsCategoryName: "",
|
||||
todoCount: 0,
|
||||
unreadMessageCount: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
homeTabbarChange(val) {
|
||||
// 普通页签切换沿用应用页缓存,不保留工具入口指定的分类。
|
||||
this.$set(this, "appsCategoryName", "")
|
||||
this.$store.commit("setActiveTarBar", val)
|
||||
},
|
||||
switchHomeTab(val) {
|
||||
this.homeTabbarActive = val
|
||||
// categoryName 来自“我的工具”,先传分类再挂载应用页,避免读取上一次的分类缓存。
|
||||
switchHomeTab(val, categoryName = "") {
|
||||
this.$set(this, "appsCategoryName", val === "apps" ? categoryName : "")
|
||||
this.$set(this, "homeTabbarActive", val)
|
||||
this.$store.commit("setActiveTarBar", val)
|
||||
},
|
||||
moduleClick(val) {
|
||||
this.$set(this, "appsCategoryName", "")
|
||||
this.homeTabbarActive = "apps"
|
||||
this.$store.commit("setActiveTarBar", "apps")
|
||||
},
|
||||
|
||||
@@ -74,22 +74,23 @@ const mine = {
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>我的签名</span>
|
||||
</button>
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps')">
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps', '我的收藏')">
|
||||
<van-icon name="star-o"></van-icon>
|
||||
<span>我的收藏</span>
|
||||
</button>
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps')">
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps', '职工福利')">
|
||||
<van-icon name="gift-o"></van-icon>
|
||||
<span>福利中心</span>
|
||||
</button>
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps')">
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps', '活动管理')">
|
||||
<van-icon name="calendar-o"></van-icon>
|
||||
<span>活动报名</span>
|
||||
</button>
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps')">
|
||||
<button type="button" class="mine-grid-item" @click="$pjaxReplace('/platform/h5/qsv')">
|
||||
<van-icon name="completed-o"></van-icon>
|
||||
<span>问卷调查</span>
|
||||
</button>
|
||||
<!-- 暂不开放设置中心和帮助中心,保留入口模板便于恢复。
|
||||
<button type="button" class="mine-grid-item" @click="switchTab('apps')">
|
||||
<van-icon name="setting-o"></van-icon>
|
||||
<span>设置中心</span>
|
||||
@@ -98,6 +99,7 @@ const mine = {
|
||||
<van-icon name="question-o"></van-icon>
|
||||
<span>帮助中心</span>
|
||||
</button>
|
||||
-->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -150,9 +152,10 @@ const mine = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchTab(tab) {
|
||||
// tab 为底部页签,categoryName 为可选应用分类名称;通过事件交给首页切换并定位分类。
|
||||
switchTab(tab, categoryName = "") {
|
||||
this.$store.commit("setActiveTarBar", tab)
|
||||
this.$emit("switch-tab", tab)
|
||||
this.$emit("switch-tab", tab, categoryName)
|
||||
},
|
||||
logout() {
|
||||
this.$dialog
|
||||
|
||||
Reference in New Issue
Block a user