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

修改批量操作

parent 6da33764
<template>
<section v-show="!isCollapse" class="left-tree">
<el-tree
ref="tree"
class="tree"
:data="treeData"
default-expand-all
node-key="id"
:current-node-key="currentNodekey"
:props="defaultProps"
:highlight-current="true"
:expand-on-click-node="false"
......@@ -53,7 +55,8 @@ export default {
children: 'children',
label: 'label'
},
curTree: {}
curTree: {},
currentNodekey: ''
}
},
mounted() {
......@@ -73,26 +76,7 @@ export default {
methods: {
handleNodeClick(data, node, event) {
if (!data || !data.id) return
// 处于单架次的一级node 处于禁用状态
// if (this.isMbom) {
// if (this.assembly.isActive === 'ag' && !data.isLeaf) return
// else if (this.assembly.isActive === 'ins' && !data.isLeaf) return
// else if (this.assembly.isActive === 'ass' && data.isLeaf) return
// } else {
// console.log(44555, this.$parent)
// this.$parent.$parent.$parent.$parent.$refs.right.tablePagination.currentPage = 1
// this.$parent.$parent.$parent.$parent.$refs.right.tablePagination.pageSize = 10
// this.curTree = data
// if (data.isLeaf) return
// }
// this.curId = data.id
// this.assembly.title.sorties = data.serialNo
// this.curNodeTitle = data.title
// this.highlightTreeRow()
// 获取表格数据
// this.assembly.getTableData(data.id, this.froms.aoName, this.isMbom)
this.$bus.$emit('getPlanData', data)
this.$bus.$emit('getPlanData', data, node ? node.level : data.level)
},
/**
* 高亮状态
......@@ -190,24 +174,7 @@ export default {
items: [],
operator: 'AND'
},
openProps: [
{
name: 'extPositionPlans'
},
{
name: 'extPositionLinks',
openProps: [
{
name: 'target',
openProps: [
{
name: 'wrProduction'
}
]
}
]
}
],
openProps: [],
sortItem: [
{
fieldName: 'serialNumber',
......@@ -226,8 +193,10 @@ export default {
title: this.froms.modelName + '-' + this.froms.sortieName,
icon: 'aircraft',
id: this.froms.sortie,
serialNo: this.froms.sortieName,
isLeaf: true,
disabled: true,
level: 1,
children: res.items.map((t) => {
quantity += t.completeCount
total += t.carryCount
......@@ -244,22 +213,11 @@ export default {
total: total
}]
this.treeData = data
this.handleNodeClick(data[0].children[0])
// if (that.isMbom) {
// this.handleNodeClick(data[0], this.froms.aoName)
// } else {
// if (
// JSON.stringify(this.curTree) === '{}' &&
// data[0].children &&
// data[0].children.length
// ) {
// this.curTree = data[0].children[0]
// this.handleNodeClick(data[0].children[0], this.froms.aoName)
// } else {
// this.handleNodeClick(this.curTree, this.froms.aoName)
// }
// }
// this.highlightTreeRow()
this.handleNodeClick(data[0])
this.currentNodekey = data[0].id
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey)
})
})
.catch((err) => console.error(err))
.finally(() => {})
......
......@@ -3,7 +3,7 @@
<div class="header">
<div class="tools">
<span v-if="jurisdId !== 'Activity_0v2qfnh'">
提示:<i class="el-icon-edit-outline" />状态为待提交可双击编辑列
提示:<i class="el-icon-edit-outline" />可双击编辑列
</span>
<dee-tools app-name="tf-mom" :tools="tools" mode="normal" :collapse="false" />
</div>
......@@ -91,11 +91,11 @@
<el-table-column
prop="countWorkHour"
align="center"
label="定额工时(h)"
label="定额工时(min)"
:width="140"
>
<template slot="header">
<span>定额工时(h</span>
<span>定额工时(min</span>
<i v-if="jurisdId !== 'Activity_0v2qfnh'" class="el-icon-edit-outline" />
</template>
<template slot-scope="scope">
......@@ -285,7 +285,8 @@ export default {
stateDisplayName: true,
seePdfShow: false,
stateOption: [],
nodeData: {}
nodeData: {},
level: null
}
},
created() {
......@@ -293,10 +294,11 @@ export default {
this.getTools()
},
mounted() {
this.$bus.$on('getPlanData', (data) => {
this.$bus.$on('getPlanData', (data, level) => {
this.$nextTick(() => {
this.nodeData = data
this.getTableData(data)
this.level = level
this.getTableData(data, level)
})
})
this.getDicListByCode()
......@@ -309,6 +311,10 @@ export default {
async getDicListByCode() {
this.stateOption = await this.$utils.getDicListByCode('ObjStatus')
},
getRefreshData() {
console.log(5454)
this.getTableData(this.nodeData, this.level)
},
/**
* 工具栏
*/
......@@ -328,6 +334,7 @@ export default {
btnStyle: '',
btnValue: 'importFile',
businessType: 'importFile',
downloadAfter: 'console.log(333, currentObject)\nthis.getData()\n',
downloadParams: 'downloadParams = {}',
downloadRequestMethod: 'get',
editTableShowMode: 'alway',
......@@ -534,9 +541,9 @@ export default {
searchItems: {
items: [
{
fieldName: 'positionNumber',
fieldName: 'sorties',
operator: 'EQ',
value: this.nodeData.title
value: this.nodeData.serialNo
}
],
operator: 'AND'
......@@ -549,6 +556,14 @@ export default {
}
]
}
if (this.level === 2) {
params.searchItems.items.push(
{
fieldName: 'positionNumber',
operator: 'EQ',
value: this.nodeData.title
})
}
const downloadTitle = '单架次指令标识-' + this.nodeData.title + '.xlsx'
downloadFile(`ExtProcessPlan/download/excel?taskDefinitionKey=${this.$route.query.taskDefinitionKey}`, 'post', params).then(res => {
this.$utils.downLoadFile(res, downloadTitle)
......@@ -557,7 +572,7 @@ export default {
/**
* 获取表格数据
*/
getTableData(data) {
getTableData(data, level) {
const that = this
that.aoLoading = true
that.tableData = []
......@@ -568,9 +583,9 @@ export default {
searchItems: {
items: [
{
fieldName: 'positionNumber',
fieldName: 'sorties',
operator: 'EQ',
value: data.title
value: data.serialNo
}
],
operator: 'AND'
......@@ -583,6 +598,14 @@ export default {
}
]
}
if (level === 2) {
params.searchItems.items.push(
{
fieldName: 'positionNumber',
operator: 'EQ',
value: data.title
})
}
post('/ExtProcessPlan/searchBatchExamineAo?taskDefinitionKey=' + this.$route.query.taskDefinitionKey, params)
.then((res) => {
if (res && res.items && res.items.content) {
......
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