Commit c8e0abff authored by 刘怀志's avatar 刘怀志

feat(全局): 消息详情 header修改

parent 0fa34874
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
}, },
leftIconOne, leftIconOne,
leftIconTwo, leftIconTwo,
targetId: '',
queryNotice: { queryNotice: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -132,10 +133,23 @@ export default { ...@@ -132,10 +133,23 @@ export default {
} }
}, },
created() { created() {
this.getList()
}, },
mounted() { async mounted() {
await this.getList();
this.loadData() this.loadData()
// 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1];
if (queryString) {
console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法
const params = new URLSearchParams(queryString);
const queryObject = {};
for (const [key, value] of params.entries()) {
queryObject[key] = value;
}
this.targetId = queryObject.targetId;
this.showOneMessage()
}
}, },
computed: { computed: {
// 计算属性 // 计算属性
...@@ -146,6 +160,13 @@ export default { ...@@ -146,6 +160,13 @@ export default {
}, },
}, },
methods: { methods: {
async showOneMessage() {
const res = await queryInstanceListAeByPage({instanceId: this.targetId})
const tempData = res.data.records.length > 0 ? res.data.records[0] : null
if (tempData) {
this.goDetail(tempData.businessId,tempData.processType,tempData.status === '10' && tempData.allowApprove)
}
},
goDetail (processId,processType,status) { goDetail (processId,processType,status) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/approval_detail/baseDetail?processId=${processId}&isView=0&status=${status}&processType=${processType}&label=${this.getLabelByValue(this.tableUserFormList, processType)}` url: `/pages/approval_detail/baseDetail?processId=${processId}&isView=0&status=${status}&processType=${processType}&label=${this.getLabelByValue(this.tableUserFormList, processType)}`
...@@ -159,18 +180,20 @@ export default { ...@@ -159,18 +180,20 @@ export default {
return item ? item[label] : '-' return item ? item[label] : '-'
}, },
/** 查询字典数据列表 */ /** 查询字典数据列表 */
getList() { async getList() {
getDicts('table_user_from').then(response => { try {
// console.log("查询数据字段狗",response) const response = await getDicts('table_user_from');
const tableUserForm = response.data const tableUserForm = response.data;
for (const item of tableUserForm) { for (const item of tableUserForm) {
const result = { const result = {
value: item.dictValue, value: item.dictValue,
label: item.dictLabel label: item.dictLabel
};
this.tableUserFormList.push(result);
} }
this.tableUserFormList.push(result) } catch (error) {
console.error('获取字典数据失败:', error);
} }
})
}, },
async loadData() { async loadData() {
this.loading = true this.loading = true
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
<script> <script>
import { queryInstanceByPage } from '../../api/system/approve' import {queryInstanceByPage, queryInstanceListAeByPage} from '../../api/system/approve'
import { parseTime } from '../../api/utils/ruoyi' import { parseTime } from '../../api/utils/ruoyi'
import { getDicts } from "../../api/system/baseConfig"; import { getDicts } from "../../api/system/baseConfig";
import leftIconOne from "../../static/images/leftIconOne.png"; import leftIconOne from "../../static/images/leftIconOne.png";
...@@ -113,10 +113,23 @@ export default { ...@@ -113,10 +113,23 @@ export default {
} }
}, },
created() { created() {
this.getList()
}, },
mounted() { async mounted() {
await this.getList();
this.loadData() this.loadData()
// 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1];
if (queryString) {
console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法
const params = new URLSearchParams(queryString);
const queryObject = {};
for (const [key, value] of params.entries()) {
queryObject[key] = value;
}
this.targetId = queryObject.targetId;
this.showOneMessage()
}
}, },
computed: { computed: {
// 计算属性 // 计算属性
...@@ -127,6 +140,13 @@ export default { ...@@ -127,6 +140,13 @@ export default {
}, },
}, },
methods: { methods: {
async showOneMessage() {
const res = await queryInstanceByPage({instanceId: this.targetId})
const tempData = res.data.records.length > 0 ? res.data.records[0] : null
if (tempData) {
this.goDetail(tempData.businessId, tempData.processCode, tempData.processStatus, tempData.allowApprove, tempData.processName)
}
},
goDetail(processId, processCode, processStatus, allowApprove, processName) { goDetail(processId, processCode, processStatus, allowApprove, processName) {
let path = '' let path = ''
if (processCode === '00016' || processCode === '00017') { if (processCode === '00016' || processCode === '00017') {
...@@ -152,18 +172,20 @@ export default { ...@@ -152,18 +172,20 @@ export default {
return item ? item[label] : '-' return item ? item[label] : '-'
}, },
/** 查询字典数据列表 */ /** 查询字典数据列表 */
getList() { async getList() {
getDicts('table_user_from').then(response => { try {
// console.log("查询数据字段狗",response) const response = await getDicts('table_user_from');
const tableUserForm = response.data const tableUserForm = response.data;
for (const item of tableUserForm) { for (const item of tableUserForm) {
const result = { const result = {
value: item.dictValue, value: item.dictValue,
label: item.dictLabel label: item.dictLabel
};
this.tableUserFormList.push(result);
} }
this.tableUserFormList.push(result) } catch (error) {
console.error('获取字典数据失败:', error);
} }
})
}, },
async loadData() { async loadData() {
this.loading = true this.loading = true
......
<template> <template>
<!--自定义头部--> <!--自定义头部-->
<view class="mine-navbar"> <view class="mine-navbar">
<u-navbar <!-- <u-navbar
:title="title" :title="title"
:title-width="titleWidth" :title-width="titleWidth"
:title-style="titleStyle" :title-style="titleStyle"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
bg-color="rgba(0, 0, 0, 0)" bg-color="rgba(0, 0, 0, 0)"
@leftClick="$emit('leftClick', $event)" @leftClick="$emit('leftClick', $event)"
@rightClick="$emit('rightClick', $event)"> @rightClick="$emit('rightClick', $event)">
</u-navbar> </u-navbar>-->
<view class="bar-detail"> <view class="bar-detail">
<view class="title">东风本田发动机有限公司</view> <view class="title">东风本田发动机有限公司</view>
<view class="inof-card"> <view class="inof-card">
...@@ -238,13 +238,13 @@ export default { ...@@ -238,13 +238,13 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mine-navbar { .mine-navbar {
padding-top: 88rpx; padding-top: 48rpx;
background-clip: border-box; background-clip: border-box;
height: 440rpx; height: 440rpx;
background: url("/static/images/top-background.png") center/cover no-repeat; background: url("/static/images/top-background.png") center/cover no-repeat;
z-index: 11; z-index: 11;
.bar-detail{ .bar-detail{
margin-top: 78rpx; //margin-top: 78rpx;
margin-left: 32rpx; margin-left: 32rpx;
.title{ .title{
margin-left: 8rpx; margin-left: 8rpx;
......
...@@ -4,14 +4,16 @@ ...@@ -4,14 +4,16 @@
"path": "pages/login", "path": "pages/login",
"style": { "style": {
"navigationBarTitleText": "DHEC QMS", "navigationBarTitleText": "DHEC QMS",
"navigationStyle": "custom" "navigationStyle": "custom",
"navigationBarBackgroundColor": "#333399"
} }
}, },
{ {
"path": "pages/index", "path": "pages/index",
"style": { "style": {
"navigationBarTitleText": "DHEC QMS", "navigationBarTitleText": "DHEC QMS",
"navigationStyle": "custom" "navigationStyle": "custom",
"navigationBarBackgroundColor": "#333399"
} }
}, },
{ {
......
<template> <template>
<view class="base-detail"> <view class="base-detail">
<ya-navbar title="审批详情" :left-icon-color="'#fff'" :bg-style="'#333399'" <!-- <ya-navbar title="审批详情" :left-icon-color="'#fff'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" /> :title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" />-->
<view class="container"> <view class="container">
<view class="title"> <view class="title">
基础数据变更({{ label }} 基础数据变更({{ label }}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<template v-for="(step, index) in steps" #[`content-${index}`]> <template v-for="(step, index) in steps" #[`content-${index}`]>
<!-- 发起人 --> <!-- 发起人 -->
<template v-if="index === 0"> <template v-if="index === 0">
<view class="custom-table"> <view class="custom-table"drawerShow>
<view class="subTitleClass"> <view class="subTitleClass">
<view class="subRow"> <view class="subRow">
<view class="subTitle"> <view class="subTitle">
......
<!-- processCode.value !== '00019' 审批详情 --> <!-- processCode.value !== '00019' 审批详情 -->
<template> <template>
<view class="base-detail"> <view class="base-detail">
<ya-navbar <!-- <ya-navbar
title="审批详情" title="审批详情"
:left-icon-color="'#fff'" :left-icon-color="'#fff'"
:bg-style="'#333399'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" :title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/> />-->
<view class="container"> <view class="container">
<view class="title"> <view class="title">
{{ processName }} {{ processName }}
......
<!-- 00016(铸造科对发动机装配科发起追溯) 00017(机加工科对发动机装配科发起追溯) 审批详情 --> <!-- 00016(铸造科对发动机装配科发起追溯) 00017(机加工科对发动机装配科发起追溯) 审批详情 -->
<template> <template>
<view class="base-detail"> <view class="base-detail">
<ya-navbar <!-- <ya-navbar
title="审批详情" title="审批详情"
:left-icon-color="'#fff'" :left-icon-color="'#fff'"
:bg-style="'#333399'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" :title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/> />-->
<view class="container"> <view class="container">
<view class="title"> <view class="title">
{{ processName }} {{ processName }}
......
<!-- 00019(追溯完成度异常提醒) 审批详情 --> <!-- 00019(追溯完成度异常提醒) 审批详情 -->
<template> <template>
<view class="base-detail"> <view class="base-detail">
<ya-navbar <!-- <ya-navbar
title="审批详情" title="审批详情"
:left-icon-color="'#fff'" :left-icon-color="'#fff'"
:bg-style="'#333399'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" :title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/> />-->
<view class="container"> <view class="container">
<view class="title"> <view class="title">
{{ processName }} {{ processName }}
......
<template> <template>
<view style="background-color: #fff;overflow: hidden"> <view style="background-color: #fff;overflow: hidden">
<mine-navbar title="DHEC QMS" /> <mine-navbar title="DHEC QMS2" />
<view class="notice-container"> <view class="notice-container">
<!--顶部选择--> <!--顶部选择-->
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
:inactiveStyle="{ :inactiveStyle="{
color: '#111111'}" color: '#111111'}"
@click="clickTabs" @click="clickTabs"
:current="currentTab"
></u-tabs> ></u-tabs>
</view> </view>
...@@ -41,6 +42,7 @@ export default { ...@@ -41,6 +42,7 @@ export default {
ProductionApproval }, ProductionApproval },
data() { data() {
return { return {
currentTab: '0',
mesTypeMap: { mesTypeMap: {
'1': 'BaseDataStart', '1': 'BaseDataStart',
'2': 'BaseDataApproval', '2': 'BaseDataApproval',
...@@ -101,10 +103,25 @@ export default { ...@@ -101,10 +103,25 @@ export default {
} }
}, },
created() { created() {
// 获取当前地址 ? 后的内容
const queryString = window.location.href.split('?')[1];
if (queryString) {
console.log('查询字符串:', queryString);
// 如果你需要将查询字符串解析为对象,可以使用以下方法
const params = new URLSearchParams(queryString);
const queryObject = {};
for (const [key, value] of params.entries()) {
queryObject[key] = value;
}
console.log('解析后的查询对象:', queryObject);
this.clickTabs({value: queryObject.targetRoute, index: queryObject.targetRoute -1})
}
}, },
methods: { methods: {
clickTabs(item) { clickTabs(item) {
console.log('点击了', item) console.log('点击了', item)
this.currentTab = item.index
this.$set(this.queryNotice, 'mesType', item.value) this.$set(this.queryNotice, 'mesType', item.value)
// 清空原有数据 // 清空原有数据
this.noticeList = [] this.noticeList = []
......
<template> <template>
<view class="normal-login-container"> <view class="normal-login-container">
<ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'" <!-- <ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'"-->
:title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'" <!-- :title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'"-->
/> <!-- />-->
<!-- 中间大图标 --> <!-- 中间大图标 -->
<view class="big-icon"> <view class="big-icon">
<image <image
...@@ -261,6 +261,7 @@ page { ...@@ -261,6 +261,7 @@ page {
} }
.normal-login-container { .normal-login-container {
padding-top: 200rpx;
// 背景切图撑开 // 背景切图撑开
background: linear-gradient(240deg, #B9E5FB 0%, #E8E2FD 46%, #95AEF5 100%); background: linear-gradient(240deg, #B9E5FB 0%, #E8E2FD 46%, #95AEF5 100%);
background-size: 100% auto; background-size: 100% auto;
...@@ -362,7 +363,7 @@ page { ...@@ -362,7 +363,7 @@ page {
// 中间大图标 // 中间大图标
.big-icon { .big-icon {
margin-top: 234rpx; //margin-top: 234rpx;
text-align: center; text-align: center;
.image { .image {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</view> </view>
<!--消息卡片--> <!--消息卡片-->
<view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff"> <view v-for="(item,key) in noticeList" :key="key" style="display: flex;background-color: #ffffff" @click="handleRowClick(item)">
<view class="noticeCard"> <view class="noticeCard">
<view class="noticeTop"> <view class="noticeTop">
<view class="titleClass">{{ queryNotice.mesType === '1' ? '基础数据审批' : '生产信息审批' }}</view> <view class="titleClass">{{ queryNotice.mesType === '1' ? '基础数据审批' : '生产信息审批' }}</view>
...@@ -123,6 +123,22 @@ export default { ...@@ -123,6 +123,22 @@ export default {
this.getPetmNoticeList() this.getPetmNoticeList()
}, },
methods: { methods: {
handleRowClick (row) {
console.log('当前行数据:', row)
// 这里可以添加其他处理逻辑
let targetRoute = ''
if (row.mesType === '1') {
// 基础数据审批
targetRoute = '2'
} else if (row.mesType === '2') {
// 生产信息审批
targetRoute = '3'
}else{
// 安灯报警
targetRoute = '3'
}
this.$tab.reLaunch( `/pages/index?targetRoute=${targetRoute}&targetId=${row.instanceId}`)
},
clickTabs(item) { clickTabs(item) {
this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2' this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2'
this.queryNotice.page = 1 this.queryNotice.page = 1
......
<template> <template>
<!--自定义头部--> <!--自定义头部-->
<view class="account" :class="{'u-fixed': fixed}"> <view class="account" :class="{'u-fixed': fixed}">
<u-navbar <!-- <u-navbar
:title="title" :title="title"
:title-width="titleWidth" :title-width="titleWidth"
:title-style="titleStyle" :title-style="titleStyle"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
bg-color="rgba(0, 0, 0, 0)" bg-color="rgba(0, 0, 0, 0)"
@leftClick="$emit('leftClick', $event)" @leftClick="$emit('leftClick', $event)"
@rightClick="$emit('rightClick', $event)"> @rightClick="$emit('rightClick', $event)">
</u-navbar> </u-navbar>-->
<view class="bar-detail"> <view class="bar-detail">
<view class="info-detail"> <view class="info-detail">
<img class="user-img" :src="headImg" /> <img class="user-img" :src="headImg" />
......
...@@ -10,8 +10,14 @@ ...@@ -10,8 +10,14 @@
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)')) var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />') document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script> </script>
<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.15.1/vconsole.min.js"></script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" /> <link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head> </head>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
<body> <body>
<noscript> <noscript>
<strong>本站点必须要开启JavaScript才能运行.</strong> <strong>本站点必须要开启JavaScript才能运行.</strong>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment