excelpagesChange
This commit is contained in:
parent
d81dccac01
commit
c501664bc9
|
@ -163,6 +163,12 @@ export const asyncRoutes = [
|
||||||
name: 'productprocess',
|
name: 'productprocess',
|
||||||
component: () => import('@/views/mtm/productprocess'),
|
component: () => import('@/views/mtm/productprocess'),
|
||||||
meta: { title: '产品管理', icon: 'product', perms: ['mtm_productprocess'] }
|
meta: { title: '产品管理', icon: 'product', perms: ['mtm_productprocess'] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'knowledgeBase',
|
||||||
|
name: 'knowledgeBase',
|
||||||
|
component: () => import('@/views/mtm/knowledgeBase'),
|
||||||
|
meta: { title: '知识库', icon: 'procedure', perms: ['mtm_process'] }
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -291,61 +297,61 @@ export const asyncRoutes = [
|
||||||
name: 'record',
|
name: 'record',
|
||||||
component: () => import('@/views/em/record'),
|
component: () => import('@/views/em/record'),
|
||||||
meta: { title: '校准检定记录', icon: 'calibrationRecord', perms: ['em_record'] }
|
meta: { title: '校准检定记录', icon: 'calibrationRecord', perms: ['em_record'] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'maintenance',
|
||||||
|
name: 'maintenance',
|
||||||
|
component: () => import('@/views/em/maintenance'),
|
||||||
|
meta: { title: '设备维修', icon: 'calibrationRecord', perms: ['em_record'] }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/safeEnviro',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/safeEnviro/hiddenDanger',
|
||||||
|
name: 'safeEnviro',
|
||||||
|
meta: { title: '安环管理', icon: 'equipment', perms: ['employee_manage'] },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'hiddenDanger',
|
||||||
|
name: 'hiddenDanger',
|
||||||
|
component: () => import('@/views/safeEnviro/hiddenDanger'),
|
||||||
|
meta: { title: '隐患排查', icon: 'equipment', perms: ['employee_manage'] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'riskControl',
|
||||||
|
name: 'riskControl',
|
||||||
|
component: () => import('@/views/safeEnviro/riskControl'),
|
||||||
|
meta: { title: '风险管控', icon: 'equipment', perms: ['employee_manage'] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'Education',
|
||||||
|
name: 'Education',
|
||||||
|
component: () => import('@/views/safeEnviro/Education'),
|
||||||
|
meta: { title: '教育培训', icon: 'equipment', perms: ['employee_manage'] }
|
||||||
|
} ,
|
||||||
|
{
|
||||||
|
path: 'environmetManage',
|
||||||
|
name: 'environmetManage',
|
||||||
|
component: () => import('@/views/safeEnviro/environmetManage'),
|
||||||
|
meta: { title: '环境管理', icon: 'equipment', perms: ['employee_manage'] }
|
||||||
|
} ,
|
||||||
|
{
|
||||||
|
path: 'intelligentAlarm',
|
||||||
|
name: 'intelligentAlarm',
|
||||||
|
component: () => import('@/views/safeEnviro/intelligentAlarm'),
|
||||||
|
meta: { title: '智能报警', icon: 'equipment', perms: ['employee_manage'] }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// path: '/safeEnviro',
|
|
||||||
// component: Layout,
|
|
||||||
// redirect: '/safeEnviro/hiddenDanger',
|
|
||||||
// name: 'safeEnviro',
|
|
||||||
// meta: { title: '安环管理', icon: 'equipment', perms: ['employee_manage'] },
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// path: 'hiddenDanger',
|
|
||||||
// name: 'hiddenDanger',
|
|
||||||
// component: () => import('@/views/safeEnviro/hiddenDanger'),
|
|
||||||
// meta: { title: '隐患排查', icon: 'equipment', perms: ['employee_manage'] }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'riskControl',
|
|
||||||
// name: 'riskControl',
|
|
||||||
// component: () => import('@/views/safeEnviro/riskControl'),
|
|
||||||
// meta: { title: '风险管控', icon: 'equipment', perms: ['employee_manage'] }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'Education',
|
|
||||||
// name: 'Education',
|
|
||||||
// component: () => import('@/views/safeEnviro/Education'),
|
|
||||||
// meta: { title: '教育培训', icon: 'equipment', perms: ['employee_manage'] }
|
|
||||||
// } ,
|
|
||||||
// {
|
|
||||||
// path: 'environmetManage',
|
|
||||||
// name: 'environmetManage',
|
|
||||||
// component: () => import('@/views/safeEnviro/environmetManage'),
|
|
||||||
// meta: { title: '环境管理', icon: 'equipment', perms: ['employee_manage'] }
|
|
||||||
// } ,
|
|
||||||
// {
|
|
||||||
// path: 'intelligentAlarm',
|
|
||||||
// name: 'intelligentAlarm',
|
|
||||||
// component: () => import('@/views/safeEnviro/intelligentAlarm'),
|
|
||||||
// meta: { title: '智能报警', icon: 'equipment', perms: ['employee_manage'] }
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: '/sam',
|
path: '/sam',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/sam/customer',
|
redirect: '/sam/contract',
|
||||||
name: 'sam',
|
name: 'sam',
|
||||||
meta: { title: '销售管理', icon: 'sale', perms: ['sam_manage'] },
|
meta: { title: '销售管理', icon: 'sale', perms: ['sam_manage'] },
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path: 'customer',
|
|
||||||
name: 'customer',
|
|
||||||
component: () => import('@/views/sam/customer'),
|
|
||||||
meta: { title: '客户管理', icon: 'customer', perms: ['sam_customer'] }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'contract',
|
path: 'contract',
|
||||||
name: 'contract',
|
name: 'contract',
|
||||||
|
@ -360,7 +366,6 @@ export const asyncRoutes = [
|
||||||
meta: { title: '合同详情'},
|
meta: { title: '合同详情'},
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
|
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
path: 'order',
|
path: 'order',
|
||||||
|
@ -393,6 +398,27 @@ export const asyncRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/customerManage',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/customerManage/customer',
|
||||||
|
name: 'customerManage',
|
||||||
|
meta: { title: '客户管理', icon: 'materialStatistics' },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'customer',
|
||||||
|
name: 'customer',
|
||||||
|
component: () => import('@/views/customerManage/customer'),
|
||||||
|
meta: { title: '客户信息', icon: 'materialStatistics'}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'feedback',
|
||||||
|
name: 'feedback',
|
||||||
|
component: () => import('@/views/customerManage/feedback'),
|
||||||
|
meta: { title: '客户反馈', icon: 'materialStatistics'}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/qm',
|
path: '/qm',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
@ -459,21 +485,21 @@ export const asyncRoutes = [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/energyManage',
|
path: '/energyManage',
|
||||||
// component: Layout,
|
component: Layout,
|
||||||
// redirect: '/energyManage/energy',
|
redirect: '/energyManage/energy',
|
||||||
// name: 'energyManage',
|
name: 'energyManage',
|
||||||
// meta: { title: '能源管理', icon: 'materialStatistics' },
|
meta: { title: '能源管理', icon: 'materialStatistics' },
|
||||||
// children: [
|
children: [
|
||||||
// {
|
{
|
||||||
// path: 'energy',
|
path: 'energy',
|
||||||
// name: 'energy',
|
name: 'energy',
|
||||||
// component: () => import('@/views/energyManage/energy'),
|
component: () => import('@/views/energyManage/energy'),
|
||||||
// meta: { title: '能源统计', icon: 'materialStatistics'}
|
meta: { title: '能源统计', icon: 'materialStatistics'}
|
||||||
// },
|
},
|
||||||
// ]
|
]
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
path: '/personnel',
|
path: '/personnel',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
@ -554,6 +580,12 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/inm/product'),
|
component: () => import('@/views/inm/product'),
|
||||||
meta: { title: '成品库', icon: 'finishedProduct', perms: ['inm_product'] }
|
meta: { title: '成品库', icon: 'finishedProduct', perms: ['inm_product'] }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'logistics',
|
||||||
|
name: 'logistics',
|
||||||
|
component: () => import('@/views/inm/logistics'),
|
||||||
|
meta: { title: '物流信息', icon: 'finishedProduct', perms: ['inm_product'] }
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -570,6 +602,13 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/procurement/vendor'),
|
component: () => import('@/views/procurement/vendor'),
|
||||||
meta: { title: '供应商', icon: 'supplier', perms: ['pum_vendor'] }
|
meta: { title: '供应商', icon: 'supplier', perms: ['pum_vendor'] }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'vendorDetails/:id',
|
||||||
|
name: 'vendorDetails',
|
||||||
|
component: () => import('@/views/procurement/vendorDetails'),
|
||||||
|
meta: { title: '供应商详情页'},
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'puorder',
|
path: 'puorder',
|
||||||
name: 'puorder',
|
name: 'puorder',
|
||||||
|
@ -610,6 +649,12 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/statistics/personStatistics'),
|
component: () => import('@/views/statistics/personStatistics'),
|
||||||
meta: { title: '人员统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] }
|
meta: { title: '人员统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'sales',
|
||||||
|
name: 'sales',
|
||||||
|
component: () => import('@/views/statistics/sales'),
|
||||||
|
meta: { title: '销售统计', icon: 'personStatistics', perms: ['statistics_personStatistics'] }
|
||||||
|
},
|
||||||
/* {
|
/* {
|
||||||
path: 'costStatistics',
|
path: 'costStatistics',
|
||||||
name: 'costStatistics',
|
name: 'costStatistics',
|
||||||
|
|
|
@ -47,17 +47,17 @@
|
||||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="客户名称" prop="name" width="200" show-overflow-tooltip>
|
<el-table-column label="客户名称" prop="name" min-width="200" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="详细地址" prop="address" width="200" show-overflow-tooltip>
|
<el-table-column label="详细地址" prop="address" min-width="200" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" prop="contact" width="130" show-overflow-tooltip>
|
<el-table-column label="联系人" prop="contact" min-width="130" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系电话" prop="contact_phone" width="130" show-overflow-tooltip>
|
<el-table-column label="联系电话" prop="contact_phone" min-width="130" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="描述" prop="description" width="200" show-overflow-tooltip>
|
<el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" prop="create_time" width="160">
|
<el-table-column label="创建时间" prop="create_time" min-width="160">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
|
@ -0,0 +1,205 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="checkPermission(['equipment_create'])"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-input
|
||||||
|
v-model="listQuery.search"
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="false">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="80"/>
|
||||||
|
|
||||||
|
<el-table-column label="客户名称" prop="name" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="问题类型" prop="type" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="问题描述" prop="indur" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="pname" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品型号" prop="ptype" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="订单号" prop="order" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="联系人" prop="contacts" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="联系电话" prop="phone" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
min-width="120px"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary"> 编辑</el-link>
|
||||||
|
<el-link type="danger">处理</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="tableData.count > 0"
|
||||||
|
:total="tableData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {getpEquipmentList} from "@/api/equipment";
|
||||||
|
import {getUserList} from "@/api/user";
|
||||||
|
import {getOrgList} from "@/api/org";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
|
||||||
|
import {genTree} from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaultequipment = {
|
||||||
|
name: "",
|
||||||
|
number: "",
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
equipment: defaultequipment,
|
||||||
|
tableData: {
|
||||||
|
count: 7,
|
||||||
|
results:[
|
||||||
|
{name:'客户1',type:'外观缺陷',indur:'有一块玻璃规格不符',pname:'成品A',ptype:'12.3',order:'F20220630A02',contacts:'胡斯',phone:'131****2016',status:'未处理'},
|
||||||
|
{name:'客户2',type:'强度',indur:'玻璃强度不达标',pname:'成品B',ptype:'12.4',order:'F20220630B03',contacts:'李曼',phone:'132****5623',status:'已处理'},
|
||||||
|
{name:'客户3',type:'耐磨性',indur:'耐磨性不够好',pname:'成品C',ptype:'12.1',order:'F20220630C04',contacts:'张远',phone:'131****2561',status:'已处理'},
|
||||||
|
{name:'客户4',type:'耐碱性',indur:'耐碱性没有达到预期值',pname:'成品B',ptype:'12.3',order:'F20220630B02',contacts:'孙芳',phone:'133****0596',status:'已处理'},
|
||||||
|
{name:'客户5',type:'耐辐照',indur:'耐辐照指数不达标',pname:'成品C',ptype:'12.2',order:'F20220630C01',contacts:'白丽',phone:'131****2123',status:'已处理'},
|
||||||
|
{name:'客户6',type:'外观缺陷',indur:'边角弧度大0.5°',pname:'成品A',ptype:'12.4',order:'F20220630A01',contacts:'刘俊',phone:'131****2401',status:'已处理'},
|
||||||
|
{name:'客户7',type:'强度',indur:'玻璃强度过硬',pname:'成品B',ptype:'12.3',order:'F20220630B01',contacts:'赵磊',phone:'135****6238',status:'已处理'}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
keeperOptions: [],
|
||||||
|
depOptions: [],
|
||||||
|
listLoading: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getUserList();
|
||||||
|
this.getOrgList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
|
//设备列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.listQuery.type = 1;
|
||||||
|
getpEquipmentList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.equipmentList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//组员列表
|
||||||
|
getUserList() {
|
||||||
|
getUserList({pageoff: true}).then((res) => {
|
||||||
|
this.keeperOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//部门列表
|
||||||
|
getOrgList() {
|
||||||
|
getOrgList({pageoff: true}).then((res) => {
|
||||||
|
this.depOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCreate() {
|
||||||
|
this.equipment = Object.assign({}, defaultequipment);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit(scope) {
|
||||||
|
this.equipment = Object.assign({}, scope.row); // copy obj
|
||||||
|
this.dialogType = "edit";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
//
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,254 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="checkPermission(['equipment_create'])"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-select
|
||||||
|
v-model="timeType"
|
||||||
|
placeholder="设备名称"
|
||||||
|
clearable
|
||||||
|
style="width: 120px"
|
||||||
|
class="filter-item"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeOption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-model="timeType"
|
||||||
|
placeholder="维修策略"
|
||||||
|
clearable
|
||||||
|
style="width: 120px"
|
||||||
|
class="filter-item"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeOption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-model="timeType"
|
||||||
|
placeholder="故障类型"
|
||||||
|
clearable
|
||||||
|
style="width: 120px"
|
||||||
|
class="filter-item"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeOption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="false">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="80"/>
|
||||||
|
|
||||||
|
<el-table-column label="报停编号" prop="number" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修策略" prop="tactics" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备名称" prop="name" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="故障类型" prop="type" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="故障分析" prop="analyse" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="录入人" prop="creater" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
min-width="120px"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary">编辑</el-link>
|
||||||
|
<el-link type="danger">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="tableData.count > 0"
|
||||||
|
:total="tableData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {getpEquipmentList, createEquipment, updateEquipment, deleteEquipment} from "@/api/equipment";
|
||||||
|
import {getUserList} from "@/api/user";
|
||||||
|
import {getOrgList} from "@/api/org";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
|
||||||
|
import {genTree} from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaultequipment = {
|
||||||
|
name: "",
|
||||||
|
number: "",
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
equipment: defaultequipment,
|
||||||
|
tableData: {
|
||||||
|
count: 5,
|
||||||
|
results:[
|
||||||
|
{number:'RO2021030104588034',tactics:'内部维修',name:'底中框生产线',type:'机械故障',analyse:'油缸密封圈损坏',creater:'陈帅'},
|
||||||
|
{number:'RO2021030104574919',tactics:'内部维修',name:'剪板机-4000',type:'机械故障',analyse:'氮气缸气压过低',creater:'陈帅'},
|
||||||
|
{number:'RO2021030104554096',tactics:'内部维修',name:'光纤激光机2',type:'机械故障',analyse:'系统重新设定',creater:'陈帅'},
|
||||||
|
{number:'RO2021030104501203',tactics:'内部维修',name:'底中框生产线',type:'机械故障',analyse:'换向阀密封圈损坏',creater:'陈帅'},
|
||||||
|
{number:'RO2021030104594101',tactics:'内部维修',name:'过道生产线',type:'机械故障',analyse:'冲孔摸具故障',creater:'陈帅'},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
keeperOptions: [],
|
||||||
|
depOptions: [],
|
||||||
|
listLoading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogType: "new",
|
||||||
|
rule1: {
|
||||||
|
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
|
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
|
type: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
|
model: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
|
state: [{required: true, message: "请选择", trigger: "blur"}],
|
||||||
|
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getUserList();
|
||||||
|
this.getOrgList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
|
//设备列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.listQuery.type = 1;
|
||||||
|
getpEquipmentList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.equipmentList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//组员列表
|
||||||
|
getUserList() {
|
||||||
|
getUserList({pageoff: true}).then((res) => {
|
||||||
|
this.keeperOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//部门列表
|
||||||
|
getOrgList() {
|
||||||
|
getOrgList({pageoff: true}).then((res) => {
|
||||||
|
this.depOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCreate() {
|
||||||
|
this.equipment = Object.assign({}, defaultequipment);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit(scope) {
|
||||||
|
this.equipment = Object.assign({}, scope.row); // copy obj
|
||||||
|
this.dialogType = "edit";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
//
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="5" style="margin-top: 5px;">
|
<el-row :gutter="5" style="margin-top: 5px;">
|
||||||
<el-col style="border:1px solid #cccccc;border-radius: 10px;">
|
<el-col v-if="showType=='全厂'" style="border:1px solid #cccccc;border-radius: 10px;">
|
||||||
<!-- <el-table
|
<!-- <el-table
|
||||||
small
|
small
|
||||||
v-loading="orderLoading"
|
v-loading="orderLoading"
|
||||||
|
@ -134,7 +134,7 @@
|
||||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table> -->
|
</el-table> -->
|
||||||
<table class="tableData">
|
<table class="tableData" :style="{height: domHeight}">
|
||||||
<th class="tableTh">
|
<th class="tableTh">
|
||||||
<td class="thtd" v-for="item in thLists">{{ item }}</td>
|
<td class="thtd" v-for="item in thLists">{{ item }}</td>
|
||||||
</th>
|
</th>
|
||||||
|
@ -143,6 +143,16 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col v-else style="border:1px solid #cccccc;border-radius: 10px;">
|
||||||
|
<table class="tableData" :style="{height: domHeight}">
|
||||||
|
<th class="tableTh">
|
||||||
|
<td class="thtd" v-for="item in thLists1">{{ item }}</td>
|
||||||
|
</th>
|
||||||
|
<tr class="tableTr" v-for="itemtr in trList1">
|
||||||
|
<td class="trtd" v-for="itemtd in itemtr">{{ itemtd }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -192,6 +202,17 @@
|
||||||
['动力','1573','360','919','189','410','187','741'],
|
['动力','1573','360','919','189','410','187','741'],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
thLists1:['工序','电耗','消耗单位','产量','单位消耗'],
|
||||||
|
trList1:[
|
||||||
|
['冷加工','589','kwh','260','2.27'],
|
||||||
|
['热弯','736','kwh','260','2.83'],
|
||||||
|
['化学钢化','706','kwh','100','7.06'],
|
||||||
|
['物理钢化','10362','kwh','160','64.76'],
|
||||||
|
['镀膜','736','kwh','260','2.83'],
|
||||||
|
['夹层','340','kwh','130','2.62'],
|
||||||
|
['包边','360','kwh','120','3.00'],
|
||||||
|
['装框','235','kwh','100','2.35'],
|
||||||
|
],
|
||||||
cdata: {
|
cdata: {
|
||||||
xData: ["办公用电", "照明", "空调", "动力"],
|
xData: ["办公用电", "照明", "空调", "动力"],
|
||||||
seriesData: [
|
seriesData: [
|
||||||
|
@ -309,23 +330,13 @@
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
methods: {
|
created(){
|
||||||
handleFilter(){
|
// let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
// this.domHeight =( hei- 100)/2+'px';
|
||||||
},
|
|
||||||
getList() {
|
|
||||||
this.orderLoading = true;
|
|
||||||
getOrderList(this.orderQuery).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.orderList = response.data;
|
|
||||||
}
|
|
||||||
this.orderLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
this.domHeight =( hei- 60)/2+'px';
|
this.domHeight =( hei- 100)/2+'px';
|
||||||
this.getList();
|
this.getList();
|
||||||
//全场
|
//全场
|
||||||
this.barOptions ={
|
this.barOptions ={
|
||||||
|
@ -458,8 +469,22 @@
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleFilter(){
|
||||||
|
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.orderLoading = true;
|
||||||
|
getOrderList(this.orderQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.orderList = response.data;
|
||||||
}
|
}
|
||||||
|
this.orderLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -504,6 +529,7 @@
|
||||||
.tableTr{
|
.tableTr{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
border-bottom:1px solid #cccccc;
|
||||||
}
|
}
|
||||||
.trtd{
|
.trtd{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
@ -0,0 +1,124 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</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"
|
||||||
|
>
|
||||||
|
查询
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.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="order">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物品名称" prop="name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="number">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="注意事项" prop="attention">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="下单人" prop="payer">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="姓名" prop="payName">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="联系方式" prop="phone">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发货地址" prop="fromPlace">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="收货人" prop="receiver">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="收货人姓名" prop="receiverName">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="收货人手机" prop="receiverPhone">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="收货人地址" prop="toPlace">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="车牌号" prop="carNumber">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="货物所在地" prop="address">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否收货" prop="isTake">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="添加时间" prop="addTime" width="160px">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary">编辑</el-link>
|
||||||
|
<el-link type="danger">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="tableData.count > 0"
|
||||||
|
:total="tableData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import Pagination from "@/components/Pagination";
|
||||||
|
const defaultewarehouse = {};
|
||||||
|
export default {
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
warehouse: defaultewarehouse,
|
||||||
|
tableData: {
|
||||||
|
count: 0,
|
||||||
|
results:[
|
||||||
|
{order:'06132132007928',name:'产品C',number:'10',attention:'易碎品',payer:'liman',payName:'李曼',phone:'13212340056',fromPlace:'北京市',receiver:'zongguan',receiverName:'公司综管',toPlace:'江苏省',receiverPhone:'13112340001',carNumber:'京M.6R625',address:'1号仓库',isTake:'是',addTime:'2022-06-18 11:22:32'},
|
||||||
|
{order:'06132132007928',name:'产品C',number:'10',attention:'易碎品',payer:'liman',payName:'李曼',phone:'13212340056',fromPlace:'北京市',receiver:'zongguan',receiverName:'公司综管',toPlace:'江苏省',receiverPhone:'13112340001',carNumber:'京M.6R625',address:'1号仓库',isTake:'是',addTime:'2022-06-18 11:22:32'},
|
||||||
|
{order:'06132132007928',name:'产品C',number:'10',attention:'易碎品',payer:'liman',payName:'李曼',phone:'13212340056',fromPlace:'北京市',receiver:'zongguan',receiverName:'公司综管',toPlace:'江苏省',receiverPhone:'13112340001',carNumber:'京M.6R625',address:'1号仓库',isTake:'是',addTime:'2022-06-18 11:22:32'},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
keeperOptions: [],
|
||||||
|
depOptions: [],
|
||||||
|
listLoading: false,
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,193 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="checkPermission(['equipment_create'])"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-input
|
||||||
|
v-model="listQuery.search"
|
||||||
|
style="width: 300px"
|
||||||
|
class="filter-item"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
>
|
||||||
|
刷新
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="false">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="tableData.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
|
>
|
||||||
|
<el-table-column label="序号" type="index" width="80"/>
|
||||||
|
<el-table-column label="资料类别" prop="type" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="资料编码" prop="code" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="资料名称" prop="name" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="资料描述" prop="text" min-width="120" show-overflow-tooltip>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上传时间" prop="time" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上传人" prop="man" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="资料状态" prop="status" min-width="120">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="操作"
|
||||||
|
min-width="120px"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary"> 编辑</el-link>
|
||||||
|
<el-link type="danger">处理</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="tableData.count > 0"
|
||||||
|
:total="tableData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {getpEquipmentList} from "@/api/equipment";
|
||||||
|
import {getUserList} from "@/api/user";
|
||||||
|
import {getOrgList} from "@/api/org";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import {genTree} from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
const defaultequipment = {
|
||||||
|
name: "",
|
||||||
|
number: "",
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
equipment: defaultequipment,
|
||||||
|
tableData: {
|
||||||
|
count: 4,
|
||||||
|
results:[
|
||||||
|
{type:'作业指导',code:'20220001',name:'冷加工工序操作手册',text:'冷加工工序操作规范及注意事项',time:'2022-10-12 10:23',man:'admin',status:'通过'},
|
||||||
|
{type:'图纸',code:'20220002',name:'产品B图纸',text:'长聘B的详情说明',time:'2022-9-10 10:23',man:'admin',status:'通过'},
|
||||||
|
{type:'质量缺陷',code:'20210002',name:'外观缺陷指南',text:'加工注意事项',time:'2021-07-12 10:23',man:'admin',status:'通过'},
|
||||||
|
{type:'故障维修',code:'20210001',name:'钢化炉故障维修指南',text:'钢化炉维修说明',time:'2021-10-12 10:23',man:'admin',status:'通过'},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
keeperOptions: [],
|
||||||
|
depOptions: [],
|
||||||
|
listLoading: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getUserList();
|
||||||
|
this.getOrgList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
|
//设备列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
this.listQuery.type = 1;
|
||||||
|
getpEquipmentList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.equipmentList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//组员列表
|
||||||
|
getUserList() {
|
||||||
|
getUserList({pageoff: true}).then((res) => {
|
||||||
|
this.keeperOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//部门列表
|
||||||
|
getOrgList() {
|
||||||
|
getOrgList({pageoff: true}).then((res) => {
|
||||||
|
this.depOptions = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCreate() {
|
||||||
|
this.equipment = Object.assign({}, defaultequipment);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit(scope) {
|
||||||
|
this.equipment = Object.assign({}, scope.row); // copy obj
|
||||||
|
this.dialogType = "edit";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
//
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.$message.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -74,6 +74,13 @@
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['vendor_update'])"
|
||||||
|
type="primary"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>
|
||||||
|
详情
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['vendor_delete'])"
|
v-if="checkPermission(['vendor_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
@ -252,7 +259,11 @@
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//详情
|
||||||
|
handleDetail(row){
|
||||||
|
sessionStorage.setItem('vendorItem',row)
|
||||||
|
this.$router.push({name: "vendorDetails", params: { id: row.id }, })
|
||||||
|
},
|
||||||
handleDelete(scope) {
|
handleDelete(scope) {
|
||||||
this.$confirm("确认删除?", "警告", {
|
this.$confirm("确认删除?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-descriptions title="供应商详情" :column="4" border direction="vertical" style="margin-bottom: 20px;width: 80%;">
|
||||||
|
<el-descriptions-item label="供应商名称">{{vendorItem.name}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系人">{{vendorItem.contact}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系电话">{{vendorItem.contact_phone}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="地址">{{vendorItem.address}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeName" type="card">
|
||||||
|
<el-tab-pane label="物料列表" name="1">
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="500"
|
||||||
|
:tree-props="{children: 'children'}">
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="物料名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格型号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="采购批次" name="2">
|
||||||
|
<el-table
|
||||||
|
:data="tableData1"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="500"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="物料批次">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格型号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
import {getpVendorList} from "@/api/vendor";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {Pagination},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName:'1',
|
||||||
|
vendorItem:{},
|
||||||
|
vendorList: [],
|
||||||
|
tableData:[
|
||||||
|
{name:'铝硅酸盐玻璃',type:'1.8mm',number:'z001'},
|
||||||
|
{name:'硅酸盐玻璃',type:'1.8mm',number:'z002'},
|
||||||
|
{name:'胶片',type:'A',number:'a007'},
|
||||||
|
],
|
||||||
|
tableData1:[
|
||||||
|
{number:'ZC20221011',type:'1.8mm',name:'铝硅酸盐玻璃'},
|
||||||
|
{number:'ZC20220802',type:'1.8mm',name:'硅酸盐玻璃'},
|
||||||
|
{number:'ZC20220638',type:'A',name:'胶片'},
|
||||||
|
],
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.id = this.$route.params.id;
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
let vendorList = [];
|
||||||
|
getpVendorList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
vendorList = response.data.results.filter(item=>{
|
||||||
|
return item.id===this.id;
|
||||||
|
});
|
||||||
|
debugger;
|
||||||
|
console.log(vendorList)
|
||||||
|
this.vendorItem = vendorList[0];
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,346 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-card>
|
||||||
|
<div class="chartsTitle">全年销售量分析</div>
|
||||||
|
<charts
|
||||||
|
:id="chartId1"
|
||||||
|
:options="barOptions"
|
||||||
|
:className="chartsName"
|
||||||
|
:height="domHeight"
|
||||||
|
width="100%"
|
||||||
|
>
|
||||||
|
</charts>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-card>
|
||||||
|
<div class="chartsTitle">季度销售比例分析</div>
|
||||||
|
<Echart
|
||||||
|
:options="pieOptions"
|
||||||
|
id="pieChart"
|
||||||
|
:height="domHeight"
|
||||||
|
></Echart>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="5" style="margin-top: 5px;">
|
||||||
|
<el-col>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
small
|
||||||
|
v-loading="planLoading"
|
||||||
|
:data="planList.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
height="100"
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 22}"
|
||||||
|
>
|
||||||
|
<el-table-column label="产品名称" prop="product_" min-width="150px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">{{scope.row.name}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="一月" prop="january">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="二月" prop="february">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="三月" prop="march">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="四月" prop="april">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="五月" prop="may">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="六月" prop="june">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="七月" prop="july">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="八月" prop="august">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="九月" prop="september">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="十月" prop="october">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="十一月" prop="november">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="十二月" prop="december">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" prop="total">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="planList.count > 0"
|
||||||
|
:total="planList.count"
|
||||||
|
:page.sync="planQuery.page"
|
||||||
|
:limit.sync="planQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import charts from './charts.vue'
|
||||||
|
import Echart from '@/components/echart';
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
export default {
|
||||||
|
name: "progressStatistics",
|
||||||
|
components: {
|
||||||
|
Echart,
|
||||||
|
charts,
|
||||||
|
Pagination
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chartsName:'barChart',
|
||||||
|
chartId1:'chart1',
|
||||||
|
chartId2:'chart2',
|
||||||
|
pieOptions: {},
|
||||||
|
barOptions: {},
|
||||||
|
barOptions1: {},
|
||||||
|
orderList: {
|
||||||
|
count: 0,
|
||||||
|
results:[]
|
||||||
|
},
|
||||||
|
orderQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
planList:{
|
||||||
|
count: 0,
|
||||||
|
results:[
|
||||||
|
{name:'双层隔音玻璃-01A',january:20,february:30,march:10,april:30,may:50,june:40,july:50,august:20,september:25,october:25,november:15,december:10,total:325},
|
||||||
|
{name:'双层隔音玻璃-02A',january:30,february:60,march:50,april:20,may:40,june:30,july:10,august:40,september:40,october:30,november:25,december:30,total:405},
|
||||||
|
{name:'双层隔音玻璃-03A',january:10,february:20,march:20,april:20,may:30,june:50,july:40,august:30,september:40,october:55,november:30,december:20,total:365},
|
||||||
|
{name:'双层隔音玻璃-01B',january:15,february:10,march:30,april:30,may:20,june:20,july:20,august:50,september:20,october:20,november:40,december:20,total:295},
|
||||||
|
{name:'双层隔音玻璃-02B',january:25,february:40,march:10,april:30,may:20,june:30,july:60,august:10,september:30,october:30,november:35,december:60,total:370},
|
||||||
|
{name:'合计',january:100,february:150,march:140,april:130,may:160,june:170,july:180,august:150,september:155,october:160,november:125,december:140,total:1760},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
planQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
cdata: {
|
||||||
|
xData: ["第一季度", "第二季度", "第三季度", "第四季度"],
|
||||||
|
seriesData: [
|
||||||
|
{value: 390, name: "第一季度"},
|
||||||
|
{value: 460, name: "第二季度"},
|
||||||
|
{value: 485, name: "第三季度"},
|
||||||
|
{value: 425, name: "第四季度"},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
domHeight:'300px',
|
||||||
|
xAxisbar:["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
||||||
|
barData: [100, 150, 140, 130, 160, 170, 180,150,155,160,125,140],
|
||||||
|
xAxisbar1:[ "2021/09", "2021/10", "2021/11", "2021/12", "2022/01", "2022/02"],
|
||||||
|
barData1: [2, 2, 4, 3, 5, 2],
|
||||||
|
planLoading: false,
|
||||||
|
orderLoading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
cdata: {
|
||||||
|
handler(newData) {
|
||||||
|
this.pieOptions = {
|
||||||
|
color: [
|
||||||
|
"#32c5e9",
|
||||||
|
"#ffdb5c"
|
||||||
|
],
|
||||||
|
legend: {
|
||||||
|
data:newData.xData,
|
||||||
|
top: 'top',
|
||||||
|
left: 'left',
|
||||||
|
orient: "vertical",
|
||||||
|
textStyle: {
|
||||||
|
color: "#556677", // 文字的颜色。
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: "item",
|
||||||
|
formatter: "{a} <br/>{b} : {c} ({d})"
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
calculable: true,
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '季度销售',
|
||||||
|
type: 'pie', // 设置图表类型为饼图
|
||||||
|
radius: '65%', // 饼图的半径,外半径为可视区尺寸(容器高宽中较小一项)的 55% 长度。
|
||||||
|
center: ['50%', '50%'], //圆心位置
|
||||||
|
data:newData.seriesData
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
this.domHeight =hei/2+'px';
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.domHeight='';
|
||||||
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
this.domHeight =hei/2+'px';
|
||||||
|
this.barOptions ={
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
left: '3%',
|
||||||
|
right: '6%',
|
||||||
|
bottom: '1%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (params) {
|
||||||
|
let color = params.color;//图例颜色
|
||||||
|
let htmlStr = '<div>';
|
||||||
|
htmlStr += params.name + '<br/>';
|
||||||
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
|
htmlStr += params.seriesName + ':' + params.value;
|
||||||
|
htmlStr += '</div>';
|
||||||
|
return htmlStr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false, //去掉X轴分割线
|
||||||
|
},
|
||||||
|
data: this.xAxisbar,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
axisLine: {
|
||||||
|
show: true,//y轴线
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false//Y轴刻度线
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333333'//Y轴文本颜色
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true, //Y轴分割线
|
||||||
|
lineStyle: {
|
||||||
|
color: '#dddddd'//Y轴分割线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: '销售量',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: this.barData,
|
||||||
|
label: {
|
||||||
|
show: false, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
formatter: '{c}',//显示百分号
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: 'black',//字体颜色
|
||||||
|
fontSize: 10//字体大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#409EFF'
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
this.barOptions1 ={
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
left: '3%',
|
||||||
|
right: '6%',
|
||||||
|
bottom: '1%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (params) {
|
||||||
|
let color = params.color;//图例颜色
|
||||||
|
let htmlStr = '<div>';
|
||||||
|
htmlStr += params.name + '<br/>';
|
||||||
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
|
htmlStr += params.seriesName + ':' + params.value;
|
||||||
|
htmlStr += '</div>';
|
||||||
|
return htmlStr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false, //去掉X轴分割线
|
||||||
|
},
|
||||||
|
data: this.xAxisbar1,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
axisLine: {
|
||||||
|
show: true,//y轴线
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false//Y轴刻度线
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333333'//Y轴文本颜色
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true, //Y轴分割线
|
||||||
|
lineStyle: {
|
||||||
|
color: '#dddddd'//Y轴分割线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: '产品交付数',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: this.barData1,
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
formatter: '{c}',//显示百分号
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: 'black',//字体颜色
|
||||||
|
fontSize: 10//字体大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#409EFF'
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
let sum =this.barData.reduce(function(pre,curr){
|
||||||
|
sum = pre+curr
|
||||||
|
return sum
|
||||||
|
})
|
||||||
|
console.log(sum)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.chartsTitle{
|
||||||
|
text-align: center;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue