gantt¶meter
This commit is contained in:
parent
ced9543568
commit
8825054574
|
|
@ -60,4 +60,7 @@ export default {
|
||||||
#customerForm .el-form-item{
|
#customerForm .el-form-item{
|
||||||
margin-bottom: 30px!important;
|
margin-bottom: 30px!important;
|
||||||
}
|
}
|
||||||
|
.overFlowShow .el-tabs__content{
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,19 @@
|
||||||
@expand-change="handlerExpand"
|
@expand-change="handlerExpand"
|
||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
>
|
>
|
||||||
<el-table-column label="名称">
|
<el-table-column label="任务编号">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="进度">
|
<el-table-column label="产品名称">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">
|
||||||
|
<div style="overflow: hidden; text-overflow:ellipsis; white-space: nowrap;">{{ scope.row.productName }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品型号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.productNum }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产数量">
|
||||||
|
<template slot-scope="scope">{{ scope.row.per }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -44,19 +52,12 @@ export default {
|
||||||
BGScrollTop: {
|
BGScrollTop: {
|
||||||
handler: function(newValue) {
|
handler: function(newValue) {
|
||||||
let table = this.$refs.tableMenu.bodyWrapper;
|
let table = this.$refs.tableMenu.bodyWrapper;
|
||||||
// console.log(newValue, table);
|
|
||||||
table.scrollTo(0, newValue);
|
table.scrollTo(0, newValue);
|
||||||
// table.scrollTo({
|
|
||||||
// top: newValue,
|
|
||||||
// left: 0,
|
|
||||||
// behavior: "smooth"
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// tableData: [],
|
|
||||||
checkList: [],
|
checkList: [],
|
||||||
isShowHeaderBox: false,
|
isShowHeaderBox: false,
|
||||||
menuOpen: false,
|
menuOpen: false,
|
||||||
|
|
@ -68,7 +69,6 @@ export default {
|
||||||
handlerWatchScroll() {
|
handlerWatchScroll() {
|
||||||
let table = this.$refs.tableMenu.bodyWrapper;
|
let table = this.$refs.tableMenu.bodyWrapper;
|
||||||
table.addEventListener("scroll", e => {
|
table.addEventListener("scroll", e => {
|
||||||
// console.log(e.srcElement.scrollTop);
|
|
||||||
this.$emit("TableScrollTop", e.srcElement.scrollTop);
|
this.$emit("TableScrollTop", e.srcElement.scrollTop);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-row style="position: fixed;z-index: 2000;top: 465px;right: 10px;">
|
<el-row style="position: absolute;z-index: 2000;top: -38px;right: 150px;display: flex">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="timeRange"
|
v-model="timeRange"
|
||||||
type="monthrange"
|
type="monthrange"
|
||||||
|
|
@ -11,8 +11,30 @@
|
||||||
value-format="yyyy-MM"
|
value-format="yyyy-MM"
|
||||||
@change="timeRangeChange"
|
@change="timeRangeChange"
|
||||||
>
|
>
|
||||||
<!--test-->
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
<div
|
||||||
|
class="toolTip"
|
||||||
|
style="width: 60px;height: 35px;padding-left: 10px; background: white;margin-left: 10px;border: 1px solid #DCDFE6;line-height: 35px;border-radius: 4px"
|
||||||
|
>
|
||||||
|
<el-dropdown trigger="click">
|
||||||
|
<span class="base">
|
||||||
|
{{currentDaySize.label}}
|
||||||
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu
|
||||||
|
slot="dropdown"
|
||||||
|
:style="{ left: this.left + 'px !important' }"
|
||||||
|
>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-for="item in currentDaySizeOptions"
|
||||||
|
:key="item.value + 'ee'"
|
||||||
|
@click.native="handleSetDaySize(item)"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="left" style=" width: 400px ;float: left;border-right: 1px solid #f7f7f7">
|
<div class="left" style=" width: 400px ;float: left;border-right: 1px solid #f7f7f7">
|
||||||
<leftMenu
|
<leftMenu
|
||||||
|
|
@ -33,24 +55,6 @@
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chart" ref="chart">
|
<div class="chart" ref="chart">
|
||||||
<!--<div class="left" :style="{ width: rightLineX + 'px' }">
|
|
||||||
<leftMenu
|
|
||||||
:list="list"
|
|
||||||
ref="leftMenu"
|
|
||||||
:BGScrollTop.sync="BGScrollTop"
|
|
||||||
@TableScrollTop="TableScrollTop"
|
|
||||||
@handlerRowClick="handlerRowClick"
|
|
||||||
@handlerGroup="handlerGroup"
|
|
||||||
@handlerExpand="handlerExpand"
|
|
||||||
></leftMenu>
|
|
||||||
<div class="rightLine" :style="{ left: rightLineX + 'px' }"></div>
|
|
||||||
<div
|
|
||||||
class="rightLine"
|
|
||||||
:style="{ left: rightLineX + 'px' }"
|
|
||||||
ref="rightLine"
|
|
||||||
@mousedown="rightLineMousedown"
|
|
||||||
></div>
|
|
||||||
</div>-->
|
|
||||||
<div class="date">
|
<div class="date">
|
||||||
<div class="years" v-for="item in allDays" :key="item.year">
|
<div class="years" v-for="item in allDays" :key="item.year">
|
||||||
<div
|
<div
|
||||||
|
|
@ -241,27 +245,7 @@
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolTip">
|
|
||||||
<!--<div class="today base" @click="handleGoToday">今天</div>-->
|
|
||||||
<el-dropdown trigger="click">
|
|
||||||
<span class="base">
|
|
||||||
{{currentDaySize.label}}
|
|
||||||
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu
|
|
||||||
slot="dropdown"
|
|
||||||
:style="{ left: this.left + 'px !important' }"
|
|
||||||
>
|
|
||||||
<el-dropdown-item
|
|
||||||
v-for="item in currentDaySizeOptions"
|
|
||||||
:key="item.value + 'ee'"
|
|
||||||
@click.native="handleSetDaySize(item)"
|
|
||||||
>
|
|
||||||
{{ item.label }}
|
|
||||||
</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
|
||||||
<transition name="el-zoom-in-center">
|
<transition name="el-zoom-in-center">
|
||||||
<div
|
<div
|
||||||
v-show="isShowMsg"
|
v-show="isShowMsg"
|
||||||
|
|
@ -1055,7 +1039,7 @@
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.chart {
|
.chart {
|
||||||
height: 40vh;
|
height: 280px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -1165,10 +1149,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolTip {
|
.toolTip {
|
||||||
position: fixed;
|
|
||||||
right: 0;
|
|
||||||
top: 550px;
|
|
||||||
z-index: 999;
|
|
||||||
|
|
||||||
.base {
|
.base {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
||||||
|
|
@ -687,9 +687,15 @@
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
let submit = isSubmit=='1'?false:true;
|
let submit = isSubmit=='1'?false:true;
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
|
let field_value = 0;
|
||||||
|
if(item.field_type==='int'){
|
||||||
|
field_value = parseInt(that.checkForm[item.field_key])
|
||||||
|
}else if(item.field_type==='float'){
|
||||||
|
field_value = parseFloat(that.checkForm[item.field_key])
|
||||||
|
}
|
||||||
that.field.push({
|
that.field.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
field_value: that.checkForm[item.field_key],
|
field_value: field_value,
|
||||||
is_testok: item.is_testok,//单项检查结果
|
is_testok: item.is_testok,//单项检查结果
|
||||||
is_hidden: item.is_hidden
|
is_hidden: item.is_hidden
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -788,9 +788,15 @@
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
let submit = isSubmit=='1'?false:true;
|
let submit = isSubmit=='1'?false:true;
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
|
let field_value = 0;
|
||||||
|
if(item.field_type==='int'){
|
||||||
|
field_value = parseInt(that.checkForm[item.field_key])
|
||||||
|
}else if(item.field_type==='float'){
|
||||||
|
field_value = parseFloat(that.checkForm[item.field_key])
|
||||||
|
}
|
||||||
that.field.push({
|
that.field.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
field_value: that.checkForm[item.field_key],
|
field_value: field_value,
|
||||||
is_testok: item.is_testok,//单项检查结果
|
is_testok: item.is_testok,//单项检查结果
|
||||||
is_hidden: item.is_hidden
|
is_hidden: item.is_hidden
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="100"
|
height="300"
|
||||||
v-el-height-adaptive-table="{ bottomOffset: 40 }"
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
|
@ -103,10 +102,14 @@
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getplanList"
|
@pagination="getplanList"
|
||||||
/>
|
/>
|
||||||
<gantt
|
</el-card>
|
||||||
v-if="ganttShow"
|
<el-card class="box-card">
|
||||||
:proList="proList"
|
<div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div>
|
||||||
></gantt>
|
<gantt
|
||||||
|
style="position: relative"
|
||||||
|
v-if="proList.length>0"
|
||||||
|
:proList="proList"
|
||||||
|
></gantt>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -138,6 +141,7 @@ export default {
|
||||||
|
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
proList: [],
|
proList: [],
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|
@ -183,9 +187,12 @@ export default {
|
||||||
obj.planTime = [startTime, endTime];
|
obj.planTime = [startTime, endTime];
|
||||||
obj.per = item.count;
|
obj.per = item.count;
|
||||||
obj.type = 1;
|
obj.type = 1;
|
||||||
|
obj.productName = item.product_.name;
|
||||||
|
obj.productNum = item.product_.specification;
|
||||||
obj.isShow = true;
|
obj.isShow = true;
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
}
|
}
|
||||||
|
debugger;
|
||||||
that.proList = arr;
|
that.proList = arr;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
@pagination="getplanList"
|
@pagination="getplanList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-tabs type="border-card" v-model="activeName" @tab-click="activeNameClick">
|
<el-tabs class="overFlowShow" type="border-card" v-model="activeName" @tab-click="activeNameClick">
|
||||||
<el-tab-pane label="订单排产" name="订单排产">
|
<el-tab-pane label="订单排产" name="订单排产">
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList.results"
|
:data="orderList.results"
|
||||||
|
|
@ -292,6 +292,8 @@
|
||||||
obj.planTime = [startTime, endTime];
|
obj.planTime = [startTime, endTime];
|
||||||
obj.per = item.count;
|
obj.per = item.count;
|
||||||
obj.type = 1;
|
obj.type = 1;
|
||||||
|
obj.productName = item.product_.name;
|
||||||
|
obj.productNum = item.product_.specification;
|
||||||
obj.isShow = true;
|
obj.isShow = true;
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@
|
||||||
v-if="item.field_type === 'string'"
|
v-if="item.field_type === 'string'"
|
||||||
:label="item.field_name"
|
:label="item.field_name"
|
||||||
>
|
>
|
||||||
<el-input placeholder="请输入" v-model="item.sort" />
|
<el-input v-model="item.field_value" placeholder="请输入"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-else-if="item.field_type === 'int'"
|
v-else-if="item.field_type === 'int'"
|
||||||
|
|
@ -195,7 +195,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
v-model="item.sort"
|
v-model="item.field_value"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
|
@ -205,7 +205,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
v-model="item.sort"
|
v-model="item.field_value"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
:label="item.field_name"
|
:label="item.field_name"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.field_value"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
|
|
@ -226,7 +226,7 @@
|
||||||
:label="item.field_name"
|
:label="item.field_name"
|
||||||
>
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.field_value"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
placeholder="选择日期"
|
placeholder="选择日期"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
|
@ -240,7 +240,7 @@
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="item.sort"
|
v-model="item.field_value"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -258,7 +258,7 @@
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="optio"
|
v-model="item.field_value"
|
||||||
multiple
|
multiple
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
|
|
@ -603,6 +603,7 @@ export default {
|
||||||
},
|
},
|
||||||
fieldList: {
|
fieldList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
|
name:'',
|
||||||
},
|
},
|
||||||
listQueryfield: {
|
listQueryfield: {
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
@ -796,7 +797,9 @@ export default {
|
||||||
this.formID = scope.row.id;
|
this.formID = scope.row.id;
|
||||||
recordInit( this.formID).then((response) => {
|
recordInit( this.formID).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
debugger;
|
||||||
this.fieldList = response.data;
|
this.fieldList = response.data;
|
||||||
|
this.fieldList.name = response.data.form_.name;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.dialogVisibleForm = true;
|
this.dialogVisibleForm = true;
|
||||||
|
|
@ -818,16 +821,21 @@ export default {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.record_data = []; //检查项目
|
_this.record_data = []; //检查项目
|
||||||
this.fieldList.record_data.forEach((item) => {
|
this.fieldList.record_data.forEach((item) => {
|
||||||
|
if(item.field_type==='int'){
|
||||||
|
item.field_value = parseInt(item.field_value)
|
||||||
|
}else if(item.field_type==='float'){
|
||||||
|
item.field_value = parseFloat(item.field_value)
|
||||||
|
}
|
||||||
_this.record_data.push({
|
_this.record_data.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
field_value: item.field_value,
|
field_value:item.field_value,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.record.record_data = _this.record_data;
|
this.record.record_data = _this.record_data;
|
||||||
createRecord(this.formID, this.record).then((res) => {
|
createRecord(this.formID, this.record).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getrecordLists();
|
this.getrecordLists();
|
||||||
this.$message.success("创建成功!");
|
this.$message.success("提交成功!");
|
||||||
|
|
||||||
this.dialogVisibleForm = false;
|
this.dialogVisibleForm = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue