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

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

parent 0fa34874
......@@ -110,6 +110,7 @@ export default {
},
leftIconOne,
leftIconTwo,
targetId: '',
queryNotice: {
page: 1,
rows: 10,
......@@ -132,10 +133,23 @@ export default {
}
},
created() {
this.getList()
},
mounted() {
async mounted() {
await this.getList();
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: {
// 计算属性
......@@ -146,6 +160,13 @@ export default {
},
},
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) {
uni.navigateTo({
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 {
return item ? item[label] : '-'
},
/** 查询字典数据列表 */
getList() {
getDicts('table_user_from').then(response => {
// console.log("查询数据字段狗",response)
const tableUserForm = response.data
async getList() {
try {
const response = await getDicts('table_user_from');
const tableUserForm = response.data;
for (const item of tableUserForm) {
const result = {
value: item.dictValue,
label: item.dictLabel
}
this.tableUserFormList.push(result)
};
this.tableUserFormList.push(result);
}
})
} catch (error) {
console.error('获取字典数据失败:', error);
}
},
async loadData() {
this.loading = true
......
......@@ -63,7 +63,7 @@
</template>
<script>
import { queryInstanceByPage } from '../../api/system/approve'
import {queryInstanceByPage, queryInstanceListAeByPage} from '../../api/system/approve'
import { parseTime } from '../../api/utils/ruoyi'
import { getDicts } from "../../api/system/baseConfig";
import leftIconOne from "../../static/images/leftIconOne.png";
......@@ -113,10 +113,23 @@ export default {
}
},
created() {
this.getList()
},
mounted() {
async mounted() {
await this.getList();
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: {
// 计算属性
......@@ -127,6 +140,13 @@ export default {
},
},
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) {
let path = ''
if (processCode === '00016' || processCode === '00017') {
......@@ -152,18 +172,20 @@ export default {
return item ? item[label] : '-'
},
/** 查询字典数据列表 */
getList() {
getDicts('table_user_from').then(response => {
// console.log("查询数据字段狗",response)
const tableUserForm = response.data
async getList() {
try {
const response = await getDicts('table_user_from');
const tableUserForm = response.data;
for (const item of tableUserForm) {
const result = {
value: item.dictValue,
label: item.dictLabel
}
this.tableUserFormList.push(result)
};
this.tableUserFormList.push(result);
}
})
} catch (error) {
console.error('获取字典数据失败:', error);
}
},
async loadData() {
this.loading = true
......
<template>
<!--自定义头部-->
<view class="mine-navbar">
<u-navbar
<!-- <u-navbar
:title="title"
:title-width="titleWidth"
:title-style="titleStyle"
......@@ -14,7 +14,7 @@
bg-color="rgba(0, 0, 0, 0)"
@leftClick="$emit('leftClick', $event)"
@rightClick="$emit('rightClick', $event)">
</u-navbar>
</u-navbar>-->
<view class="bar-detail">
<view class="title">东风本田发动机有限公司</view>
<view class="inof-card">
......@@ -238,13 +238,13 @@ export default {
<style lang="scss" scoped>
.mine-navbar {
padding-top: 88rpx;
padding-top: 48rpx;
background-clip: border-box;
height: 440rpx;
background: url("/static/images/top-background.png") center/cover no-repeat;
z-index: 11;
.bar-detail{
margin-top: 78rpx;
//margin-top: 78rpx;
margin-left: 32rpx;
.title{
margin-left: 8rpx;
......
......@@ -4,14 +4,16 @@
"path": "pages/login",
"style": {
"navigationBarTitleText": "DHEC QMS",
"navigationStyle": "custom"
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#333399"
}
},
{
"path": "pages/index",
"style": {
"navigationBarTitleText": "DHEC QMS",
"navigationStyle": "custom"
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#333399"
}
},
{
......
<template>
<view class="base-detail">
<ya-navbar title="审批详情" :left-icon-color="'#fff'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" />
<!-- <ya-navbar title="审批详情" :left-icon-color="'#fff'" :bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'" />-->
<view class="container">
<view class="title">
基础数据变更({{ label }}
......@@ -14,7 +14,7 @@
<template v-for="(step, index) in steps" #[`content-${index}`]>
<!-- 发起人 -->
<template v-if="index === 0">
<view class="custom-table">
<view class="custom-table"drawerShow>
<view class="subTitleClass">
<view class="subRow">
<view class="subTitle">
......
<!-- processCode.value !== '00019' 审批详情 -->
<template>
<view class="base-detail">
<ya-navbar
<!-- <ya-navbar
title="审批详情"
:left-icon-color="'#fff'"
:bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
/>-->
<view class="container">
<view class="title">
{{ processName }}
......
<!-- 00016(铸造科对发动机装配科发起追溯) 00017(机加工科对发动机装配科发起追溯) 审批详情 -->
<template>
<view class="base-detail">
<ya-navbar
<!-- <ya-navbar
title="审批详情"
:left-icon-color="'#fff'"
:bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
/>-->
<view class="container">
<view class="title">
{{ processName }}
......
<!-- 00019(追溯完成度异常提醒) 审批详情 -->
<template>
<view class="base-detail">
<ya-navbar
<!-- <ya-navbar
title="审批详情"
:left-icon-color="'#fff'"
:bg-style="'#333399'"
:title-style="'color: #fff;font-weight: 500;font-size: 35rpx;'"
/>
/>-->
<view class="container">
<view class="title">
{{ processName }}
......
<template>
<view style="background-color: #fff;overflow: hidden">
<mine-navbar title="DHEC QMS" />
<mine-navbar title="DHEC QMS2" />
<view class="notice-container">
<!--顶部选择-->
......@@ -13,6 +13,7 @@
:inactiveStyle="{
color: '#111111'}"
@click="clickTabs"
:current="currentTab"
></u-tabs>
</view>
......@@ -41,6 +42,7 @@ export default {
ProductionApproval },
data() {
return {
currentTab: '0',
mesTypeMap: {
'1': 'BaseDataStart',
'2': 'BaseDataApproval',
......@@ -101,10 +103,25 @@ export default {
}
},
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: {
clickTabs(item) {
console.log('点击了', item)
this.currentTab = item.index
this.$set(this.queryNotice, 'mesType', item.value)
// 清空原有数据
this.noticeList = []
......
<template>
<view class="normal-login-container">
<ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'"
:title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'"
/>
<!-- <ya-navbar title="DHEC QMS" :left-icon="null" :bg-style="'#fff'"-->
<!-- :title-style="'color: #343744;font-weight: bold;font-size: 40rpx;'"-->
<!-- />-->
<!-- 中间大图标 -->
<view class="big-icon">
<image
......@@ -261,6 +261,7 @@ page {
}
.normal-login-container {
padding-top: 200rpx;
// 背景切图撑开
background: linear-gradient(240deg, #B9E5FB 0%, #E8E2FD 46%, #95AEF5 100%);
background-size: 100% auto;
......@@ -362,7 +363,7 @@ page {
// 中间大图标
.big-icon {
margin-top: 234rpx;
//margin-top: 234rpx;
text-align: center;
.image {
......
......@@ -17,7 +17,7 @@
</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="noticeTop">
<view class="titleClass">{{ queryNotice.mesType === '1' ? '基础数据审批' : '生产信息审批' }}</view>
......@@ -123,6 +123,22 @@ export default {
this.getPetmNoticeList()
},
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) {
this.queryNotice.mesType = item.name === '基础数据审批' ? '1' : '2'
this.queryNotice.page = 1
......
<template>
<!--自定义头部-->
<view class="account" :class="{'u-fixed': fixed}">
<u-navbar
<!-- <u-navbar
:title="title"
:title-width="titleWidth"
:title-style="titleStyle"
......@@ -14,7 +14,7 @@
bg-color="rgba(0, 0, 0, 0)"
@leftClick="$emit('leftClick', $event)"
@rightClick="$emit('rightClick', $event)">
</u-navbar>
</u-navbar>-->
<view class="bar-detail">
<view class="info-detail">
<img class="user-img" :src="headImg" />
......
......@@ -10,8 +10,14 @@
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' : '') + '" />')
</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" />
</head>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
<body>
<noscript>
<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