Commit fc6d3095 authored by “lixuyan”'s avatar “lixuyan”

修改指令下发树的点击

parent c18a3b0d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="instructions-disptach"> <div class="instructions-disptach">
<div class="instructions-issued-top"> <div class="instructions-issued-top">
<el-form :inline="true" :model="searchFormData" class="instructions-issued-search"> <el-form :inline="true" :model="searchFormData" class="instructions-issued-search">
<el-col :span="8"> <el-col :span="5">
<el-form-item label="站位:"> <el-form-item label="站位:">
<el-select v-model="searchFormData.postion" placeholder="站位" @change="changePostion"> <el-select v-model="searchFormData.postion" placeholder="站位" @change="changePostion">
<el-option <el-option
...@@ -26,7 +26,19 @@ ...@@ -26,7 +26,19 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="5">
<el-form-item label="架次:">
<el-select v-model="searchFormData.sorties" clearable placeholder="架次" @change="changeSorties">
<el-option
v-for="(item, i) in sortiesList"
:key="item.value + i"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="AO(号/名称):"> <el-form-item label="AO(号/名称):">
<el-input v-model="searchFormData.aoName" clearable placeholder="请输入AO(号/名称)" /> <el-input v-model="searchFormData.aoName" clearable placeholder="请输入AO(号/名称)" />
</el-form-item> </el-form-item>
...@@ -176,10 +188,12 @@ import { post } from '@/utils/http' ...@@ -176,10 +188,12 @@ import { post } from '@/utils/http'
export default { export default {
data() { data() {
return { return {
sortiesList: [],
searchFormData: { searchFormData: {
group: '', group: '',
postion: '', postion: '',
aoName: '' aoName: '',
sorties: ''
}, },
groupList: [], groupList: [],
groupUserList: [], groupUserList: [],
...@@ -314,10 +328,51 @@ export default { ...@@ -314,10 +328,51 @@ export default {
} }
}, },
created() { created() {
this.getStories()
this.getStation() this.getStation()
// this.getGroup() // this.getGroup()
}, },
methods: { methods: {
getStories() {
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extPosition.id',
'operator': 'NOTNULL'
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
this.$api.searchApi('AircraftSorties', params).then(res => {
this.sortiesList = res.items.content.map(row => {
return {
value: row.id,
label: row.defName
}
})
})
},
changeSorties() {
const sorties = this.sortiesList.find(r => r.value === this.searchFormData.sorties)
this.$set(this.searchFormData, 'sorties', sorties && sorties.label || '')
this.$set(this.searchFormData, 'sortiesName', sorties && sorties.value || '')
},
getStation() { getStation() {
this.$api.searchApi('ExtStandPosition', {}).then(res => { this.$api.searchApi('ExtStandPosition', {}).then(res => {
if (res.items.content && res.items.content.length > 0) { if (res.items.content && res.items.content.length > 0) {
...@@ -492,6 +547,13 @@ export default { ...@@ -492,6 +547,13 @@ export default {
} }
] ]
} }
if (this.searchFormData.sorties) {
params.searchItems.children[0].items.push({
'fieldName': 'extProcessPlan.sorties',
'operator': 'EQ',
'value': this.searchFormData.sorties
})
}
post('/JoExecutePlan/search', params).then(res => { post('/JoExecutePlan/search', params).then(res => {
if (res.items && res.items.content) { if (res.items && res.items.content) {
this.tableData = res.items.content this.tableData = res.items.content
...@@ -659,7 +721,7 @@ export default { ...@@ -659,7 +721,7 @@ export default {
.instructions-issued-search { .instructions-issued-search {
padding: 10px 8px; padding: 10px 8px;
height: 40px; height: 40px;
width: 70%; width: 86%;
} }
} }
} }
......
...@@ -177,7 +177,7 @@ export default { ...@@ -177,7 +177,7 @@ export default {
<style lang="scss" scope> <style lang="scss" scope>
.missing-parts{ .missing-parts{
.group-list{ .group-list{
height: calc(100vh - 100px); height: calc(100vh - 120px);
overflow-y: scroll; overflow-y: scroll;
margin-bottom: 20px; margin-bottom: 20px;
.more-bar { .more-bar {
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
</div> </div>
</div> </div>
<div class="station-box box"> <div class="station-box box">
<!-- <el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
/> -->
<el-tree <el-tree
ref="tree" ref="tree"
v-loading="treeLoading" v-loading="treeLoading"
...@@ -42,6 +46,7 @@ ...@@ -42,6 +46,7 @@
:load="loadNode" :load="loadNode"
@node-click="loadNode" @node-click="loadNode"
@node-expand="handleNodeExpanded" @node-expand="handleNodeExpanded"
@node-collapse="handleNodCollapse"
> >
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span class="tree-row"> <span class="tree-row">
...@@ -124,7 +129,8 @@ export default { ...@@ -124,7 +129,8 @@ export default {
skill: '', skill: '',
skillType: '', skillType: '',
isCooperate: false, isCooperate: false,
currentNodekey: '' currentNodekey: '',
filterText: ''
} }
}, },
watch: { watch: {
...@@ -182,6 +188,10 @@ export default { ...@@ -182,6 +188,10 @@ export default {
}) })
}, },
methods: { methods: {
// filterNode(value, data) {
// if (!value) return true
// return data.label.indexOf(value) !== -1
// },
getJoExecutePlanState() { getJoExecutePlanState() {
this.$utils.getDicListByCode('PlanState').then(res => { this.$utils.getDicListByCode('PlanState').then(res => {
if (res) { if (res) {
...@@ -337,6 +347,22 @@ export default { ...@@ -337,6 +347,22 @@ export default {
this.treeLoading = false this.treeLoading = false
}) })
}, },
handleNodCollapse(data, node) {
if (node.level === 2) {
if (node.data) {
node.data.joExecutePlanStateData = this.searchFormData.joExecutePlanStateData
this.searchFormData = node.data
node.data.level = 2
node.data.searchStories = this.form.sortiesName
this.$nextTick(() => {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(node.data)
}
})
this.$bus.$emit('getMissData', node.data)
}
}
},
handleNodeExpanded(data, node) { handleNodeExpanded(data, node) {
if (node.level === 2) { if (node.level === 2) {
const _node = this.$refs.tree.getNode(data) const _node = this.$refs.tree.getNode(data)
...@@ -349,6 +375,17 @@ export default { ...@@ -349,6 +375,17 @@ export default {
if (node.level === 1) { if (node.level === 1) {
return resolve(node.data.children) return resolve(node.data.children)
} else if (node.level === 2) { } else if (node.level === 2) {
if (node.data) {
node.data.joExecutePlanStateData = this.searchFormData.joExecutePlanStateData
this.searchFormData = node.data
node.data.level = 2
node.data.searchStories = this.form.sortiesName
this.$nextTick(() => {
if (this.$refs.detailCom.$refs.asCom && this.$refs.detailCom.$refs.asCom.getData) {
this.$refs.detailCom.$refs.asCom.getData(node.data)
}
})
this.$bus.$emit('getMissData', node.data)
const params = { const params = {
pageFrom: 1, pageFrom: 1,
pageSize: 9999, pageSize: 9999,
...@@ -382,24 +419,6 @@ export default { ...@@ -382,24 +419,6 @@ export default {
element.level = 3 element.level = 3
element.leaf = true 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) return resolve(res.items)
}) })
.catch((err) => { .catch((err) => {
...@@ -407,6 +426,7 @@ export default { ...@@ -407,6 +426,7 @@ export default {
return resolve([]) return resolve([])
}) })
.finally(() => {}) .finally(() => {})
}
} else if (node.level === 3) { } else if (node.level === 3) {
if (node.type === 'cooperate') { if (node.type === 'cooperate') {
this.isCooperate = true this.isCooperate = true
...@@ -523,7 +543,6 @@ export default { ...@@ -523,7 +543,6 @@ export default {
.left-container { .left-container {
height: 100%; height: 100%;
overflow-x:hidden; overflow-x:hidden;
// width: 15%;
.search-box { .search-box {
height: 150px; height: 150px;
font-size: 14px; font-size: 14px;
...@@ -554,10 +573,9 @@ export default { ...@@ -554,10 +573,9 @@ export default {
} }
} }
.station-box { .station-box {
height: calc(100% - 190px); height: calc(100vh - 300px);
} }
.box { .box {
// width: 100%;
margin: 4px; margin: 4px;
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
border-radius: 8px; border-radius: 8px;
...@@ -634,7 +652,6 @@ export default { ...@@ -634,7 +652,6 @@ export default {
} }
} }
.right-container { .right-container {
// width: 82%;
margin-left: 20px; margin-left: 20px;
} }
} }
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
.detail-pane { .detail-pane {
overflow: hidden; overflow-x: hidden;
width: 100%; width: 100%;
height: calc(100% - 6px); height: calc(100% - 6px);
} }
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
width="60" width="60"
align="center" align="center"
/> />
<el-table-column
prop="extMaterial.modelNo"
label="物料牌号"
min-width="50"
align="center"
/>
<el-table-column <el-table-column
prop="reqAmount" prop="reqAmount"
label="需求数" label="需求数"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<i :class="'tree' + node.level" /> <i :class="'tree' + node.level" />
<span v-if="node.level === 1" class="label" :title="data.serialNumber">{{ data.serialNumber }}</span> <span v-if="node.level === 1" class="label" :title="data.serialNumber">{{ data.serialNumber }}</span>
<span v-if="node.level === 2">{{ data.serialNumber + ',' + data.name }}</span> <span v-if="node.level === 2">{{ data.serialNumber + ',' + data.name }}</span>
<span v-if="node.level === 3" :class="[data.target.wrProduction?data.target.wrProduction[0].planState:'']">{{ data.target.serialNumber + ',' + data.target.name }}</span> <span v-if="node.level === 3" :class="[data.target.isOk ?'Delivery':'Finish']">{{ data.target.serialNumber + ',' + data.target.name }}</span>
</span> </span>
</span> </span>
</el-tree> </el-tree>
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
} }
] ]
} }
post(`/ExtPosition/search`, params) post(`/ExtPosition/queryPosition`, params)
.then((res) => { .then((res) => {
var data = res.items.content || [] var data = res.items.content || []
data.map((item) => { data.map((item) => {
...@@ -300,6 +300,7 @@ export default { ...@@ -300,6 +300,7 @@ export default {
this.$refs.tree.setCurrentKey(this.currentNodekey) this.$refs.tree.setCurrentKey(this.currentNodekey)
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.treeData[0].children[0].children[0].level = 3
this.activeNodeData = this.treeData[0].children[0].children[0] this.activeNodeData = this.treeData[0].children[0].children[0]
this.treeData[0].children[0].children[0].activeTab = this.activeTab this.treeData[0].children[0].children[0].activeTab = this.activeTab
if (this.activeTab === '0') { if (this.activeTab === '0') {
...@@ -334,8 +335,10 @@ export default { ...@@ -334,8 +335,10 @@ export default {
}) })
}, },
handleNodeClick(data, node) { handleNodeClick(data, node) {
if (node.level === 3) { if (node.level === 2 || node.level === 3) {
data.activeTab = this.activeTab data.activeTab = this.activeTab
data.level = node.level
data.searchStories = this.form.sortiesName
this.activeNodeData = data this.activeNodeData = data
this.$nextTick(() => { this.$nextTick(() => {
if (this.activeTab === '0') { if (this.activeTab === '0') {
......
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