Commit d420fa0b authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents 2f21740f be2d6b6b
......@@ -52,7 +52,7 @@ export default {
val.items.push({ fieldName: 'status', operator: 'EQ', value: 'disposed' })
val.items.push({ fieldName: 'usableAmount', operator: 'GT', value: 0 })
val.items.push({ fieldName: 'disposeDes', operator: 'LIKE', value: '三期' })
const extWorkCenterName = this.basicData.extWorkCenteName || (this.basicData.extWorkCeter && this.basicData.extWorkCeter.extname)
const extWorkCenterName = this.basicData.extWorkCenteName || (this.basicData.extWorkCenter && this.basicData.extWorkCenter.extname)
if (extWorkCenterName) {
val.items.push({ fieldName: 'workcenter', operator: 'EQ', value: extWorkCenterName })
}
......
......@@ -7,19 +7,18 @@
<template>
<div class="Chemical-test-process">
<dee-as-com
v-if="JobResponseInExpermentData"
v-if="basicData"
refs="outerCasing"
model-name="InStorageRequestItem"
:lay-config="{
typeName: 'InStorageRequestItem',
layKey: 'test'
layKey: '1c4983a2-6f51-49e4-95ee-2f5506b8e217'
}"
:basic-data="JobResponseInExpermentData"
:basic-data="basicData"
/>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
componentName: '理化检验流程',
......@@ -34,69 +33,14 @@ export default {
data() {
return {
// data: { 'reportNo': bindForm.reportNo, 'experimentAmount':bindForm.experimentAmount}, 'dxType': 'JobResponseInStorage', 'operator': 'ADD' }
JobResponseInExpermentData: null
}
},
computed: {},
created() {
// 初始化数据
console.log('理化检验流程', this.basicData)
this.getFrom(this.basicData.id)
},
methods: {
getFrom(id) {
const param = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'jobOrderId',
'operator': 'EQ',
'value': id
},
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'JobResponseInExperment'
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'objFileLinks',
'openProps': [
{ 'name': 'target' }
]
},
{
'name': 'jobOrder',
'openProps': [
{ 'name': 'purchaseUnit' }
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('JobResponseInStorage/search', param).then(res => {
// this.data = res.items.content[0]
this.JobResponseInExpermentData = res.items.content[0]
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
......
export default {
data() {
return {
loading: false
}
},
watch: {
showFlag(val) {
if (!val) {
......@@ -33,7 +38,9 @@ export default {
},
methods: {
search() {
}
}
}
<template>
<div class="TfMomWebStep-model">
<div :id="ganttElId" style="height: 100%;" />
<div :id="ganttElId" style="height: 100%;width: 100%;position: relative;" />
</div>
</template>
......@@ -101,7 +101,7 @@ export default {
this.currentId = this.node.id
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': this.node.id }] },
'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }],
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }],
'openProps': [
{
'name': 'extProcessExecutorRoutes'
......@@ -185,12 +185,13 @@ export default {
ganttAg.config.scale_height = 70
ganttAg.config.show_task_cells = true
ganttAg.config.autofit = false
ganttAg.config.fit_tasks = false
ganttAg.config.drag_move = false
ganttAg.config.details_on_dblclick = false
ganttAg.config.auto_scheduling = true
// 指定在选择显示所选任务时是否滚动时间线区域
ganttAg.config.scroll_on_click = true
ganttAg.config.min_column_width = 60
ganttAg.config.min_column_width = 40
ganttAg.config.autoscroll = true
ganttAg.config.drag_progress = false
ganttAg.ext.zoom.init(zoomConfig)
......@@ -290,6 +291,9 @@ export default {
}
ganttAg.clearAll()
ganttAg.parse(data)
setTimeout(() => {
ganttAg.autoSchedule()
}, 1000)
}
})
// 在将新链接添加到甘特图之前触发
......@@ -300,15 +304,7 @@ export default {
return true
})
ganttAg.attachEvent('onAfterBatchUpdate', function(action) {
console.log('onAfterBatchUpdate')
// your code here
})
ganttAg.attachEvent('onAutoScheduleCircularLink', function(groups) {
console.log(groups, 'onAutoScheduleCircularLink')
// any custom logic here
})
ganttAg.attachEvent('onAfterTaskAutoSchedule', function(task, start, link, predecessor) {
console.log(task, start, link, predecessor, 'onAfterTaskAutoSchedule')
ganttAg.autoSchedule()
})
this.$nextTick(() => {
ganttAg.init(this.ganttElId)
......@@ -343,18 +339,21 @@ export default {
}
},
save() {
if (this.loading) {
return
}
this.loading = true
const tasks = this.gantt.getTableData().data.data
const links = this.gantt.getTableData().data.links
const params = this.ganttData.map(item => {
const routes = item.extProcessExecutorRoutes.map(r => {
const routes = item.extProcessExecutorRoutes ? item.extProcessExecutorRoutes.map(r => {
return {
id: r.id,
operator: 'REMOVE'
}
})
}) : []
const task = tasks.find(r => r.id === item.id)
if (item.extProcessExecutorRoutes) {
const link = links.find(r => r.target === item.id)
const link = links.find(r => Number(r.target) === item.id)
if (link) {
routes.push({
operator: 'ADD',
......@@ -366,7 +365,7 @@ export default {
isCritical: link.isCritical
})
}
}
return {
id: item.id,
operator: 'MODIFY',
......@@ -376,8 +375,9 @@ export default {
}
})
this.$api.recursion('ExtPosition', params, true).then(() => {
this.$utils.showMessageSuccess('保存成功!')
this.getData()
})
}).finally(() => { this.loading = false })
}
}
}
......@@ -389,5 +389,15 @@ export default {
.gatt{
height: 100%;
}
.gantt_critical_task{
background: #f39c4f;
border: 1px solid #f39c4f;
}
.gantt_task_line{
&.workday_over{
background: #f39c4f;
border: 1px solid #f39c4f;
}
}
}
</style>
......@@ -116,7 +116,7 @@ export default {
getPosition() {
const params = {
'searchItems': { 'items': [{ 'fieldName': 'aircraftSortiesId', 'operator': 'EQ', 'value': this.AircraftSortiesId }] },
'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }]
'sortItem': [{ 'fieldName': 'serialNumber', 'sortOrder': 'asc' }]
}
this.$api.searchApi('ExtPosition', params).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment