Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
eb63453120
|
@ -1,6 +1,6 @@
|
||||||
# vue-admin-template
|
# vue-admin-template
|
||||||
|
|
||||||
> 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。
|
> 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & & iconfont & permission control & lint,这些搭建后台必要的东西。
|
||||||
|
|
||||||
[线上地址](http://panjiachen.github.io/vue-admin-template)
|
[线上地址](http://panjiachen.github.io/vue-admin-template)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
//获取文章列表
|
||||||
|
export function getArticles(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cms/article/',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取某个文章
|
||||||
|
export function getArticle(id) {
|
||||||
|
return request({
|
||||||
|
url: `/cms/article/${id}/`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新增文章
|
||||||
|
export function createArticle(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cms/article/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//
|
||||||
|
export function updateArticle(id,data) {
|
||||||
|
return request({
|
||||||
|
url: `/cms/article/${id}/`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deleteArticle(id) {
|
||||||
|
return request({
|
||||||
|
url: `/cms/article/${id}/`,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -7,6 +7,14 @@ export function getPlanGantt(data) {
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//计划数量统计
|
||||||
|
export function planCount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/srm/plan/count/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//合格率
|
//合格率
|
||||||
export function getProcessYield(data) {
|
export function getProcessYield(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -15,6 +23,14 @@ export function getProcessYield(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//工序当前进度
|
||||||
|
export function getProcessNow(data) {
|
||||||
|
return request({
|
||||||
|
url: '/srm/process/now/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//到岗统计
|
//到岗统计
|
||||||
export function getatwork(data) {
|
export function getatwork(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -24,3 +40,20 @@ export function getatwork(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//产品数量统计
|
||||||
|
export function productCount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/srm/product/count/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//订单数量统计
|
||||||
|
export function orderCount(data) {
|
||||||
|
return request({
|
||||||
|
url: '/srm/order/count/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router);
|
||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from '@/layout'
|
import Layout from '@/layout'
|
||||||
|
@ -608,6 +608,21 @@ export const asyncRoutes = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/cms',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/cms/article',
|
||||||
|
name: '企业资讯',
|
||||||
|
meta: { title: '', icon: 'home', perms: ['cms_manage'] },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'article',
|
||||||
|
name: 'article',
|
||||||
|
component: () => import('@/views/cms/article'),
|
||||||
|
meta: { title: '新闻资讯', icon: 'home', perms: ['article'] }
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/system',
|
path: '/system',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<el-icon class="el-icon-s-marketing"></el-icon>
|
<el-icon class="el-icon-s-marketing"></el-icon>
|
||||||
</span>
|
</span>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<span class="fs-xl text mx-2">企业咨询</span>
|
<span class="fs-xl text mx-2">企业资讯</span>
|
||||||
<div class="decoration2">
|
<div class="decoration2">
|
||||||
<dv-decoration-2 :reverse="true" style="width:5px;height:6rem;" />
|
<dv-decoration-2 :reverse="true" style="width:5px;height:6rem;" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="d-flex jc-center body-box">
|
<div class="d-flex jc-center body-box">
|
||||||
<dv-scroll-board class="dv-scr-board" :config="config" />
|
<dv-scroll-board
|
||||||
|
class="dv-scr-board"
|
||||||
|
:config="configArticle"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -26,7 +29,7 @@ export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
cdata:{},
|
cdata:{},
|
||||||
config: {
|
/* config: {
|
||||||
header: ['消息', '发布时间'],
|
header: ['消息', '发布时间'],
|
||||||
data: [
|
data: [
|
||||||
['张思', '2022-03-05'],
|
['张思', '2022-03-05'],
|
||||||
|
@ -53,7 +56,7 @@ export default {
|
||||||
index: false,
|
index: false,
|
||||||
// columnWidth: [50],
|
// columnWidth: [50],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -87,6 +90,14 @@ export default {
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
configArticle:{
|
||||||
|
type:Object,
|
||||||
|
default:()=>{
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.drawTimingFn();
|
this.drawTimingFn();
|
||||||
},
|
},
|
||||||
|
@ -101,39 +112,7 @@ export default {
|
||||||
}, 3600000);
|
}, 3600000);
|
||||||
},
|
},
|
||||||
setData () {
|
setData () {
|
||||||
this.config = {
|
this.config = this.configArticle;
|
||||||
header: ['消息', '发布时间'],
|
|
||||||
data: [
|
|
||||||
['张思', '2022-03-05'],
|
|
||||||
['李森', '2022-03-05'],
|
|
||||||
['王师', '2022-03-05'],
|
|
||||||
['赵迪', '2022-03-05'],
|
|
||||||
['孟津', '2022-03-05'],
|
|
||||||
['张思', '2022-03-05'],
|
|
||||||
['李森', '2022-03-05'],
|
|
||||||
['王师', '2022-03-05'],
|
|
||||||
['赵迪', '2022-03-05'],
|
|
||||||
['孟津', '2022-03-05'],
|
|
||||||
['孙东课', '2022-03-05'],
|
|
||||||
['周神秘', '2022-03-05'],
|
|
||||||
['吴老弟', '2022-03-05'],
|
|
||||||
['郑成功', '2022-03-05'],
|
|
||||||
['冯宝宝', '2022-03-05'],
|
|
||||||
['孙东课', '2022-03-05'],
|
|
||||||
['周神秘', '2022-03-05'],
|
|
||||||
['吴老弟', '2022-03-05'],
|
|
||||||
['郑成功', '2022-03-05'],
|
|
||||||
['冯宝宝', '2022-03-05']
|
|
||||||
],
|
|
||||||
rowNum: 15, //表格行数
|
|
||||||
headerHeight: 35,
|
|
||||||
headerBGC: '#0f1325', //表头
|
|
||||||
oddRowBGC: '#0f1325', //奇数行
|
|
||||||
evenRowBGC: '#171c33', //偶数行
|
|
||||||
index: false,
|
|
||||||
// columnWidth: [50],
|
|
||||||
align: ['center']
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<!-- 4个主要的数据 -->
|
<!-- 4个主要的数据 -->
|
||||||
<div class="bottom-data">
|
<div class="bottom-data">
|
||||||
<div
|
<div
|
||||||
class="item-box mt-2"
|
|
||||||
v-for="(item, index) in numberData"
|
v-for="(item, index) in numberData"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
class="item-box mt-2"
|
||||||
>
|
>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<!--<span class="coin">¥</span>-->
|
<!--<span class="coin">¥</span>-->
|
||||||
|
@ -45,63 +45,12 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: {},
|
options: {},
|
||||||
numberData: [
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [15],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '今日产量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [1144],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '年累计完成量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [361],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '在制品数量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [361],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '不合格数量'
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
cdata: {
|
cdata: {
|
||||||
xData: ["冷加工", "热弯", "化学钢化"],
|
xData: ["冷加工", "热弯", "化学钢化"],
|
||||||
seriesData: [
|
seriesData: [
|
||||||
{value: 25, name: "冷加工"},
|
{value: 25, name: "冷加工"},
|
||||||
{value: 20, name: "热弯"},
|
{value: 20, name: "热弯"},
|
||||||
{value: 35, name: "化学钢化"}
|
{value: 30, name: "化学钢化"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +58,14 @@
|
||||||
components: {
|
components: {
|
||||||
Echart
|
Echart
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
numberData:{
|
||||||
|
type:Array,
|
||||||
|
default:()=>{
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.changeTiming()
|
this.changeTiming()
|
||||||
},
|
},
|
||||||
|
@ -166,8 +123,12 @@
|
||||||
}, 3000)
|
}, 3000)
|
||||||
},
|
},
|
||||||
changeNumber() {
|
changeNumber() {
|
||||||
this.numberData.forEach((item, index) => {
|
this.numberData.forEach((item) => {
|
||||||
item.number.number[0] += ++index
|
/*item.number.number[0] += ++index
|
||||||
|
item.number = {...item.number}*/
|
||||||
|
let num = 0;
|
||||||
|
item.number.number[0] = 0;
|
||||||
|
item.number.number[0] = num;
|
||||||
item.number = {...item.number}
|
item.number = {...item.number}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
<!-- 4个主要的数据 -->
|
<!-- 4个主要的数据 -->
|
||||||
<div class="bottom-data">
|
<div class="bottom-data">
|
||||||
<div
|
<div
|
||||||
class="item-box mt-2"
|
v-for="(item, index) in numberDataTwo"
|
||||||
v-for="(item, index) in numberData"
|
|
||||||
:key="index"
|
:key="index"
|
||||||
|
class="item-box mt-2"
|
||||||
>
|
>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<!--<span class="coin">¥</span>-->
|
<!--<span class="coin">¥</span>-->
|
||||||
|
@ -45,63 +45,13 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options: {},
|
options: {},
|
||||||
numberData: [
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [15],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '今日产量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [1144],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '年累计完成量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [361],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '在制品数量'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
number: {
|
|
||||||
number: [361],
|
|
||||||
toFixed: 1,
|
|
||||||
textAlign: 'left',
|
|
||||||
content: '{nt}',
|
|
||||||
style: {
|
|
||||||
fontSize: 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: '不合格数量'
|
|
||||||
},
|
|
||||||
],
|
|
||||||
cdata: {
|
cdata: {
|
||||||
xData: ["镀膜", "夹层", "包边", "装框"],
|
xData: ["镀膜", "夹层", "包边", "装框"],
|
||||||
seriesData: [
|
seriesData: [
|
||||||
{value: 10, name: "镀膜"},
|
{value: 10, name: "镀膜"},
|
||||||
{value: 5, name: "夹层"},
|
{value: 13, name: "夹层"},
|
||||||
{value: 15, name: "包边"},
|
{value: 15, name: "包边"},
|
||||||
{value: 25, name: "装框"}
|
{value: 20, name: "装框"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +59,14 @@
|
||||||
components: {
|
components: {
|
||||||
Echart
|
Echart
|
||||||
},
|
},
|
||||||
|
props:{
|
||||||
|
numberDataTwo:{
|
||||||
|
type:Array,
|
||||||
|
default:()=>{
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.changeTiming()
|
this.changeTiming()
|
||||||
},
|
},
|
||||||
|
@ -164,8 +122,10 @@
|
||||||
}, 3000)
|
}, 3000)
|
||||||
},
|
},
|
||||||
changeNumber() {
|
changeNumber() {
|
||||||
this.numberData.forEach((item, index) => {
|
this.numberDataTwo.forEach((item) => {
|
||||||
item.number.number[0] += ++index
|
let num = 0;
|
||||||
|
item.number.number[0] = 0;
|
||||||
|
item.number.number[0] = num;
|
||||||
item.number = {...item.number}
|
item.number = {...item.number}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,45 +50,61 @@
|
||||||
<!-- 第三行数据 -->
|
<!-- 第三行数据 -->
|
||||||
<div id="centerWrap" class="content-box">
|
<div id="centerWrap" class="content-box">
|
||||||
<!-- 数据统计 -->
|
<!-- 数据统计 -->
|
||||||
<div v-if="numberShow">
|
<div>
|
||||||
<center
|
<center
|
||||||
|
v-if="numberShow"
|
||||||
:titleItem="titleItem"
|
:titleItem="titleItem"
|
||||||
:rate="rate"
|
:rate="rate"
|
||||||
:water="water"
|
:water="water"
|
||||||
:ranking="ranking"
|
:ranking="ranking"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="processRate">
|
<!--工序成品率-->
|
||||||
|
<div>
|
||||||
<centerRight2
|
<centerRight2
|
||||||
|
v-if="processRate"
|
||||||
:config="config"
|
:config="config"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<!--一车间-->
|
||||||
<div>
|
<div>
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<centerLeft1/>
|
<centerLeft1
|
||||||
|
v-if="limitedOne"
|
||||||
|
:numberData="numberData"
|
||||||
|
/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
<!--二车间-->
|
||||||
<div>
|
<div>
|
||||||
<dv-border-box-1>
|
<dv-border-box-1>
|
||||||
<centerLeft2/>
|
<centerLeft2
|
||||||
|
v-if="limitedTwo"
|
||||||
|
:numberDataTwo="numberDataTwo"
|
||||||
|
/>
|
||||||
</dv-border-box-1>
|
</dv-border-box-1>
|
||||||
</div>
|
</div>
|
||||||
|
<!--到岗情况-->
|
||||||
<div v-if="listUser">
|
<div>
|
||||||
<dv-border-box-13>
|
<dv-border-box-10>
|
||||||
<centerRight1
|
<centerRight1
|
||||||
|
v-if="listUser"
|
||||||
:userConfig="userConfig"
|
:userConfig="userConfig"
|
||||||
/>
|
/>
|
||||||
</dv-border-box-13>
|
</dv-border-box-10>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 第四行数据 -->
|
<!-- 第四行数据 -->
|
||||||
<div class="bototm-box">
|
<div class="bototm-box">
|
||||||
<dv-border-box-3>
|
<dv-border-box-3 v-if="limitedTwo">
|
||||||
<bottomRight/>
|
<bottomRight
|
||||||
|
:configArticle="configArticle"
|
||||||
|
/>
|
||||||
</dv-border-box-3>
|
</dv-border-box-3>
|
||||||
<dv-border-box-13>
|
<dv-border-box-13>
|
||||||
<bottomLeft/>
|
<bottomLeft
|
||||||
|
v-if="limitedTwo"
|
||||||
|
/>
|
||||||
</dv-border-box-13>
|
</dv-border-box-13>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -110,8 +126,9 @@
|
||||||
import bottomRight from './bottomRight'
|
import bottomRight from './bottomRight'
|
||||||
import {getPlanGantt} from "@/api/srm";
|
import {getPlanGantt} from "@/api/srm";
|
||||||
import {getProductionplanList} from "@/api/pm";
|
import {getProductionplanList} from "@/api/pm";
|
||||||
import {getProcessYield} from "@/api/srm";
|
import {getProcessYield,productCount,getProcessNow,planCount,orderCount} from "@/api/srm";
|
||||||
import {getContractList, getOrderList} from "@/api/sam";
|
import {getContractList, getOrderList} from "@/api/sam";
|
||||||
|
import {getArticles} from "@/api/cms";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [drawMixin],
|
mixins: [drawMixin],
|
||||||
|
@ -236,7 +253,7 @@
|
||||||
unit: '%'
|
unit: '%'
|
||||||
},
|
},
|
||||||
water: {
|
water: {
|
||||||
data: [24, 45],
|
data: [45, 90],
|
||||||
shape: 'roundRect',
|
shape: 'roundRect',
|
||||||
formatter: '{value}%',
|
formatter: '{value}%',
|
||||||
waveNum: 3
|
waveNum: 3
|
||||||
|
@ -277,18 +294,9 @@
|
||||||
},
|
},
|
||||||
//人员到岗
|
//人员到岗
|
||||||
userConfig: {
|
userConfig: {
|
||||||
header: ['姓名', '部门', '到岗情况'],
|
header: ['姓名', '到岗情况'],
|
||||||
data: [
|
data: [
|
||||||
['张思', '一车间', "<span class='colorGrass'>已到岗</span>"],
|
['冯宝宝', "<span class='colorGrass'>已到岗</span>"]
|
||||||
['李森', '一车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['王师', '一车间', "<span class='colorRed'>未到岗</span>"],
|
|
||||||
['赵迪', '一车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['孟津', '一车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['孙东课', '一车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['周神秘', '二车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['吴老弟', '二车间', "<span class='colorRed'>未到岗</span>"],
|
|
||||||
['郑成功', '二车间', "<span class='colorGrass'>已到岗</span>"],
|
|
||||||
['冯宝宝', '二车间', "<span class='colorGrass'>已到岗</span>"]
|
|
||||||
],
|
],
|
||||||
rowNum: 7, //表格行数
|
rowNum: 7, //表格行数
|
||||||
headerHeight: 35,
|
headerHeight: 35,
|
||||||
|
@ -296,6 +304,127 @@
|
||||||
oddRowBGC: '#0f1325', //奇数行
|
oddRowBGC: '#0f1325', //奇数行
|
||||||
evenRowBGC: '#171c33', //偶数行
|
evenRowBGC: '#171c33', //偶数行
|
||||||
index: false,
|
index: false,
|
||||||
|
columnWidth: [70],
|
||||||
|
align: ['center']
|
||||||
|
},
|
||||||
|
//车间一
|
||||||
|
numberData: [
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '今日产量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '年累计完成量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '在制品数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '不合格数量'
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
limitedOne:false,
|
||||||
|
//车间二
|
||||||
|
numberDataTwo: [
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '今日产量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '年累计完成量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '在制品数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
number: {
|
||||||
|
number: [0],
|
||||||
|
toFixed: 0,
|
||||||
|
textAlign: 'left',
|
||||||
|
content: '{nt}',
|
||||||
|
style: {
|
||||||
|
fontSize: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
text: '不合格数量'
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
limitedTwo:false,
|
||||||
|
configArticle: {
|
||||||
|
header: ['标题','置顶','作者', '发布时间'],
|
||||||
|
data: [
|
||||||
|
['郑成功', '2022-03-05'],
|
||||||
|
['冯宝宝', '2022-03-05']
|
||||||
|
],
|
||||||
|
rowNum: 15, //表格行数
|
||||||
|
headerHeight: 40,
|
||||||
|
headerBGC: '#0f1325', //表头
|
||||||
|
oddRowBGC: '#0f1325', //奇数行
|
||||||
|
evenRowBGC: '#171c33', //偶数行
|
||||||
|
index: false,
|
||||||
// columnWidth: [50],
|
// columnWidth: [50],
|
||||||
align: ['center']
|
align: ['center']
|
||||||
},
|
},
|
||||||
|
@ -336,6 +465,9 @@
|
||||||
that.getCenterData();
|
that.getCenterData();
|
||||||
that.getCenterRight2Data();
|
that.getCenterRight2Data();
|
||||||
that.getUserList();
|
that.getUserList();
|
||||||
|
that.getOneData();//车间一
|
||||||
|
that.getTwoData();//车间二
|
||||||
|
that.getArticle();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timing)
|
clearInterval(this.timing)
|
||||||
|
@ -365,9 +497,12 @@
|
||||||
},
|
},
|
||||||
getCenterData() {
|
getCenterData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let dat = new Date();
|
||||||
|
let Year = dat.getFullYear();
|
||||||
|
let month = dat.getMonth() + 1;
|
||||||
|
let searchTime = Year + '-' + month + '-01';
|
||||||
that.numberShow = false;
|
that.numberShow = false;
|
||||||
//合同
|
getContractList({ //合同
|
||||||
getContractList({
|
|
||||||
type: 'big_screen',
|
type: 'big_screen',
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 1,
|
page_size: 1,
|
||||||
|
@ -380,13 +515,47 @@
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 1,
|
page_size: 1,
|
||||||
create_time_start: that.create_time_start
|
create_time_start: that.create_time_start
|
||||||
}).then((response) => {
|
}).then((respons) => {//订单
|
||||||
if (response.data) {
|
if (respons.data) {
|
||||||
that.titleItem[1].number.number[0] = response.data.count;
|
that.titleItem[1].number.number[0] = respons.data.count;
|
||||||
getProductionplanList({type: 'big_screen', page: 1, page_size: 1, tag: 'working'}).then((response) => {
|
getProductionplanList({type: 'big_screen', page: 1, page_size: 1, tag: 'working'}).then((respon) => {
|
||||||
if (response.data) {
|
if (respon.data) {
|
||||||
that.titleItem[2].number.number[0] = response.data.count;
|
that.titleItem[2].number.number[0] = respon.data.count;
|
||||||
that.numberShow = true;
|
productCount({type: 'big_screen',datetime_start:searchTime,tag:1}).then(respo=>{
|
||||||
|
if (respo.data) {
|
||||||
|
that.titleItem[3].number.number[0] = respo.data.count_selled;
|
||||||
|
that.titleItem[4].number.number[0] = respo.data.count_notok;
|
||||||
|
let mtestCount = respo.data.count_mtestok + respo.data.count_mtestnotok;
|
||||||
|
that.titleItem[5].number.number[0] = Math.floor((respo.data.count_mtestok/mtestCount)*100);
|
||||||
|
that.rate[0].tips = Math.floor((respo.data.count_ok/respo.data.count)*100);
|
||||||
|
getProcessNow({type: 'big_screen'}).then(res=>{//工序生产进度
|
||||||
|
if (res.data) {
|
||||||
|
let list = res.data;
|
||||||
|
let data = [];
|
||||||
|
list.forEach(item => {
|
||||||
|
let obj = new Object();
|
||||||
|
obj.name = item.process__name;
|
||||||
|
let value = Math.floor(item.count/item.count_real * 100);
|
||||||
|
obj.value = value>100?100:value;
|
||||||
|
data.push(obj)
|
||||||
|
});
|
||||||
|
that.ranking.data = data;
|
||||||
|
//任务完成率
|
||||||
|
/* planCount({type: 'big_screen'}).then(res=>{
|
||||||
|
debugger;
|
||||||
|
})*/
|
||||||
|
//准时交付率
|
||||||
|
/*getOrderList({type: 'big_screen',page: 1, page_size: that.warningPageSize, tag: 'near_delivery'}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.warningList = response.data.results;
|
||||||
|
that.warningTotal = response.data.count;
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
that.numberShow = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -418,6 +587,52 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//一车间
|
||||||
|
getOneData(){
|
||||||
|
let that = this;
|
||||||
|
that.limitedOne = false;
|
||||||
|
let dat = new Date();
|
||||||
|
let Year = dat.getFullYear();
|
||||||
|
let month = dat.getMonth() + 1;
|
||||||
|
let searchTime = Year + '-' + month + '-01';
|
||||||
|
let searchYear = Year + '-' + '01-01';
|
||||||
|
productCount({type: 'big_screen',datetime_start:searchTime,tag:2,dept:1}).then(response=>{
|
||||||
|
if (response.data) {
|
||||||
|
that.numberData[0].number.number[0] = response.data.count;
|
||||||
|
that.numberData[2].number.number[0] = response.data.count_doing;
|
||||||
|
that.numberData[3].number.number[0] = response.data.count_notok;
|
||||||
|
productCount({type: 'big_screen',datetime_start:searchYear,tag:2,dept:1}).then(res=>{
|
||||||
|
if (res.data) {
|
||||||
|
that.numberData[1].number.number[0] = res.data.count;
|
||||||
|
that.limitedOne = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//二车间
|
||||||
|
getTwoData(){
|
||||||
|
let that = this;
|
||||||
|
that.limitedTwo = false;
|
||||||
|
let dat = new Date();
|
||||||
|
let Year = dat.getFullYear();
|
||||||
|
let month = dat.getMonth() + 1;
|
||||||
|
let searchTime = Year + '-' + month + '-01';
|
||||||
|
let searchYear = Year + '-' + '01-01';
|
||||||
|
productCount({type: 'big_screen',datetime_start:searchTime,tag:2,dept:2}).then(response=>{
|
||||||
|
if (response.data) {
|
||||||
|
that.numberDataTwo[0].number.number[0] = response.data.count;
|
||||||
|
that.numberDataTwo[2].number.number[0] = response.data.count_doing;
|
||||||
|
that.numberDataTwo[3].number.number[0] = response.data.count_notok;
|
||||||
|
productCount({type: 'big_screen',datetime_start:searchYear,tag:2,dept:2}).then(res=>{
|
||||||
|
if (res.data) {
|
||||||
|
that.numberDataTwo[1].number.number[0] = res.data.count;
|
||||||
|
that.limitedTwo = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
//人员到岗情况列表
|
//人员到岗情况列表
|
||||||
getUserList() {
|
getUserList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -429,7 +644,7 @@
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
let obj = [];
|
let obj = [];
|
||||||
obj.push(item.name);
|
obj.push(item.name);
|
||||||
obj.push(item.dept_.name);
|
// obj.push(item.dept_.name);
|
||||||
if (item.is_atwork) {
|
if (item.is_atwork) {
|
||||||
obj.push("<span class='colorGrass'>已到岗</span>")
|
obj.push("<span class='colorGrass'>已到岗</span>")
|
||||||
} else {
|
} else {
|
||||||
|
@ -442,6 +657,32 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//企业资讯
|
||||||
|
getArticle(){
|
||||||
|
let that = this;
|
||||||
|
getArticles({type: 'big_screen',page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
// this.configArticle = response.data;
|
||||||
|
let list = response.data;
|
||||||
|
let data=[];
|
||||||
|
list.forEach(item => {
|
||||||
|
let obj = [];
|
||||||
|
obj.push(item.title);
|
||||||
|
if(item.is_top===false){
|
||||||
|
obj.push('未置顶');
|
||||||
|
}else{
|
||||||
|
obj.push('已置顶');
|
||||||
|
}
|
||||||
|
obj.push(item.author);
|
||||||
|
obj.push(item.create_time);
|
||||||
|
data.push(obj)
|
||||||
|
});
|
||||||
|
that.configArticle.data=data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//任务完成进度
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,269 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="checkPermission(['article_create'])"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handleCreate"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-input
|
||||||
|
v-model="listQuery.search"
|
||||||
|
placeholder="文章名称"
|
||||||
|
style="width: 300px"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="handleFilter"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleFilter"
|
||||||
|
>
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="resetFilter"
|
||||||
|
>
|
||||||
|
重置
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="articleList.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="标题" prop="title">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="作者" prop="author">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time" width="160">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['article_update'])"
|
||||||
|
type="primary"
|
||||||
|
@click="handleEdit(scope)"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['article_delete'])"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete(scope)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="articleList.count > 0"
|
||||||
|
:total="articleList.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="dialogType === 'edit' ? '编辑资讯' : '新增资讯'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="params"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<el-form-item label="标题" prop="title">
|
||||||
|
<el-input v-model="params.title" placeholder="文章标题"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容" prop="content">
|
||||||
|
<el-input v-model="params.content" placeholder="文章内容"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="作者">
|
||||||
|
<el-input v-model="params.author" placeholder="作者"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否发布">
|
||||||
|
<el-switch v-model="params.is_published"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否置顶">
|
||||||
|
<el-switch v-model="params.is_top"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {getArticles,getArticle, createArticle, updateArticle, deleteArticle} from "@/api/cms";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaulteparams =
|
||||||
|
{title:'',
|
||||||
|
content:'',
|
||||||
|
author:'',
|
||||||
|
is_published:false,
|
||||||
|
is_top:false
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "article",
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
defaulteparams: defaulteparams,
|
||||||
|
articleList: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
params:{
|
||||||
|
title:'',
|
||||||
|
content:'',
|
||||||
|
author:'',
|
||||||
|
is_published:false,
|
||||||
|
is_top:false,
|
||||||
|
},
|
||||||
|
listLoading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogType: "new",
|
||||||
|
rule1: {
|
||||||
|
title: [{required: true, message: "请输入标题", trigger: "blur"}],
|
||||||
|
contact: [{required: true, message: "请输入内容", trigger: "blur"}],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
|
//设备列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
getArticles(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.articleList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCreate() {
|
||||||
|
this.params = Object.assign({}, defaulteparams);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit(scope) {
|
||||||
|
this.dialogType = "edit";
|
||||||
|
getArticle(scope.row.id).then(res=>{
|
||||||
|
if(res.code===200){
|
||||||
|
this.params.id = res.data.id;
|
||||||
|
this.params.title = res.data.title;
|
||||||
|
this.params.content = res.data.content;
|
||||||
|
this.params.author = res.data.author;
|
||||||
|
this.params.is_published = res.data.is_published;
|
||||||
|
this.params.is_top = res.data.is_top;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then( () => {
|
||||||
|
deleteArticle(scope.row.id).then(res=>{
|
||||||
|
if(res.code===200){
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
async confirm(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const isEdit = this.dialogType === "edit";
|
||||||
|
if (isEdit) {
|
||||||
|
updateArticle(this.params.id, this.params).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
createArticle(this.params).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<div class="totalCountWrap">
|
<div class="totalCountWrap">
|
||||||
<span class="totalCountText">本月交付产品</span>
|
<span class="totalCountText">本月交付产品</span>
|
||||||
<div class="totalCountNum">
|
<div class="totalCountNum">
|
||||||
<span class="totalCount">30</span>
|
<span class="totalCount">{{selledTotalCurrent}}</span>
|
||||||
<span>个</span>
|
<span>个</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<div class="totalCountWrap">
|
<div class="totalCountWrap">
|
||||||
<span class="totalCountText">本月不合格产品</span>
|
<span class="totalCountText">本月不合格产品</span>
|
||||||
<div class="totalCountNum">
|
<div class="totalCountNum">
|
||||||
<span class="totalCount">30</span>
|
<span class="totalCount">{{notokTotalCurrent}}</span>
|
||||||
<span>个</span>
|
<span>个</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
import {getmaterialbatchList} from "@/api/inm";
|
import {getmaterialbatchList} from "@/api/inm";
|
||||||
import gantt from "@/components/Gantt/dashGantt";
|
import gantt from "@/components/Gantt/dashGantt";
|
||||||
import {getpEquipmentList} from "@/api/equipment";
|
import {getpEquipmentList} from "@/api/equipment";
|
||||||
import {getProcessYield, getPlanGantt} from "@/api/srm";
|
import {getProcessYield, getPlanGantt,productCount} from "@/api/srm";
|
||||||
import {getContractList, getOrderList} from "@/api/sam";
|
import {getContractList, getOrderList} from "@/api/sam";
|
||||||
import {getToken} from '@/utils/auth' // get token from cookie
|
import {getToken} from '@/utils/auth' // get token from cookie
|
||||||
export default {
|
export default {
|
||||||
|
@ -408,8 +408,8 @@
|
||||||
orderTotalCurrent: null,
|
orderTotalCurrent: null,
|
||||||
planTotalCount: null,//已排产任务总数
|
planTotalCount: null,//已排产任务总数
|
||||||
planTotalCurrent: null,
|
planTotalCurrent: null,
|
||||||
rderTotalCount: null,//累计交付产品总数
|
selledTotalCurrent: null,//累计交付产品总数
|
||||||
derTotalCount: null,//累计不合格产品总数
|
notokTotalCurrent: null,//累计不合格产品总数
|
||||||
listLoadingPlan: false,
|
listLoadingPlan: false,
|
||||||
listLoadingEm: false,
|
listLoadingEm: false,
|
||||||
listLoadingUser: false,
|
listLoadingUser: false,
|
||||||
|
@ -490,22 +490,12 @@
|
||||||
that.currentDay = dat.getDate();
|
that.currentDay = dat.getDate();
|
||||||
let create_time_start = that.currentYear + '-' + that.currentMonth + '-01';
|
let create_time_start = that.currentYear + '-' + that.currentMonth + '-01';
|
||||||
//获取合同数
|
//获取合同数
|
||||||
getContractList({page: 1, page_size: 1}).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
that.contractTotalCount = response.data.count;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
getContractList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
|
getContractList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.contractTotalCurrent = response.data.count;
|
that.contractTotalCurrent = response.data.count;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//获取生产订单数
|
//获取生产订单数
|
||||||
getOrderList({page: 1, page_size: 1}).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
that.orderTotalCount = response.data.count;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
getOrderList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
|
getOrderList({page: 1, page_size: 1, create_time_start: create_time_start}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.orderTotalCurrent = response.data.count;
|
that.orderTotalCurrent = response.data.count;
|
||||||
|
@ -517,13 +507,19 @@
|
||||||
that.planTotalCount = response.data.count;
|
that.planTotalCount = response.data.count;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//本月在制任务
|
||||||
getProductionplanList({page: 1, page_size: 1, tag: 'working'}).then((response) => {
|
getProductionplanList({page: 1, page_size: 1, tag: 'working'}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.planTotalCurrent = response.data.count;
|
that.planTotalCurrent = response.data.count;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//获取交付产品
|
//本月交付产品&本月不合格产品
|
||||||
|
productCount({datetime_start:create_time_start,tag:1}).then(respo=>{
|
||||||
|
if (respo.data) {
|
||||||
|
that.selledTotalCurrent = respo.data.count_selled;
|
||||||
|
that.notokTotalCurrent = respo.data.count_notok;
|
||||||
|
}
|
||||||
|
});
|
||||||
//获取不合格产品
|
//获取不合格产品
|
||||||
|
|
||||||
//获取成品率
|
//获取成品率
|
||||||
|
|
Loading…
Reference in New Issue