Commit 1ba89a72 authored by “lixuyan”'s avatar “lixuyan”

调整指令下发页面细节

parent 99a6157b
......@@ -38,6 +38,7 @@
:default-expanded-keys="defaultExpandedKeys"
:props="defaultProps"
:highlight-current="true"
:current-node-key="currentNodekey"
:load="loadNode"
@node-click="loadNode"
@node-expand="handleNodeExpanded"
......@@ -123,9 +124,7 @@ export default {
skill: '',
skillType: '',
isCooperate: false,
hasLoad: false,
currentLoadTreeData: '',
resolveObj: ''
currentNodekey: ''
}
},
watch: {
......@@ -338,30 +337,13 @@ export default {
this.treeLoading = false
})
},
// getExpandData(data, node) {
// if (node.level === 2) {
// this.$bus.$emit('getMissData', data)
// }
// },
// handleNodeCollapse(data, node) {
// if (node.level === 2) {
// node.loaded = false
// node.childNodes.splice(0, node.childNodes.length)
// }
// },
handleNodeExpanded(data, node) {
// console.log(333, node)
// if (node.level === 2) {
// node.childNodes = []
// if (node.expanded) {
// if (this.hasLoad) {
// this.hasLoad = false
// } else {
// node.loaded = false
// this.loadNode(node, this.resolveObj)
// }
// }
// }
if (node.level === 2) {
const _node = this.$refs.tree.getNode(data)
_node.loaded = false
node.childNodes.splice(0, node.childNodes.length)
_node.expand()
}
},
loadNode(node, resolve) {
if (node.level === 1) {
......@@ -401,6 +383,23 @@ export default {
element.leaf = true
})
this.$bus.$emit('getMissData', node.data)
res.items[0].joExecutePlanStateData = this.searchFormData.joExecutePlanStateData
this.searchFormData = res.items[0]
this.$nextTick(() => {
if (!this.isCooperate) {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(res.items[0])
}
} else {
if (this.$refs.detailComCoo.$refs.asCom && this.$refs.detailComCoo.$refs.asCom.getData) {
this.$refs.detailComCoo.$refs.asCom.getData(res.items[0])
}
}
})
this.currentNodekey = res.items[0].id
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey)
})
return resolve(res.items)
})
.catch((err) => {
......
......@@ -16,203 +16,18 @@
</template>
<script>
import { post } from '@/utils/http'
import missingParts from './components/missingParts'
import stationPlanList from './components/stationPlanList'
export default {
name: 'StationPlanMaintenance',
name: 'InstructionsIssued',
components: { missingParts, stationPlanList },
data() {
return {
sortiesId: '',
positionNumber: '',
form: {},
stateOptions: [],
headerShow: true,
basicData: {},
missInfo: {},
rowData: {},
defaultActiveName: ''
}
},
computed: {
tabItems() {
return [
{
name: '列表',
id: '0'
},
{
name: '甘特图',
id: '1'
}
]
},
layConfig() {
return {
typeName: 'JoExecutePlan',
layKey: 'stationPlanList'
}
}
},
mounted() {
this.$nextTick(() => {
this.defaultActiveName = '2'
})
// this.defaultActiveName = this.$route.query.id ? '2' : '1'
this.$bus.$on('getTableData', (data) => {
this.$nextTick(() => {
this.getLeftCount(data)
this.getRightCount(data)
const formData = {
items: [],
operator: 'AND'
}
for (const i in data) {
formData.items.push({
fieldName: i,
value: data[i]
})
}
this.$refs.detailCom.$children[0].searchFormData = formData
this.$refs.detailCom.$children[0].getData()
})
})
this.getStateOptions()
},
methods: {
getMissData(data) {
this.rowData = data
this.getMissInfo(data.row.extProcessPlan)
},
// getPageData(val) {
// this.getMissInfo(this.rowData.row, val)
// },
getLeftCount(obj) {
const params = {
operator: 'AND',
items: [
{
fieldName: 'extProcessPlan.sorties',
operator: 'EQ',
value: obj.sortiesName
},
{
fieldName: 'extProcessPlan.positionNumber',
operator: 'EQ',
value: obj.postionName
},
{
fieldName: 'extProcessPlan.subTypeName',
operator: 'IN',
value: ['ExtProcessPlanAssembly', 'ExtProcessPlanAOR']
},
{
fieldName: 'fitRates',
operator: 'EQ',
value: '1'
}
]
}
post(`/ExtSupporting/count`, params)
.then((res) => {
if (res.items) {
this.$set(this.missInfo, 'leftItem', res.items)
// this.missInfo.leftItem = res.items
}
})
.finally(() => {})
},
getRightCount(obj) {
const params = {
operator: 'AND',
items: [
{
fieldName: 'sorties',
operator: 'EQ',
value: obj.sortiesName
},
{
fieldName: 'positionNumber',
operator: 'EQ',
value: obj.postionName
},
{
fieldName: 'subTypeName',
operator: 'IN',
value: ['ExtProcessPlanAssembly', 'ExtProcessPlanAOR']
}
]
}
post(`/ExtProcessPlan/count`, params)
.then((res) => {
if (res.items) {
this.$set(this.missInfo, 'rightItem', res.items)
}
})
.finally(() => {})
},
getMissInfo(obj) {
const params = {
pageFrom: 1,
pageSize: 200,
searchItems: {
children: [
{
items: [
{
fieldName: 'extSupporting.extProcessPlanId',
operator: 'EQ',
value: obj.id
}
],
operator: 'AND'
}
],
items: [],
operator: 'AND'
},
openProps: [
{
name: 'extMaterial'
},
{
name: 'productWorkCenter'
}
],
sortItem: [
{
fieldName: 'modifyTime',
sortOrder: 'desc'
}
]
}
post(`/ExtSupportingItem/supportingItemAoId`, params)
.then((res) => {
if (res.items) {
this.$set(this.missInfo, 'missList', res.items)
}
})
.finally(() => {})
},
getStateOptions() {
this.$utils.getDicListByCode('PlanState').then((res) => {
this.stateOptions = res
})
},
search(form) {
this.form = { ...form }
this.form.positionNumber = this.positionNumber
this.sortiesId = form.sorties
},
change(positionNumber) {
this.positionNumber = positionNumber
this.form.positionNumber = this.positionNumber
},
showStation(flag) {
this.headerShow = flag
}
}
}
</script>
......@@ -225,7 +40,7 @@ export default {
width: 100%;
background-color: #fff;
.detail-pane {
overflow-x: hidden;
overflow: hidden;
width: 100%;
height: calc(100% - 6px);
}
......
......@@ -34,6 +34,7 @@
:data="treeData"
node-key="id"
:default-expanded-keys="defaultExpandedKeys"
:current-node-key="currentNodekey"
:props="defaultProps"
:highlight-current="true"
:expand-on-click-node="false"
......@@ -118,7 +119,8 @@ export default {
layKey: 'stationPlanConfirmList'
},
activeTab: '0',
activeNodeData: {}
activeNodeData: {},
currentNodekey: ''
}
},
watch: {
......@@ -293,7 +295,10 @@ export default {
}
]
this.defaultExpandedKeys = [this.treeData[0].children[0].id]
this.$refs.tree.setCurrentKey(this.treeData[0].children[0].children[0].id)
this.currentNodekey = this.treeData[0].children[0].children[0].id
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey)
})
this.$nextTick(() => {
this.activeNodeData = this.treeData[0].children[0].children[0]
this.treeData[0].children[0].children[0].activeTab = this.activeTab
......
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