add plan index

main
chenshuichuan 2 years ago
parent d2bc99a1de
commit 932230be5a

2083
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -55,11 +55,14 @@
"@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001",
"@dcloudio/uni-ui": "^1.5.6",
"@element-plus/icons-vue": "^2.3.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
"@qiun/wx-ucharts": "2.5.0-20230101",
"@ttou/uview-typings": "^2.0.5",
"clipboard": "^2.0.11",
"dayjs": "^1.11.9",
"element-plus": "^2.7.6",
"mqtt": "4.1.0",
"pinia": "2.0.17",
"tslib": "^2.6.2",
@ -76,8 +79,8 @@
"@vue/runtime-core": "^3.3.11",
"@vue/tsconfig": "^0.1.3",
"less": "^4.2.0",
"sass": "^1.66.1",
"sass-loader": "^10.4.1",
"sass": "^1.77.7",
"sass-loader": "^10.1.1",
"typescript": "^4.9.5",
"vite": "4.3.5",
"vue-tsc": "^1.8.8"

@ -0,0 +1,61 @@
import request from '@/utils/request'
// 查询分页
export function getPage() {
return request({
url: '/admin-api/mes/plan/page',
method: 'get'
})
}
// 查询详情
export function getById(id) {
return request({
url: '/admin-api/mes/plan/get?id='+id,
method: 'get'
})
}
// 创建
export function create(data) {
return request({
url: '/admin-api/mes/plan/create',
method: 'post',
params: data
})
}
// 更新
export function update(data) {
return request({
url: '/admin-api/mes/plan/update',
method: 'put',
params: data
})
}
// 派工
export function paigong(data) {
return request({
url: '/admin-api/mes/plan/paigong',
method: 'put',
params: data
})
}
// 更改状态:开工、暂停
export function updateStatus(data) {
return request({
url: '/admin-api/mes/plan/updateStatus',
method: 'put',
params: data
})
}
// 获取计划、派工、开工状态的计划
export function getByStatus(status) {
return request({
url: '/admin-api/mes/plan/getByStatus?status='+status,
method: 'get'
})
}

@ -0,0 +1,36 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
// 查询分页
export function getPage() {
return request({
url: '/admin-api/mes/plan/page',
method: 'get'
})
}
// 查询详情
export function getById(id) {
return request({
url: '/admin-api/mes/plan/get?id='+id,
method: 'get'
})
}
// 创建
export function create(data) {
return request({
url: '/admin-api/mes/plan/create',
method: 'post',
params: data
})
}
// 更新
export function update(data) {
return request({
url: '/admin-api/mes/plan/update',
method: 'put',
params: data
})
}

@ -0,0 +1,34 @@
import upload from '@/utils/upload'
import request from '@/utils/request'
// 查询分页
export function getPage() {
return request({
url: '/admin-api/mes/plan/page',
method: 'get'
})
}
// 查询详情
export function getById(id) {
return request({
url: '/admin-api/mes/plan/get?id='+id,
method: 'get'
})
}
// 创建
export function create(data) {
return request({
url: '/admin-api/mes/plan/create',
method: 'post',
params: data
})
}
// 更新
export function update(data) {
return request({
url: '/admin-api/mes/plan/update',
method: 'put',
params: data
})
}

@ -1,28 +1,25 @@
// 应用全局配置
const config = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://localhost/prod-api',
// baseUrl: 'http://47.106.185.127:48080',
baseUrl: 'http://127.0.0.1:48080',
//cloud后台网关地址
// baseUrl: 'http://192.168.10.3:8080',
// 应用信息
appInfo: {
// 应用名称
name: "ruoyi-app-vue3",
name: "必硕生管系统",
// 应用版本
version: "1.1.0",
// 应用logo
logo: "/static/logo.png",
// 官方网站
site_url: "http://ruoyi.vip",
site_url: "https://www.bstnmg.com/",
// 政策协议
agreements: [{
title: "隐私政策",
url: "https://ruoyi.vip/protocol.html"
url: "https://www.bstnmg.com/"
},
{
title: "用户服务协议",
url: "https://ruoyi.vip/protocol.html"
url: "https://www.bstnmg.com/"
}
]
}

@ -2,6 +2,10 @@ import App from './App.vue'
import plugins from './plugins'
import store from './store'
import uviewPlus from 'uview-plus'
import ElementPlus from 'element-plus' //添加
import 'element-plus/dist/index.css' //添加
import locale from "element-plus/es/locale/lang/zh-cn"
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createSSRApp } from 'vue'
@ -17,6 +21,10 @@ export function createApp() {
app.use(store)
app.use(uviewPlus)
app.use(plugins)
app.use(ElementPlus, {locale})
for (const [key, component] of Object.entries(ElementPlusIconsVue)){
app.component(key, component)
}
directive(app)
// 全局方法挂载

@ -7,7 +7,8 @@
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue",
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue"
"qiun-(.*)": "@/components/qiun-data-charts/components/qiun-$1/qiun-$1.vue",
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
"pages": [

@ -1,25 +1,152 @@
<template>
<view class="content">
<image class="logo" src="@/static/logo.png"></image>
<view class="text-area">
<text class="title">Hello RuoYi-Vue</text>
</view>
<view class="text-area">
<up-text type="primary" text="uview-plus"></up-text>
</view>
<view class="charts-box">
<qiun-data-charts type="column" :chartData="chartData" />
</view>
<view >
<!-- 开工中-->
<uni-section title="开工中" type="line" title-color="#18bc37"></uni-section>
<el-collapse accordion>
<el-collapse-item v-for="(item, index) in startList" :name="item.id">
<template #title>
<el-icon><Tickets /></el-icon>
<el-text type="success">{{item.code}}</el-text>-
<el-text size="large">{{item.productName}}</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.planNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="success" plain @click="updatePlan(item.id, 'end')">完工</el-button>
</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.finishNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="warning" plain @click="updatePlan(item.id, 'pause')">暂停</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
<!-- 派工中-->
<uni-section title="派工中" type="line" title-color="#2979ff"></uni-section>
<el-collapse accordion>
<el-collapse-item v-for="(item, index) in paigongList" :name="item.id">
<template #title>
<el-icon><Tickets /></el-icon>
<el-text type="success">{{item.code}}</el-text>-
<el-text size="large">{{item.productName}}</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.planNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="info" plain @click="updatePlan(item.id, 'start')">开工</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
<!-- 计划中-->
<uni-section title="计划中" type="line" title-color="#f3a73f"></uni-section>
<el-collapse accordion>
<el-collapse-item v-for="(item, index) in planList" :name="item.id">
<template #title>
<el-icon><Tickets /></el-icon>
<el-text type="success">{{item.code}}</el-text>-
<el-text size="large">{{item.productName}}</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.planNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="primary" plain>派工</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-text type="warning">计划结束:{{ timestampToTime(item.planEndTime) }}</el-text>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
<!-- 暂停中 -->
<uni-section title="暂停中" type="line" title-color="#e43d33"></uni-section>
<el-collapse accordion>
<el-collapse-item v-for="(item, index) in pauseList" :name="item.id">
<template #title>
<el-icon><Tickets /></el-icon>
<el-text type="success">{{item.code}}</el-text>-
<el-text size="large">{{item.productName}}</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.planNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="success" plain @click="updatePlan(item.id, 'end')">完工</el-button>
</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.finishNumber }}</el-text>
</el-col>
<el-col :span="4">
<el-button type="info" plain @click="updatePlan(item.id, 'start')">开工</el-button>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
<!-- <view class="charts-box">-->
<!-- <qiun-data-charts :chartData="chartData" type="column"/>-->
<!-- </view>-->
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import {ref, onMounted} from 'vue';
import useUserStore from '@/store/modules/user'
import {getPage, getById, paigong, updateStatus, getByStatus} from "@/api/mes/plan"
import {timestampToTime} from "@/utils/dateUtil";
import {Tickets} from "@element-plus/icons-vue";
const chartData = ref({});
const userStore = useUserStore()
const startList = ref([]);
const paigongList = ref([]);
const pauseList = ref([]);
const planList = ref([]);
onMounted(() => { getServerData() });
const chartData = ref({});
onMounted(() => {
getServerData()
getPlanList()
});
function getServerData() {
//
setTimeout(() => {
@ -39,35 +166,39 @@ function getServerData() {
chartData.value = JSON.parse(JSON.stringify(res));
}, 500);
}
</script>
<style scoped>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
//
function getPlanList() {
getByStatus(0).then(response => {
planList.value = response.data
})
getByStatus(1).then(response => {
paigongList.value = response.data
})
getByStatus(2).then(response => {
startList.value = response.data
})
getByStatus(3).then(response => {
pauseList.value = response.data
})
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
/** 开工 */
function updatePlan(id, code){
.text-area {
display: flex;
justify-content: center;
const data = {id, code}
updateStatus(data).then(response => {
pauseList.value = response.data
})
getPlanList()
}
</script>
<style scoped>
.title {
font-size: 36rpx;
color: #8f8f94;
}
.charts-box {
width: 100%;
height: 300px;

@ -25,6 +25,7 @@
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
</view>
</view>
<view class="xieyi text-center">
<text class="text-grey1">登录即代表同意</text>
<text class="text-blue">用户协议</text>
@ -32,7 +33,6 @@
</view>
</view>
</template>
<script setup>
import modal from '@/plugins/modal'
import { getCodeImg } from '@/api/login'

@ -74,15 +74,7 @@
</view>
</view>
<!-- <view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="info" cancelText="关闭" confirmText="退出"
title="通知" content="确定注销并退出系统吗"
@confirm="dialogConfirm"
@close="dialogClose">
</uni-popup-dialog>
</uni-popup>
</view> -->
</template>
<script setup>

@ -1,9 +1,9 @@
<template>
<view class="about-container">
<view class="header-section text-center">
<image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix">
<image style="width: 150rpx;height: 150rpx;" src="/static/logo.png" mode="widthFix">
</image>
<uni-title type="h2" title="若依移动端"></uni-title>
<uni-title type="h2" title="必硕生管系统"></uni-title>
</view>
<view class="content-section">
@ -17,13 +17,13 @@
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>官方邮箱</view>
<view class="text-right">ruoyi@xx.com</view>
<view class="text-right">besure@xx.com</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
<view class="menu-item-box">
<view>服务热线</view>
<view class="text-right">400-999-9999</view>
<view class="text-right">XXX_XXX_XXX</view>
</view>
</view>
<view class="list-cell list-cell-arrow">
@ -38,7 +38,7 @@
</view>
<view class="copyright">
<view>Copyright &copy; 2022 ruoyi.vip All Rights Reserved.</view>
<view>Copyright &copy; 2024 besure All Rights Reserved.</view>
</view>
</view>
</template>

@ -18,38 +18,38 @@
<script setup>
import { ref } from "vue";
const list =ref([{
icon: 'iconfont icon-github',
title: '若依问题',
childList: [{
title: '若依开源吗',
content: '开源'
}, {
title: '若依可以商用吗',
content: '可以'
}, {
title: '若依官网地址多少',
content: 'http://ruoyi.vip'
}, {
title: '若依文档地址多少',
content: 'http://doc.ruoyi.vip'
}]
},
{
icon: 'iconfont icon-help',
title: '其他问题',
childList: [{
title: '如何退出登录?',
content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
}, {
title: '如何修改用户头像?',
content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
}, {
title: '如何修改登录密码?',
content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
}]
}
])
const list =ref( [{
icon: 'iconfont icon-github',
title: 'APP用户问题',
childList: [{
title: 'APP支持的功能业务有哪些',
content: '计划开工、生产报工、投料记录、生产记录'
}, {
title: '生产报工如何报工',
content: '可以'
}, {
title: '计划管理如何进行',
content: '计划管理'
}, {
title: '投料记录如何进行',
content: '投料记录'
}]
},
{
icon: 'iconfont icon-help',
title: '其他问题',
childList: [{
title: '如何退出登录?',
content: '请点击[我的] - [应用设置] - [退出登录]即可退出登录',
}, {
title: '如何修改用户头像?',
content: '请点击[我的] - [选择头像] - [点击提交]即可更换用户头像',
}, {
title: '如何修改登录密码?',
content: '请点击[我的] - [应用设置] - [修改密码]即可修改登录密码',
}]
}
])
function handleText(item) {
uni.navigateTo({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

@ -0,0 +1,14 @@
/**
* Independent time operation tool to facilitate subsequent switch to dayjs
*/
export function timestampToTime(timestamp: number | null): string {
timestamp = timestamp ? timestamp : null;
let date = new Date(timestamp!); // 时间戳为10位需*1000时间戳为13位的话不需乘1000
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
// let h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// let m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
}

@ -0,0 +1,4 @@
// vue.config.js
module.exports = {
transpileDependencies:['@dcloudio/uni-ui']
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save