页面调整

This commit is contained in:
caoqianming 2021-11-03 08:19:51 +08:00
parent c49bb54868
commit b47b2017de
35 changed files with 188 additions and 317 deletions

View File

@ -62,7 +62,7 @@ div:focus {
// main-container global css // main-container global css
.app-container { .app-container {
padding: 10px; padding: 2px;
} }
.el-table--medium td,   .el-table--medium th { .el-table--medium td,   .el-table--medium th {

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button >新增设备</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="equipmentList.results" :data="equipmentList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button >新增设备</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="equipmentList.results" :data="equipmentList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增校准或检定</el-button >新增校准或检定</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="equipmentrecordList.results" :data="equipmentrecordList.results"

View File

@ -25,8 +25,8 @@
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增物料</el-button >新增物料</el-button
> >
@ -153,7 +153,7 @@
</div> </div>
<div> <div>
<el-tooltip class="item" effect="dark" content="添加条件" placement="top"> <el-tooltip class="item" effect="dark" content="添加条件" placement="top">
<el-button @click="addConditions" style='cursor:pointer;width:95%;color:#fe000c;border:1px dashed #fe000c;height:40px;padding:0px;margin-top:10px;margin-left:20px;font-size:26px'> <el-button @click="addConditions" style='cursor:pointer;width:95%;color:#fe000c;border:1px dashed #fe000c;height:40px;padding:0px;margin-top: 2px;margin-left:20px;font-size:26px'>
+ +
</el-button> </el-button>
</el-tooltip> </el-tooltip>

View File

@ -25,7 +25,7 @@
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"

View File

@ -25,7 +25,7 @@
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"

View File

@ -25,7 +25,7 @@
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增仓库</el-button >新增仓库</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="warehouseList.results" :data="warehouseList.results"

View File

@ -1,130 +1,72 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="box-card">
<el-row :gutter="12"> <el-row :gutter="12">
<el-col :span="8"> <el-col :span="8">
<el-card shadow="always"> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>CPU</span> <span>CPU</span>
</div> </div>
<el-row class="row"> <el-descriptions :column="1" border>
<el-col :span="8"> <el-descriptions-item>
属性 <template slot="label"> 逻辑核心数 </template>
</el-col>
<el-col :span="8">
</el-col>
</el-row>
<el-row class="rowlist">
<el-col :span="8">
逻辑核心数
</el-col>
<el-col :span="8">
{{ cpuData.count }} {{ cpuData.count }}
</el-col> </el-descriptions-item>
</el-row> <el-descriptions-item>
<el-row class="rowlist"> <template slot="label"> 物理核心数 </template>
<el-col :span="8">
物理核心数
</el-col>
<el-col :span="8">
{{ cpuData.lcount }} {{ cpuData.lcount }}
</el-col> </el-descriptions-item>
</el-row> <el-descriptions-item>
<el-row class="rowlist"> <template slot="label"> 当前使用率 </template>
<el-col :span="8">
当前使用率
</el-col>
<el-col :span="8">
{{ cpuData.percent }}% {{ cpuData.percent }}%
</el-col> </el-descriptions-item>
</el-row> </el-descriptions>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card shadow="always"> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>内存</span> <span>内存</span>
</div> </div>
<el-row class="row"> <el-descriptions :column="1" border>
<el-col :span="8"> <el-descriptions-item>
属性 <template slot="label"> 总内存 </template>
</el-col> {{ memoryData.total }}GB
<el-col :span="8"> </el-descriptions-item>
<el-descriptions-item>
</el-col> <template slot="label"> 已用内存 </template>
</el-row> {{ memoryData.used }}GB
<el-row class="rowlist"> </el-descriptions-item>
<el-col :span="8"> <el-descriptions-item>
使用率 <template slot="label"> 当前使用率 </template>
</el-col>
<el-col :span="8">
{{ memoryData.percent }}% {{ memoryData.percent }}%
</el-col> </el-descriptions-item>
</el-row> </el-descriptions>
<el-row class="rowlist">
<el-col :span="8">
总内存
</el-col>
<el-col :span="8">
{{memoryData.total}}
</el-col>
</el-row>
<el-row class="rowlist">
<el-col :span="8">
已用内存
</el-col>
<el-col :span="8">
{{memoryData.used}}
</el-col>
</el-row>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card shadow="always"> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>硬盘</span> <span>硬盘</span>
</div> </div>
<el-row class="row"> <el-descriptions :column="1" border>
<el-col :span="8"> <el-descriptions-item>
属性 <template slot="label"> 总大小 </template>
</el-col> {{ diskData.total }}GB
<el-col :span="8"> </el-descriptions-item>
<el-descriptions-item>
</el-col> <template slot="label"> 已用内存 </template>
</el-row> {{ diskData.used }}GB
<el-row class="rowlist"> </el-descriptions-item>
<el-col :span="8"> <el-descriptions-item>
已用百分比 <template slot="label"> 当前使用率 </template>
</el-col>
<el-col :span="8">
{{ diskData.percent }}% {{ diskData.percent }}%
</el-col> </el-descriptions-item>
</el-row> </el-descriptions>
<el-row class="rowlist">
<el-col :span="8">
总大小
</el-col>
<el-col :span="8">
{{diskData.total}}
</el-col>
</el-row>
<el-row class="rowlist">
<el-col :span="8">
已用大小
</el-col>
<el-col :span="8">
{{diskData.used}}
</el-col>
</el-row>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
</div>
<el-card class="box-card"> <el-card style="margin-top: 6px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>日志列表</span> <span>日志列表</span>
</div> </div>
@ -153,33 +95,21 @@
</div> </div>
<el-table <el-table
:data="tableData" :data="tableData"
style="width: 100%;height:400px" style="width: 100%"
> height="100"
<el-table-column v-el-height-adaptive-table="{ bottomOffset: 30 }"
prop="name"
label="日志名称"
>
</el-table-column>
<el-table-column
prop="size"
label="日志大小"
>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="100"
> >
<el-table-column prop="name" label="日志名称"> </el-table-column>
<el-table-column prop="size" label="日志大小"> </el-table-column>
<el-table-column fixed="right" label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button> <el-button @click="handleClick(scope.row)" type="text" size="small"
>查看详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog <el-dialog :visible.sync="dialogVisible" width="80%" title="日志详情">
:visible.sync="dialogVisible"
width="80%"
title="日志详情"
>
<div v-html="logdec" class="dialogDiv"></div> <div v-html="logdec" class="dialogDiv"></div>
</el-dialog> </el-dialog>
</el-card> </el-card>
@ -190,7 +120,7 @@
<script> <script>
import { getlogList, getLog, getServerList } from "@/api/moritor"; import { getlogList, getLog, getServerList } from "@/api/moritor";
const defaultCMA = {} const defaultCMA = {};
export default { export default {
components: {}, components: {},
data() { data() {
@ -212,21 +142,17 @@
this.getServerList(); this.getServerList();
}, },
methods: { methods: {
getlogList() { getlogList() {
getlogList(this.listQuery).then((response) => { getlogList(this.listQuery).then((response) => {
if (response.data) { if (response.data) {
this.tableData = response.data; this.tableData = response.data;
} }
}); });
}, },
handleFilter() { handleFilter() {
this.getlogList(); this.getlogList();
}, },
resetFilter() { resetFilter() {
this.getlogList(); this.getlogList();
}, },
getServerList() { getServerList() {
@ -236,73 +162,16 @@
this.diskData = response.data.disk; this.diskData = response.data.disk;
this.memoryData = response.data.memory; this.memoryData = response.data.memory;
} }
}); });
}, },
handleClick(row) { handleClick(row) {
this.dialogVisible = true; this.dialogVisible = true;
getLog(row.name).then((response) => { getLog(row.name).then((response) => {
if (response.data) { if (response.data) {
this.logdec = response.data.replace(/\n/gm, "<br/>") this.logdec = response.data.replace(/\n/gm, "<br/>");
} }
}); });
}, },
}, },
}; };
</script> </script>
<style>
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.2);
background-color: #fefefe;
border-radius: 7px;
}
::-webkit-scrollbar-thumb{
border-radius: 7px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.2);
background-color: #f5f5f5;
}
.dialogDiv{
height: 70vh;
overflow-y: scroll;
}
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
.box-card {
width: 90%;
margin: 0 auto;
margin-top: 30px;
}
.row {
border-bottom: 1px solid #dfe6ec;
color: #909399;
font-weight: 500;
padding: 10px;
}
.rowlist {
border-bottom: 1px solid #dfe6ec;
color: #606266;
font-weight: 500;
padding: 10px;
}
</style>

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增物料</el-button >新增物料</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="materialList.results" :data="materialList.results"

View File

@ -2,13 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增工序</el-button >新增工序</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="processList.results" :data="processList.results"

View File

@ -21,7 +21,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="6" > <el-col :span="6" >
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button> >新增</el-button>
<el-table <el-table

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增供应商</el-button >新增供应商</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="vendorList.results" :data="vendorList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增标准</el-button >新增标准</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="standardList.results" :data="standardList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增项目</el-button >新增项目</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="testitemList.results" :data="testitemList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button >新增客户</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="contractList.results" :data="contractList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button >新增客户</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="customerList.results" :data="customerList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增订单</el-button >新增订单</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="orderList.results" :data="orderList.results"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button >新增客户</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="contractList.results" :data="contractList.results"

View File

@ -16,7 +16,7 @@
highlight-current highlight-current
:expand-on-click-node="false" :expand-on-click-node="false"
:filter-node-method="filterNode" :filter-node-method="filterNode"
style="margin-top:10px;" style="margin-top: 2px;"
@node-click="handleDictTypeClick" @node-click="handleDictTypeClick"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
@ -52,7 +52,7 @@
v-show="listQuery.type" v-show="listQuery.type"
v-loading="listLoading" v-loading="listLoading"
:data="dictList" :data="dictList"
style="width: 100%;margin-top:10px;" style="width: 100%;margin-top: 2px;"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -41,7 +41,7 @@
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="fileList.results" :data="fileList.results"
style="width: 100%;margin-top:10px;" style="width: 100%;margin-top: 2px;"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -25,7 +25,7 @@
!search || data.name.toLowerCase().includes(search.toLowerCase()) !search || data.name.toLowerCase().includes(search.toLowerCase())
) )
" "
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 2px"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -24,7 +24,7 @@
!search || data.name.toLowerCase().includes(search.toLowerCase()) !search || data.name.toLowerCase().includes(search.toLowerCase())
) )
" "
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 2px"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -25,7 +25,7 @@
!search || data.name.toLowerCase().includes(search.toLowerCase()) !search || data.name.toLowerCase().includes(search.toLowerCase())
) )
" "
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 2px"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -20,7 +20,7 @@
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="tableData" :data="tableData"
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 2px"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -53,7 +53,7 @@
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="dataList.results" :data="dataList.results"
style="width: 100%; margin-top: 10px" style="width: 100%; margin-top: 2px"
highlight-current-row highlight-current-row
row-key="id" row-key="id"
height="100" height="100"

View File

@ -2,13 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button >新增</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
:data="customfieldList" :data="customfieldList"

View File

@ -24,11 +24,11 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="workflowList.results" :data="workflowList.results"

View File

@ -1,12 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增 <el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增
</el-button> </el-button>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
:data="wfstateList" :data="wfstateList"
style="width: 100%" style="width: 100%"
@ -166,7 +166,7 @@
</el-form-item> </el-form-item>
<el-form-item label="字段状态"> <el-form-item label="字段状态">
<el-button @click="addWordStatusChange">添加修改</el-button> <el-button @click="addWordStatusChange">添加修改</el-button>
<el-row v-for="(item,$index) in statusChange" :key="item+$index" style="margin-top: 10px"> <el-row v-for="(item,$index) in statusChange" :key="item+$index" style="margin-top: 2px">
<el-col :span="11"> <el-col :span="11">
<el-select style="width: 100%" v-model="item.name" placeholder="请选择字段"> <el-select style="width: 100%" v-model="item.name" placeholder="请选择字段">
<el-option v-for="item in customfieldList" :key="item.id" :label="item.field_name" <el-option v-for="item in customfieldList" :key="item.id" :label="item.field_name"

View File

@ -23,7 +23,7 @@
@click="handleFilter" @click="handleFilter"
>搜索</el-button> >搜索</el-button>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button> <el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
</div> </div>
</el-card> </el-card>

View File

@ -2,13 +2,13 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button >新增</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
:data="wftransitionList" :data="wftransitionList"
style="width: 100%" style="width: 100%"

View File

@ -24,13 +24,13 @@
>重置</el-button >重置</el-button
> >
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" <el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增项目</el-button >新增项目</el-button
> >
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 2px">
<el-table <el-table
v-loading="listLoading" v-loading="listLoading"
:data="testitemList.results" :data="testitemList.results"

View File

@ -153,6 +153,7 @@ class RecordFormViewSet(OptimizationMixin, CreateUpdateModelAMixin, ModelViewSet
queryset = RecordForm.objects.all() queryset = RecordForm.objects.all()
filterset_fields = ['step', 'type', 'material'] filterset_fields = ['step', 'type', 'material']
search_fields = ['name'] search_fields = ['name']
ordering='id'
def get_serializer_class(self): def get_serializer_class(self):
if self.action =='create': if self.action =='create':

View File

@ -187,8 +187,9 @@ class ResourceViewSet(GenericViewSet):
res_d_list = [] res_d_list = []
res = [] res = []
for i in rdata: for i in rdata:
materials = InputMaterial.objects.filter(subproduction__product__id=i['id'], # 计算输入物料
subproduction__is_deleted=False, is_deleted=False, material__type__in=[3,4]).order_by('material__number')\ materials = SubprodctionMaterial.objects.filter(subproduction__product__id=i['id'],
subproduction__is_deleted=False, is_deleted=False, material__type__in=[3,4], type=1).order_by('material__number')\
.values('material__id', 'material__name', 'material__number', 'material__type', 'count', 'material__count') .values('material__id', 'material__name', 'material__number', 'material__type', 'count', 'material__count')
l_m = list(materials) l_m = list(materials)
for m in l_m: for m in l_m: