新增首页部分页面

This commit is contained in:
2021-11-17 10:23:35 +08:00
parent d9810b14b5
commit 181c50764e
15 changed files with 1623 additions and 349 deletions

View File

@@ -0,0 +1,7 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 15:18:18
* @LastEditors: zwq
* @LastEditTime: 2021-11-15 15:18:19
* @Description:
-->

View File

@@ -0,0 +1,105 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 15:17:30
* @LastEditors: zwq
* @LastEditTime: 2021-11-16 16:59:23
* @Description:
-->
<template>
<div>
<div class="mainDiv" style="margin:10px 0 100px">
<div class="flexDiv">
<div class="wareBox" :class="[count > Math.round(Math.random()*10)?'enableBox':'disableBox',{active:count===isActive}]" v-for="count in 10" v-bind:key="count">
<div class="plat">库位{{ count }}</div>
</div>
</div>
<div class="flexDiv">
<div class="wareBox" :class="[count > Math.round(Math.random()*10)?'enableBox':'disableBox',{active:count===isActive}]" v-for="count in 10" v-bind:key="count">
<div class="plat">库位{{ count }}</div>
</div>
</div>
</div>
<div class="line"></div>
<div class="mainDiv" style="margin:100px 0 10px">
<div class="flexDiv">
<div class="wareBox end-plat" v-for="count in 4" v-bind:key="count">
<div class="plat">提升台{{ count }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
isActive: ''
}
},
created () {},
methods: {}
}
</script>
<style scoped>
.mainDiv{
border: 2px solid rgb(145, 174, 255);
padding: 20px 0;
}
.flexDiv {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-around;
justify-content: space-around;
}
/* 边框特效 */
.wareBox:hover {
background: linear-gradient(to left, deepskyblue, deepskyblue) left top
no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) left top no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right top no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) right top no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) left bottom no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) left bottom no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat;
background-size: 5px 30px, 30px 5px;
color: black;
border-radius: 5px;
background-color: rgb(190, 224, 241);
}
.wareBox {
cursor: pointer;
margin: 10px;
height: 100px;
padding: 10px;
line-height: 90px;
text-align: center;
border: 2px solid #cdcdc5;
border-radius: 5px;
}
.plat {
min-width: 80px;
}
.line {
margin: 20px 0;
height: 2px;
background-color: gray;
border-left: 200px solid #ddd;
border-right: 200px solid #ddd;
}
.enableBox{
background: rgb(0, 189, 16);
}
.disableBox{
background: #ddd;
cursor: not-allowed;
}
.end-plat{
background-color: rgb(195, 246, 255);
}
.active{
border: 2px solid red;
}
</style>

View File

@@ -1,39 +1,164 @@
<template>
<div class="mod-home">
<h3>项目介绍</h3>
<ul>
<li>renren-fast-vue基于vueelement-ui构建开发实现<a href="https://gitee.com/renrenio/renren-fast" target="_blank">renren-fast</a>后台管理前端功能提供一套更优的前端解决方案</li>
<li>前后端分离通过token进行数据交互可独立部署</li>
<li>主题定制通过scss变量统一一站式定制</li>
<li>动态菜单通过菜单管理统一管理访问路由</li>
<li>数据切换通过mock配置对接口数据mock模拟数据进行切换</li>
<li>发布时可动态配置CDN静态资源切换新旧版本</li>
<li>演示地址<a href="http://demo.open.renren.io/renren-fast" target="_blank">http://demo.open.renren.io/renren-fast</a> (账号密码admin/admin)</li>
</ul>
<h3>获取帮助</h3>
<ul>
<li>官方社区<a href="https://www.renren.io/community" target="_blank">https://www.renren.io/community</a></li>
<li>前端Git地址<a href="https://github.com/renrenio/renren-fast-vue" target="_blank">https://github.com/renrenio/renren-fast-vue</a></li>
<li>后台Git地址<a href="https://gitee.com/renrenio/renren-fast" target="_blank">https://gitee.com/renrenio/renren-fast</a></li>
<li>代码生成器<a href="https://gitee.com/renrenio/renren-generator" target="_blank">https://gitee.com/renrenio/renren-generator</a></li>
<li>如需关注项目最新动态请WatchStar项目同时也是对项目最好的支持</li>
</ul>
<h3>官方QQ群</h3>
<ul>
<li>高级群324780204(大牛云集跟大牛学习新技能)</li>
<li>普通群145799952(学习交流互相解答各种疑问)</li>
</ul>
<div>
<el-row type="flex" justify="space-around">
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'orderProcess' })">
<icon-svg class="iconClass" name="guolu"></icon-svg>
<h2>进工业炉加工</h2>
</el-card>
</el-col>
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'exWarehouse' })">
<icon-svg class="iconClass" name="chuku"></icon-svg>
<h2>出库</h2>
</el-card>
</el-col>
<el-col :span="6">
<el-card class="box-card" shadow="hover" @click.native="$router.push({ name: 'addProcess' })">
<icon-svg class="iconClass" name="zaijiagong"></icon-svg>
<h2>追加加工</h2>
</el-card>
</el-col>
</el-row>
<div class="mod-log">
<h3>当前任务列表</h3>
<el-table
:data="dataList"
border
height="600px"
v-loading="dataListLoading"
style="width: 100%"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50"
></el-table-column>
<el-table-column
prop="id"
header-align="center"
align="center"
label="任务编号"
>
</el-table-column>
<el-table-column
prop="username"
header-align="center"
align="center"
label="标识卡"
>
</el-table-column>
<el-table-column
prop="operation"
header-align="center"
align="center"
label="物料名"
>
</el-table-column>
<el-table-column
prop="method"
header-align="center"
align="center"
label="客户"
>
</el-table-column>
<el-table-column
prop="params11"
header-align="center"
align="center"
label="窑炉"
>
</el-table-column>
<el-table-column
prop="time"
header-align="center"
align="center"
label="当前状态"
>
</el-table-column>
<el-table-column
prop="ip"
header-align="center"
align="center"
label="任务类型"
>
</el-table-column>
<el-table-column
prop="createDate"
header-align="center"
align="center"
label="开始位置"
>
</el-table-column>
<el-table-column
prop="createDate"
header-align="center"
align="center"
label="目标位置"
>
</el-table-column>
<el-table-column
prop="createDate"
header-align="center"
align="center"
label="库位"
>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
export default {
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 10,
dataListLoading: false
}
},
created () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/log/list'),
method: 'get',
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.list
} else {
this.dataList = []
}
this.dataListLoading = false
})
}
}
}
</script>
<style>
.mod-home {
line-height: 1.5;
}
<style scoped>
.mod-log {
margin-top: 100px;
}
.box-card{
background-color: rgb(235, 254, 255);
text-align: center;
cursor: pointer;
}
.iconClass{
width: 100px;
height: 100px;
}
</style>

View File

@@ -0,0 +1,102 @@
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="标识卡" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="标识卡"></el-input>
</el-form-item>
<el-form-item label="产品名称" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="产品名称"></el-input>
</el-form-item>
<el-form-item label="数量" prop="number">
<el-input v-model="dataForm.remark" placeholder="数量"></el-input>
</el-form-item>
<el-form-item label="重量" prop="remark">
<el-input v-model="dataForm.remark" placeholder="重量"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
},
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
}
})
}
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey,
'paramValue': this.dataForm.paramValue,
'remark': this.dataForm.remark
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@@ -0,0 +1,75 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 17:43:13
* @LastEditors: zwq
* @LastEditTime: 2021-11-15 18:20:05
* @Description:
-->
<template>
<el-dialog
:title="!pointType ? '选择起点' : '选择窑炉'"
:close-on-click-modal="false"
:visible.sync="visible"
>
<div class="wareBox" v-for="count in 4" v-bind:key="count" @click="setPoint(count)">
<div class="plat">提升平台{{count}}</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
pointType: ''
}
},
methods: {
init (pointType) {
this.pointType = pointType
this.visible = true
this.$nextTick(() => {
console.log(pointType)
})
},
setPoint (count) {
console.log(count, this.pointType)
this.visible = false
this.$emit('refreshPoint', count, this.pointType)
}
}
}
</script>
<style scoped>
/* 边框特效 */
.wareBox:hover {
background: linear-gradient(to left, deepskyblue, deepskyblue) left top
no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) left top no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right top no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) right top no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) left bottom no-repeat,
linear-gradient(to bottom, deepskyblue, deepskyblue) left bottom no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat,
linear-gradient(to left, deepskyblue, deepskyblue) right bottom no-repeat;
background-size: 5px 30px, 30px 5px;
color: black;
border-radius: 5px;
background-color: rgb(190, 224, 241);
}
.wareBox{
cursor:pointer;
margin: 10px;
height: 100px;
padding: 10px;
line-height: 90px;
text-align: center;
border: 2px solid #cdcdc5;
border-radius: 5px;
}
</style>

View File

@@ -0,0 +1,232 @@
<template>
<div class="mod-config">
<el-form :inline="true">
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
<el-form-item style="margin-left:8%">
任务起点位置 :
<el-button style="margin-left:10px" type="primary" @click="getPoint(0)">{{startBtnName}}</el-button>
</el-form-item>
<el-form-item style="margin-left:2%">
窑炉 :
<el-button style="margin-left:10px" type="primary" @click="getPoint(1)">{{kilnBtnName}}</el-button>
</el-form-item>
<el-form-item style="margin-left:10%">
<el-button type="primary" @click="submitTask()">提交任务</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="id"
header-align="center"
align="center"
width="80"
label="标识卡">
</el-table-column>
<el-table-column
prop="paramKey"
header-align="center"
align="center"
label="客户信息">
</el-table-column>
<el-table-column
prop="paramValue"
header-align="center"
align="center"
label="订单号">
</el-table-column>
<el-table-column
prop="remark"
header-align="center"
align="center"
label="产品名称">
</el-table-column>
<el-table-column
prop="card"
header-align="center"
align="center"
label="材料号牌">
</el-table-column>
<el-table-column
prop="number"
header-align="center"
align="center"
label="数量">
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="center"
label="重量">
</el-table-column>
<el-table-column
prop="unit"
header-align="center"
align="center"
label="单位">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<process-point v-if="processPointVisible" ref="processPoint" @refreshPoint="setPoint"></process-point>
</div>
</template>
<script>
import AddOrUpdate from './order-process-add'
import ProcessPoint from './order-process-point'
export default {
data () {
return {
startBtnName: '选择起点',
kilnBtnName: '选择窑炉',
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
addOrUpdateVisible: false,
processPointVisible: false
}
},
components: {
AddOrUpdate,
ProcessPoint
},
activated () {
this.getDataList()
},
methods: {
// 获取数据列表
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// 新增 / 修改
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
// 获取点位
getPoint (pointType) {
this.processPointVisible = true
this.$nextTick(() => {
this.$refs.processPoint.init(pointType)
})
},
setPoint (count, pointType) {
if (!pointType) {
this.startBtnName = count
} else {
this.kilnBtnName = count
}
},
submitTask () {
if (this.dataList.length === 0) {
this.$message({
message: '任务为空,请新增一条托盘信息',
type: 'warning'
})
} else if (this.startBtnName === '选择起点') {
this.$message({
message: '请选择任务起点',
type: 'warning'
})
} else if (this.kilnBtnName === '选择窑炉') {
this.$message({
message: '请选择窑炉',
type: 'warning'
})
}
},
// 删除
deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
method: 'post',
data: this.$http.adornData(id, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
}
}
</script>

View File

@@ -6,10 +6,24 @@
:collapse="sidebarFold"
:collapseTransition="false"
class="site-sidebar__menu">
<el-menu-item index="home" @click="$router.push({ name: 'home' })">
<el-submenu index="orderProcess">
<template slot="title">
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">首页</span>
</el-menu-item>
<span slot="title" @click="$router.push({ name: 'home' })">首页</span>
</template>
<el-menu-item index="orderProcess" @click="$router.push({ name: 'orderProcess' })">
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">订单加工</span>
</el-menu-item>
<el-menu-item index="exWarehouse" @click="$router.push({ name: 'exWarehouse' })">
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">货物出库</span>
</el-menu-item>
<el-menu-item index="addProcess" @click="$router.push({ name: 'addProcess' })">
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">追加加工</span>
</el-menu-item>
</el-submenu>
<el-submenu index="demo">
<template slot="title">
<icon-svg name="shoucang" class="site-sidebar__menu-icon"></icon-svg>