| | |
| | | throw new TypeError('错误的计算类型') |
| | | } |
| | | while (!a.isAfter(b)) { |
| | | if (scale >= 60) { |
| | | totalblock.push(a.format('HH')) |
| | | } else { |
| | | totalblock.push(a.format('HH:mm')) |
| | | } |
| | | // if (scale >= 60) { |
| | | // totalblock.push(a.format('HH')) |
| | | // } else { |
| | | totalblock.push(a.format('HH:mm')) |
| | | // } |
| | | a = a.add(scale, 'minute') |
| | | } |
| | | |
| | | // console.log(1, totalblock) |
| | | return totalblock |
| | | } |
| | | } |
| | |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm" style="justify-content: flex-start"> |
| | | <div class="elForm"> |
| | | <el-form-item label-width="70px" label="生产车间" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.workshop" |
| | |
| | | <el-radio |
| | | v-model="radioSelectedId" |
| | | :label="row.id" |
| | | style="color: transparent;padding-left: 10px;" |
| | | @change.native="getCurrentRowTop(row.id)" |
| | | /> |
| | | </template> |
| | |
| | | radio: '', |
| | | |
| | | formBottom: { |
| | | value1: ['2022-11-05', '2022-11-12'], // 排程日期 |
| | | value1: ['2022-11-07', '2022-11-12'], // 排程日期 |
| | | types: 'N', // 排程方式 |
| | | scale: 60, // 时间刻度 |
| | | times: 0, // 换型时间 |
| | |
| | | }, |
| | | 'rows': [ |
| | | { |
| | | 'YearDate': '2022-11-03', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-04', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-05', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-06', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-07', |
| | | 'children': [ |
| | | { |
| | |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-08', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-09', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-10', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-11', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | | 'AdvaDevicName': '金鼎数控车床029', |
| | | 'AdvaDevicCropMob': '78', |
| | | 'AdvaDevicRhythm': '10', |
| | | 'OneStartDate': '08:00~11:30', |
| | | 'TwoStartDate': '12:30~17:00', |
| | | 'ThreeStartDate': '', |
| | | 'FourStartDate': '', |
| | | 'FiveStartDate': '' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | 'YearDate': '2022-11-12', |
| | | 'children': [ |
| | | { |
| | | 'AdvaDevicNumber': 'LKFDL_SC-PC029', |
| | |
| | | width: 100px; |
| | | } |
| | | |
| | | .top-bar { |
| | | /* height: 30px; */ |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | flex: 1; |
| | | } |
| | | |
| | | .main-footer { |
| | | /* height: 30px; */ |
| | | } |
| | | |
| | | .ib { |
| | | display: inline-block; |
| | | } |
| | | |
| | | .w250 { |
| | | width: 250px; |
| | | } |
| | | |
| | | .el-slider { |
| | | width: 100px; |
| | | } |
| | | |
| | | .tc { |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | .colorBar { |
| | | width: 10px; |
| | | height: 100%; |
| | | } |
| | | |
| | | .carId { |
| | | flex: 1; |
| | | } |
| | |
| | | .tc { |
| | | color: #909399; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .type { |
| | | padding: 0 5px 0 0; |
| | | font-size: 1.2rem; |
| | | } |
| | | |
| | | .t_size { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .icon_true { |
| | | height: 8px; |
| | | display: inline-block; |
| | | width: 8px; |
| | | background: #00a79d; |
| | | margin-right: 7px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .icon_ty { |
| | | height: 8px; |
| | | display: inline-block; |
| | | width: 8px; |
| | | background: red; |
| | | margin-right: 7px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | .icon_gz { |
| | | height: 8px; |
| | | display: inline-block; |
| | | width: 8px; |
| | | background: yellow; |
| | | margin-right: 7px; |
| | | border-radius: 15px; |
| | | } |
| | | |
| | | /* .el-col-offset-1 { |
| | | margin-left: 0.5% !important; |
| | | } */ |
| | | .marginLeft { |
| | | margin-left: 15px; |
| | | } |
| | | |
| | | .button_style { |
| | | background: #00a79d; |
| | | color: #ffff; |
| | | border-color: #00a79d; |
| | | } |
| | | |
| | | .rg { |
| | | float: right; |
| | | } |
| | | |
| | | .color { |
| | | color: #909399; |
| | | } |
| | | </style> |
| | | |
| | |
| | | } |
| | | |
| | | </style> |
| | | |
| | | <!--<style>--> |
| | | <!--input[type=range]:focus {--> |
| | | <!-- display: none;--> |
| | | <!--}--> |
| | | |
| | | <!--input[type=range] {--> |
| | | <!-- -webkit-appearance: none;--> |
| | | <!-- width: 500px;--> |
| | | <!-- border-radius: 10px;--> |
| | | <!-- /*这个属性设置使填充进度条时的图形为圆角*/--> |
| | | <!--}--> |
| | | |
| | | <!--input[type=range]::-webkit-slider-runnable-track {--> |
| | | <!-- height: 20px;--> |
| | | <!-- border-radius: 10px;--> |
| | | <!-- /*将轨道设为圆角的*/--> |
| | | <!-- /* box-shadow: 0 1px 1px #def3f8, inset 0 .125em .125em #0d1112; */--> |
| | | <!-- border: solid 1px red;--> |
| | | <!--}--> |
| | | |
| | | <!--input[type=range]::-webkit-slider-thumb {--> |
| | | <!-- -webkit-appearance: none;--> |
| | | <!-- height: 30px;--> |
| | | <!-- width: 120px;--> |
| | | <!-- margin-top: -5px;--> |
| | | <!-- /*使滑块超出轨道部分的偏移量相等*/--> |
| | | <!-- background: #ffffff;--> |
| | | <!-- /* border-radius: 50%; */--> |
| | | <!-- /*外观设置为圆形*/--> |
| | | <!-- border: solid 0.125em rgba(205, 224, 230, 0.5);--> |
| | | <!-- /*设置边框*/--> |
| | | <!-- /* box-shadow: 0 .125em .125em #3b4547; */--> |
| | | <!-- /*添加底部阴影*/--> |
| | | <!--}--> |
| | | <!--</style>--> |
| | |
| | | /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | <i class="el-icon-delete" style="margin-right:15px;" @click="del(row)" /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="复制" placement="top"> |
| | | <i class="el-icon-document-copy" style="cursor: pointer;color:#42b983" @click="copy('copy',row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'预览'" |
| | | :title="operation==='add'?'新增':(operation==='edit'?'预览':'复制')" |
| | | :visible.sync="dialogVisible" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | |
| | | <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px"> |
| | | <div style="display: flex"> |
| | | <el-form-item label="工艺路线编码" prop="code" style="margin-right: 20px"> |
| | | <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.code" :disabled="operation==='edit'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称" prop="name"> |
| | | <el-input v-model="dialogForm.name" :disabled="operation==='edit'" style="width: 220px" /> |
| | |
| | | routeArr: [], // 工艺设置下拉所有值 |
| | | routeSelectedArr: [], // 工艺设置下拉已选的值 |
| | | addDisabled: true, // 添加按钮是否可点击 |
| | | editDisabled: true, // 修改按钮是否可点击 |
| | | // editDisabled: true, // 修改按钮是否可点击 |
| | | mouseFocusPosition: 0, // 鼠标聚焦的位置 |
| | | operation: '', |
| | | dialogFormRules: { |
| | |
| | | stepname: item.stepname, |
| | | value: item.value |
| | | }) |
| | | console.log(this.routeSelectedArr, 7) |
| | | this.routeArr.splice(index, 1) |
| | | } |
| | | }) |
| | |
| | | this.$message.info('已取消删除') |
| | | }) |
| | | }, |
| | | // 复制按钮 |
| | | async copy(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | await this.getStepSelectArr() |
| | | const { data: res } = await ViewRoute({ routecode: row.code }) |
| | | // 待改 |
| | | this.dynamicTags = [] |
| | | this.routeSelectedArr = [] |
| | | this.$nextTick(() => { |
| | | this.dialogForm.code = res[0].code |
| | | this.dialogForm.name = res[0].name |
| | | this.dialogForm.enable = res[0].enable |
| | | this.dialogForm.description = res[0].description |
| | | // this.dialogForm.Data = row.description |
| | | res[0].Data.forEach(item => { |
| | | this.dynamicTags.push( |
| | | { seq: item.seq, stepname: item.stepname, stepcode: item.stepcode, editDisabled: true, effect: 'light' } |
| | | ) |
| | | this.routeSelectedArr.push({ |
| | | stepcode: item.stepcode, |
| | | stepname: item.stepname, |
| | | value: item.stepname |
| | | }) |
| | | |
| | | console.log(item, 2) |
| | | console.log(this.routeArr) |
| | | |
| | | this.routeArr = this.routeArr.filter(i => i.stepcode !== item.stepcode) |
| | | }) |
| | | |
| | | this.addDisabled = false |
| | | |
| | | // { editDisabled: true, stepcode: '', seq: 1, stepname: ' ', effect: 'light' } |
| | | }) |
| | | }, |
| | | // 对话框关闭事件 |
| | | handleClose() { |
| | | this.dialogForm.code = '' |
| | |
| | | Data: Data |
| | | } |
| | | |
| | | AddUpdateRoute(this.dialogForm.id, this.operation === 'add' ? 'Add' : 'Update', data).then(res => { |
| | | AddUpdateRoute(this.dialogForm.id, this.operation === 'edit' ? 'Update' : 'Add', data).then(res => { |
| | | if (res.code === '200') { |
| | | this.dialogVisible = false |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '复制成功!') |
| | | this.getRouteSearch() |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '复制失败!') |
| | | } |
| | | }) |
| | | } |
| | |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | |
| | | @change="partDialogChange" |
| | | > |
| | | <!-- @focus="getPartSelect2"--> |
| | |
| | | class="tableFixed" |
| | | :data="eqpDialogArr" |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px',}" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px'}" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | highlight-current-row |
| | | @sort-change="dialogSortChange" |
| | | > |
| | | <!-- @row-click="rowClick"--> |
| | | <el-table-column |
| | | width="50" |
| | | label="序号" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | this.routeDialogArr = res |
| | | this.stepDialogArr = [] |
| | | this.eqpDialogArr = [] |
| | | this.dialogForm.routecode = '' |
| | | }, |
| | | async routeDialogChange(val) { |
| | | const { data: res } = await RouteSelectStep({ routecode: val }) |
| | |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code |
| | | } else if (typeof val === 'number') { |
| | | // } else if (typeof val === 'number') { |
| | | } else { |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr[0].code |
| | | this.dialogForm.stepcode = this.stepDialogArr[0].name |
| | | } |
| | | |
| | | const res = await StepSelectEqpList(this.eqpTable) |
| | | this.eqpDialogArr = res.data |
| | | this.eqpTableLength = res.count |
| | |
| | | editRow(row) { |
| | | if (this.isEqpTableEdit) { |
| | | row.isVisible = 1 |
| | | let temp = {} |
| | | this.eqpDialogArr.forEach((item, index) => { |
| | | if (row.eqpcode === item.eqpcode) { |
| | | temp = item |
| | | this.eqpDialogArr.splice(index, 1, temp) |
| | | this.eqpDialogArr[index].isVisible = 1 |
| | | } |
| | | }) |
| | | this.isEqpTableEdit = false |
| | | } else { |
| | | return this.$message.info('只能一行一行修改!') |
| | | } |
| | | }, |
| | | // rowClick(row, column, event) { |
| | | // console.log(row, column, event, 3) |
| | | // console.log(this.dialogForm.stepcode, 4) |
| | | // this.getEqpTable(this.dialogForm.stepcode) |
| | | // }, |
| | | // 复制行 |
| | | async copyRow(row) { |
| | | async copyRow(row) { |
| | | let currentData = {}// 当前行对象 |
| | | let nextData = {}// 下一行对象 |
| | | if (row.RowNum === this.eqpDialogArr.length) { |
| | |
| | | this.getPartSelect2() |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | |
| | | this.editRouteName = row.route_name |
| | | this.editStepName = row.stepname |
| | | |
| | | // this.$nextTick(() => { |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.routecode = row.route_code |
| | | this.dialogForm.stepcode = row.stepcode |
| | | // }) |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | await this.radioChange(0) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .el-button--text{ |
| | | .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | .el-icon-share ,.el-icon-delete,.el-icon-edit-outline{ |
| | | |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | .el-icon-edit-outline{ |
| | | |
| | | .el-icon-edit-outline { |
| | | margin-right: 15px; |
| | | } |
| | | |
| | |
| | | background-color: #f8f8fa; |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td{ |
| | | background-color: #eaecef ; |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |
| | | background-color: #eaecef; |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |