add record
parent
4f065b30a7
commit
151fcdf9e7
@ -1,184 +1,119 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="work-container">
|
<view >
|
||||||
<!-- 轮播图 -->
|
<uni-notice-bar show-icon scrollable
|
||||||
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
|
text="安全生产!有序生产!高效生产!" />
|
||||||
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
<!-- 已提交-->
|
||||||
<swiper-item v-for="(item, index) in data" :key="index">
|
<uni-section title="已提交" type="line" title-color="#18bc37"></uni-section>
|
||||||
<view class="swiper-item" @click="clickBannerItem(item)">
|
<el-collapse accordion>
|
||||||
<image :src="item.image" mode="aspectFill" :draggable="false" />
|
<el-collapse-item v-for="(item, index) in finishList" :name="item.id">
|
||||||
</view>
|
<template #title>
|
||||||
</swiper-item>
|
<el-icon><Tickets /></el-icon>
|
||||||
</swiper>
|
<el-text type="success">{{item.feedingTime}}</el-text>-
|
||||||
</uni-swiper-dot>
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>
|
||||||
|
</template>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-text type="success">制浆线:{{ timestampToTime(item.planStartTime) }}</el-text>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-text type="success">记录人:{{ item.userName }}</el-text>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-text type="warning">投料类型:{{ item.feedingType }}</el-text>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-text>备注:{{ item.remark }}</el-text>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
|
||||||
<!-- 宫格组件 -->
|
</el-col>
|
||||||
<uni-section title="系统管理" type="line"></uni-section>
|
</el-row>
|
||||||
<view class="grid-body">
|
</el-collapse-item>
|
||||||
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
</el-collapse>
|
||||||
<uni-grid-item>
|
<!-- 草稿状态-->
|
||||||
<view class="grid-item-box">
|
<uni-section title="草稿" type="line" title-color="#f3a73f"></uni-section>
|
||||||
<uni-icons type="person-filled" size="30"></uni-icons>
|
<el-collapse accordion>
|
||||||
<text class="text">用户管理</text>
|
<el-collapse-item v-for="(item, index) in draftList" :name="item.id">
|
||||||
</view>
|
<template #title>
|
||||||
</uni-grid-item>
|
<el-icon><Tickets /></el-icon>
|
||||||
<uni-grid-item>
|
<el-text type="success">{{item.feedingTime}}</el-text>-
|
||||||
<view class="grid-item-box">
|
<el-text size="large">{{item.feedingRecordCode}}</el-text>
|
||||||
<uni-icons type="staff-filled" size="30"></uni-icons>
|
</template>
|
||||||
<text class="text">角色管理</text>
|
<el-row>
|
||||||
</view>
|
<el-col :span="12">
|
||||||
</uni-grid-item>
|
<el-text type="success">制浆线:{{ timestampToTime(item.planStartTime) }}</el-text>
|
||||||
<uni-grid-item>
|
</el-col>
|
||||||
<view class="grid-item-box">
|
<el-col :span="8">
|
||||||
<uni-icons type="color" size="30"></uni-icons>
|
<el-text type="success">记录人:{{ item.userName }}</el-text>
|
||||||
<text class="text">菜单管理</text>
|
</el-col>
|
||||||
</view>
|
<el-col v-if="auth.hasPermi('mes:plan:update')" :span="4">
|
||||||
</uni-grid-item>
|
<el-button type="success" plain @click="updatePlan(item.id, item.code,'end')">提交</el-button>
|
||||||
<uni-grid-item>
|
</el-col>
|
||||||
<view class="grid-item-box">
|
</el-row>
|
||||||
<uni-icons type="settings-filled" size="30"></uni-icons>
|
<el-row>
|
||||||
<text class="text">部门管理</text>
|
<el-col :span="12">
|
||||||
</view>
|
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
|
||||||
</uni-grid-item>
|
</el-col>
|
||||||
<uni-grid-item>
|
<el-col :span="8">
|
||||||
<view class="grid-item-box">
|
<el-text type="warning">投料类型:{{ item.feedingType }}</el-text>
|
||||||
<uni-icons type="heart-filled" size="30"></uni-icons>
|
</el-col>
|
||||||
<text class="text">岗位管理</text>
|
<el-col v-if="auth.hasPermi('mes:plan:update')" :span="4">
|
||||||
</view>
|
<el-button type="warning" plain @click="updatePlan(item.id,item.code,'pause')">删除</el-button>
|
||||||
</uni-grid-item>
|
</el-col>
|
||||||
<uni-grid-item>
|
</el-row>
|
||||||
<view class="grid-item-box">
|
<el-row>
|
||||||
<uni-icons type="bars" size="30"></uni-icons>
|
<el-col :span="20">
|
||||||
<text class="text">字典管理</text>
|
<el-text>备注:{{ item.remark }}</el-text>
|
||||||
</view>
|
</el-col>
|
||||||
</uni-grid-item>
|
<el-col :span="4">
|
||||||
<uni-grid-item>
|
</el-col>
|
||||||
<view class="grid-item-box">
|
</el-row>
|
||||||
<uni-icons type="gear-filled" size="30"></uni-icons>
|
</el-collapse-item>
|
||||||
<text class="text">参数设置</text>
|
</el-collapse>
|
||||||
</view>
|
|
||||||
</uni-grid-item>
|
|
||||||
<uni-grid-item>
|
|
||||||
<view class="grid-item-box">
|
|
||||||
<uni-icons type="chat-filled" size="30"></uni-icons>
|
|
||||||
<text class="text">通知公告</text>
|
|
||||||
</view>
|
|
||||||
</uni-grid-item>
|
|
||||||
<uni-grid-item>
|
|
||||||
<view class="grid-item-box">
|
|
||||||
<uni-icons type="wallet-filled" size="30"></uni-icons>
|
|
||||||
<text class="text">日志管理</text>
|
|
||||||
</view>
|
|
||||||
</uni-grid-item>
|
|
||||||
</uni-grid>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import {ref, onMounted} from 'vue';
|
||||||
import modal from "@/plugins/modal"
|
import {getRecordList, updateStatus, deleteById, getDetailByRecordId} from "@/api/mes/record"
|
||||||
const current=ref(0);
|
import {timestampToTime} from "@/utils/dateUtil";
|
||||||
const swiperDotIndex=ref(0);
|
import {Tickets} from "@element-plus/icons-vue";
|
||||||
const data=ref([{
|
import modal from "@/plugins/modal";
|
||||||
image: '/static/images/banner/banner01.jpg'
|
import tab from "@/plugins/tab";
|
||||||
},
|
import {showConfirm} from "@/utils/common";
|
||||||
{
|
import auth from "@/plugins/auth";
|
||||||
image: '/static/images/banner/banner02.jpg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
image: '/static/images/banner/banner03.jpg'
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
function clickBannerItem(item) {
|
//已经提交的列表
|
||||||
console.info(item)
|
const finishList = ref([]);
|
||||||
};
|
//草稿状态的列表
|
||||||
function changeSwiper(e) {
|
const draftList = ref([]);
|
||||||
current.value = e.detail.current
|
|
||||||
}
|
|
||||||
function changeGrid(e) {
|
|
||||||
modal.showToast({
|
|
||||||
title: '模块建设中',
|
|
||||||
mask: false,
|
|
||||||
icon:'loading',
|
|
||||||
duration: 1000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
<style lang="scss">
|
});
|
||||||
/* #ifndef APP-NVUE */
|
// 加载列表数据
|
||||||
page {
|
function getList() {
|
||||||
display: flex;
|
getRecordList("2").then(response => {
|
||||||
flex-direction: column;
|
finishList.value = response.data
|
||||||
box-sizing: border-box;
|
})
|
||||||
background-color: #fff;
|
getRecordList("1").then(response => {
|
||||||
min-height: 100%;
|
draftList.value = response.data
|
||||||
height: auto;
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
|
|
||||||
.text {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 26rpx;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-item-box {
|
//看进度
|
||||||
flex: 1;
|
function planProgress(plan){
|
||||||
/* #ifndef APP-NVUE */
|
tab.navigateTo('/page_report/planProgress',plan)
|
||||||
display: flex;
|
}
|
||||||
/* #endif */
|
</script>
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-margin-wrap {
|
|
||||||
width: 690rpx;
|
|
||||||
width: 100%;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper {
|
|
||||||
height: 300rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-box {
|
|
||||||
height: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swiper-item {
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
display: flex;
|
|
||||||
/* #endif */
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
color: #fff;
|
|
||||||
height: 300rpx;
|
|
||||||
line-height: 300rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 500px) {
|
<style scoped>
|
||||||
.uni-swiper-dot-box {
|
|
||||||
width: 400px;
|
|
||||||
/* #ifndef APP-NVUE */
|
|
||||||
margin: 0 auto;
|
|
||||||
/* #endif */
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<view class="work-container">
|
||||||
|
<!-- 轮播图 -->
|
||||||
|
<uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
|
||||||
|
<swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
|
||||||
|
<swiper-item v-for="(item, index) in data" :key="index">
|
||||||
|
<view class="swiper-item" @click="clickBannerItem(item)">
|
||||||
|
<image :src="item.image" mode="aspectFill" :draggable="false" />
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</uni-swiper-dot>
|
||||||
|
|
||||||
|
<!-- 宫格组件 -->
|
||||||
|
<uni-section title="系统管理" type="line"></uni-section>
|
||||||
|
<view class="grid-body">
|
||||||
|
<uni-grid :column="4" :showBorder="false" @change="changeGrid">
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="person-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">用户管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="staff-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">角色管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="color" size="30"></uni-icons>
|
||||||
|
<text class="text">菜单管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="settings-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">部门管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="heart-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">岗位管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="bars" size="30"></uni-icons>
|
||||||
|
<text class="text">字典管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="gear-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">参数设置</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="chat-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">通知公告</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
<uni-grid-item>
|
||||||
|
<view class="grid-item-box">
|
||||||
|
<uni-icons type="wallet-filled" size="30"></uni-icons>
|
||||||
|
<text class="text">日志管理</text>
|
||||||
|
</view>
|
||||||
|
</uni-grid-item>
|
||||||
|
</uni-grid>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import modal from "@/plugins/modal"
|
||||||
|
const current=ref(0);
|
||||||
|
const swiperDotIndex=ref(0);
|
||||||
|
const data=ref([{
|
||||||
|
image: '/static/images/banner/banner01.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: '/static/images/banner/banner02.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: '/static/images/banner/banner03.jpg'
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
function clickBannerItem(item) {
|
||||||
|
console.info(item)
|
||||||
|
};
|
||||||
|
function changeSwiper(e) {
|
||||||
|
current.value = e.detail.current
|
||||||
|
}
|
||||||
|
function changeGrid(e) {
|
||||||
|
modal.showToast({
|
||||||
|
title: '模块建设中',
|
||||||
|
mask: false,
|
||||||
|
icon:'loading',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
page {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
min-height: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
view {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
.text {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-item-box {
|
||||||
|
flex: 1;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-margin-wrap {
|
||||||
|
width: 690rpx;
|
||||||
|
width: 100%;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
height: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-box {
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-item {
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
display: flex;
|
||||||
|
/* #endif */
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
height: 300rpx;
|
||||||
|
line-height: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 500px) {
|
||||||
|
.uni-swiper-dot-box {
|
||||||
|
width: 400px;
|
||||||
|
/* #ifndef APP-NVUE */
|
||||||
|
margin: 0 auto;
|
||||||
|
/* #endif */
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue