1110笔记部分修改
This commit is contained in:
parent
283321f238
commit
821bf22e8c
|
@ -167,7 +167,7 @@ export default {
|
||||||
this.initChart();
|
this.initChart();
|
||||||
this.initDomStyle();
|
this.initDomStyle();
|
||||||
this.initFactory();
|
this.initFactory();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initDomStyle() {
|
initDomStyle() {
|
||||||
|
@ -400,14 +400,14 @@ export default {
|
||||||
if (mesh.name == '单身宿舍.005_primitive3') {
|
if (mesh.name == '单身宿舍.005_primitive3') {
|
||||||
//单身宿舍.003_primitive3
|
//单身宿舍.003_primitive3
|
||||||
// 在选中的 mesh 上添加高亮效果
|
// 在选中的 mesh 上添加高亮效果
|
||||||
highlightLayer.addMesh(mesh, new BABYLON.Color3(1, 1, 0.5));
|
highlightLayer.addMesh(mesh, new BABYLON.Color3(0.1, 0.9, 0.9));
|
||||||
that.currentLightMesh = mesh;
|
that.currentLightMesh = mesh;
|
||||||
mesh_rect.linkWithMesh(mesh);
|
mesh_rect.linkWithMesh(mesh);
|
||||||
let name = mesh.name.split('_')[0];
|
let name = mesh.name.split('_')[0];
|
||||||
mesh_name.text = name;
|
mesh_name.text = name;
|
||||||
// mesh_rect.isVisible = true;
|
// mesh_rect.isVisible = true;
|
||||||
that.infoVisibel = true;
|
that.infoVisibel = true;
|
||||||
|
let newColor = new BABYLON.Color3(12/ 255 -0.2,250 / 255 -0.2,252/ 255 -0.2);
|
||||||
hl1.addMesh(mesh, new BABYLON.Color3(12 / 255, 250 / 255, 252 / 255), true);
|
hl1.addMesh(mesh, new BABYLON.Color3(12 / 255, 250 / 255, 252 / 255), true);
|
||||||
hl1.blurVerticalSize = 5;
|
hl1.blurVerticalSize = 5;
|
||||||
hl1.blurHorizontalSize = 5;
|
hl1.blurHorizontalSize = 5;
|
||||||
|
@ -498,7 +498,7 @@ export default {
|
||||||
engine.resize();
|
engine.resize();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initChart() {
|
initChart() {
|
||||||
//左1
|
//左1
|
||||||
let chartDom = document.getElementById('line1');
|
let chartDom = document.getElementById('line1');
|
||||||
chartDom.style.height = this.blockHeight;
|
chartDom.style.height = this.blockHeight;
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||||
<div class="right-panel btnsContainer">
|
<div class="right-panel btnsContainer">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增任务</el-button>
|
||||||
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button>
|
<!-- <el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务分解</el-button> -->
|
||||||
<el-button type="primary" @click="utaskAssgin" v-loading="isloading">任务下达</el-button>
|
<el-button type="primary" @click="utaskDepuse" v-loading="isloading">任务下达</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="混料工序" name="8车间">
|
<el-tab-pane label="混料工序" name="8车间">
|
||||||
|
@ -123,8 +123,6 @@
|
||||||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
|
||||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
|
||||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
删除
|
删除
|
||||||
|
@ -186,8 +184,8 @@
|
||||||
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
<el-link type="primary" @click="table_edit(scope.row)" v-if="scope.row.state==10">
|
||||||
编辑
|
编辑
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical" v-if="scope.row.state==30"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==30||scope.row.state==20"></el-divider>
|
||||||
<el-link type="primary" @click="table_end(scope.row)" v-if="scope.row.state==30">终止</el-link>
|
<el-link type="danger" @click="table_end(scope.row)" v-if="scope.row.state==30||scope.row.state==20">终止</el-link>
|
||||||
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
<el-divider direction="vertical" v-if="scope.row.state==10||scope.row.state==14"></el-divider>
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.state==10||scope.row.state==14">
|
||||||
删除
|
删除
|
||||||
|
@ -199,7 +197,10 @@
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-main class="nopadding" style="position: relative;">
|
<el-main class="nopadding" style="position: relative;">
|
||||||
<el-header style="justify-content: flex-end;">
|
<el-header style="justify-content: space-between;">
|
||||||
|
<div class="left-panel">
|
||||||
|
<span style="font-size:14px ;">生产进度</span>
|
||||||
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.date"
|
v-model="query.date"
|
||||||
|
@ -290,7 +291,7 @@
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="工段" prop="mgroup_name" show-overflow-tooltip>
|
<el-table-column label="工段" prop="mgroup_name" show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count">
|
<el-table-column label="数量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -341,10 +342,11 @@ export default {
|
||||||
hideDo:true,
|
hideDo:true,
|
||||||
activeName:'8车间',
|
activeName:'8车间',
|
||||||
dataList:[
|
dataList:[
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:200, count03:300 },
|
||||||
{number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
|
// {number:'rwbh2023',name:'玻璃棒',xh:'',count:100,count1:100,start_date:'2023-10-15',end_date:'2023-10-15', count01:100, count02:250, count03:300 },
|
||||||
],
|
],
|
||||||
columList:['10.15','10.16','10.17'],
|
// columList:['10.15','10.16','10.17'],
|
||||||
|
columList:[],
|
||||||
selection: [],
|
selection: [],
|
||||||
selectedIds:[],
|
selectedIds:[],
|
||||||
state_: {
|
state_: {
|
||||||
|
@ -426,13 +428,13 @@ export default {
|
||||||
this.$confirm(`确定终止该任务吗?`, "提示", {
|
this.$confirm(`确定终止该任务吗?`, "提示", {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// this.$API.pm.utask.delete.req(row.id).then((res) => {
|
this.$API.pm.utask.stop.req(row.id).then((res) => {
|
||||||
// this.$message.success("删除成功");
|
this.$message.success("操作成功");
|
||||||
// this.$refs.table7.refresh();
|
this.$refs.table10.refresh();
|
||||||
// return res;
|
return res;
|
||||||
// }).catch((err) => {
|
}).catch((err) => {
|
||||||
// return err;
|
return err;
|
||||||
// });
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
//本地更新数据
|
//本地更新数据
|
||||||
|
@ -477,13 +479,19 @@ export default {
|
||||||
utaskDepuse(){
|
utaskDepuse(){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.selectedIds.length>0){
|
if(that.selectedIds.length>0){
|
||||||
|
let ids =that.selectedIds;
|
||||||
that.isloading = true;
|
that.isloading = true;
|
||||||
that.$API.pm.utask.scheduemtasks.req({ids:that.selectedIds}).then(res=>{
|
that.$API.pm.utask.scheduemtasks.req({ids:ids}).then(res=>{
|
||||||
that.$message.success('任务分解成功');
|
that.$API.pm.utask.assgin.req({ids:ids}).then(res=>{
|
||||||
that.isloading = false;
|
that.$message.success('下达任务成功');
|
||||||
that.$refs.table7.refresh();
|
that.isloading = false;
|
||||||
that.$refs.table8.refresh();
|
that.$refs.table7.refresh();
|
||||||
that.$refs.table10.refresh();
|
that.$refs.table8.refresh();
|
||||||
|
that.$refs.table10.refresh();
|
||||||
|
}).catch(()=>{
|
||||||
|
that.isloading = false;
|
||||||
|
})
|
||||||
|
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
that.isloading = false;
|
that.isloading = false;
|
||||||
})
|
})
|
||||||
|
|
|
@ -69,33 +69,6 @@
|
||||||
<!-- <el-button type="primary" @click="startPlan">排产</el-button> -->
|
<!-- <el-button type="primary" @click="startPlan">排产</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
||||||
<!-- <el-tab-pane label="订单排产" name="order">
|
|
||||||
<scTable ref="table2" :apiObj="apiOrderItem" row-key="id" stripe :height="tableHeight" :params="paramsOrderItem" @selection-change="selectionOrderItemChange" hidePagination>
|
|
||||||
<el-table-column type="selection" width="55" />
|
|
||||||
<el-table-column label="订单编号" prop="number">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.order">{{ scope.row.order_.number }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品名称" prop="number">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.material">{{ scope.row.material_.name }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="型号/规格" prop="count">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.material">{{ scope.row.material_.specification }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="需求量" prop="count">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="交货时间" prop="delivery_date">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.order">{{ scope.row.order_.delivery_date }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
|
||||||
</el-tab-pane> -->
|
|
||||||
<el-tab-pane label="生产进度" name="rate">
|
<el-tab-pane label="生产进度" name="rate">
|
||||||
<GanttComponent class="left-container" :tasks="tasks"></GanttComponent>
|
<GanttComponent class="left-container" :tasks="tasks"></GanttComponent>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -353,13 +326,33 @@ export default {
|
||||||
//获取 mtask
|
//获取 mtask
|
||||||
let that = this;
|
let that = this;
|
||||||
that.tasks.data = [];
|
that.tasks.data = [];
|
||||||
|
let objItem = {};
|
||||||
|
objItem.id=row.id;
|
||||||
|
objItem.type='utask';
|
||||||
|
objItem.number=row.number;
|
||||||
|
objItem.count=row.count;
|
||||||
|
objItem.text =row.number,
|
||||||
|
objItem.cate='',
|
||||||
|
|
||||||
|
objItem.duration = 10;
|
||||||
|
objItem.progress = 1;
|
||||||
|
objItem.count_ok=row.count_ok;
|
||||||
|
objItem.count_real=row.count_real;
|
||||||
|
objItem.count_notok=row.count_notok;
|
||||||
|
objItem.state =row.state;
|
||||||
|
objItem.start_date =row.start_date;
|
||||||
|
objItem.mgroup_name = '';
|
||||||
|
objItem.material_name = '';
|
||||||
|
objItem.specification = '';
|
||||||
|
that.tasks.data.push(objItem)
|
||||||
this.$API.pm.mtask.list.req({utask:row.id}).then(res=>{
|
this.$API.pm.mtask.list.req({utask:row.id}).then(res=>{
|
||||||
// console.log(res.results)//获取甘特图数据
|
// console.log(res.results)//获取甘特图数据
|
||||||
let data = res.results;
|
let data = res.results;
|
||||||
let arr = [];
|
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.id=item.id;
|
obj.id=item.id;
|
||||||
|
obj.type='mtask';
|
||||||
|
obj.parent=row.id;
|
||||||
obj.number=item.number;
|
obj.number=item.number;
|
||||||
obj.count=item.count;
|
obj.count=item.count;
|
||||||
obj.text = "一天任务",
|
obj.text = "一天任务",
|
||||||
|
@ -379,25 +372,6 @@ export default {
|
||||||
that.tasks.data.push(obj)
|
that.tasks.data.push(obj)
|
||||||
})
|
})
|
||||||
console.log(that.tasks.data)
|
console.log(that.tasks.data)
|
||||||
// data.forEach(item=>{
|
|
||||||
// let obj = {};
|
|
||||||
// let progress = 0;
|
|
||||||
// progress = item.count_ok/item.count;
|
|
||||||
// obj.text = "一天任务",
|
|
||||||
// obj.count_ok=item.count_ok;
|
|
||||||
// obj.count_real=item.count_real;
|
|
||||||
// obj.count_notok=item.count_notok;
|
|
||||||
// obj.start_date=item.start_date;
|
|
||||||
// obj.end_date=item.end_date;
|
|
||||||
// obj.state = item.state;
|
|
||||||
// obj.utask = item.utask;
|
|
||||||
// obj.mgroup_name = item.mgroup_name;
|
|
||||||
// obj.material_name = item.material_out_.name;
|
|
||||||
// obj.specification = item.material_out_.specification;
|
|
||||||
// arr.push(obj)
|
|
||||||
// })
|
|
||||||
// console.log(arr)
|
|
||||||
// that.tasks.data = res.results;
|
|
||||||
console.log('tasks:',that.tasks)
|
console.log('tasks:',that.tasks)
|
||||||
// 数据解析:将数据解析到gantt列数据中
|
// 数据解析:将数据解析到gantt列数据中
|
||||||
gantt.parse(that.tasks);
|
gantt.parse(that.tasks);
|
||||||
|
|
|
@ -79,15 +79,13 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增仓库",
|
add: "新增采购订单",
|
||||||
edit: "编辑仓库",
|
edit: "编辑采购订单",
|
||||||
show: "查看仓库",
|
show: "查看采购订单",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{required: true, message: "请输入仓库名称", trigger: "blur"}],
|
number: [{required: true, message: "请输入采购订单编号", trigger: "blur"}]
|
||||||
number: [{required: true, message: "请输入仓库编号", trigger: "blur"}],
|
|
||||||
place: [{required: true, message: "请输入仓库地点", trigger: "blur"}]
|
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
|
|
@ -55,13 +55,13 @@
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增仓库",
|
add: "新增采购计划",
|
||||||
edit: "编辑仓库",
|
edit: "编辑采购计划",
|
||||||
show: "查看仓库",
|
show: "查看采购计划",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
number: [{required: true, message: "请输入编号", trigger: "blur"}],
|
number: [{required: true, message: "请输入采购计划编号", trigger: "blur"}],
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
|
@ -84,9 +84,9 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: "新增仓库",
|
add: "新增订单",
|
||||||
edit: "编辑仓库",
|
edit: "编辑订单",
|
||||||
show: "查看仓库",
|
show: "查看订单",
|
||||||
},
|
},
|
||||||
form: {},
|
form: {},
|
||||||
rules: {
|
rules: {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<el-col :span="activeSpan" style="border-right: 1px solid #eeeeee;position: relative;">
|
<el-col :span="activeSpan" style="border-right: 1px solid #eeeeee;position: relative;">
|
||||||
<div class="right-panel btnWrap" v-if="activeName == '8车间' || activeName == '退火'">
|
<div class="right-panel btnWrap" v-if="activeName == '8车间' || activeName == '退火'">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||||
|
<el-button v-if="activeName == '退火'" type="primary" @click="submittuihuo">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="混料工序" name="8车间">
|
<el-tab-pane label="混料工序" name="8车间">
|
||||||
|
@ -680,6 +681,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//提交退火
|
||||||
|
submittuihuo(){},
|
||||||
|
|
||||||
//编辑
|
//编辑
|
||||||
table_edit(row) {
|
table_edit(row) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
Loading…
Reference in New Issue