Commit 4814c50a authored by jingnan's avatar jingnan 👀

实物构型管理功能开发

parent 7c8f03c9
<template>
<section>
<div class="physicalConfigurationManagement-from">
<div class="icon-wrapper">
<img src="/icons/r-access.png" class="icon">
<span>架次查询</span>
</div>
<el-form ref="ruleForm" :model="form" label-width="70px">
<el-form-item label="机型:" prop="model">
<el-select v-model="form.model" clearable @change="getAddRecursion">
<el-option
v-for="item in dataModel"
:key="item.id"
:label="item.resName"
:value="item.resCode"
/>
</el-select>
</el-form-item>
<el-form-item label="架次:" prop="sortie">
<el-select v-model="form.sortie" filterable clearable :loading="sortiesLoading" @change="getTreeData">
<el-option
v-for="item in dataSortie"
:key="item.id"
:label="item.serialNo"
:value="item.serialNo"
/>
</el-select>
</el-form-item>
</el-form>
</div>
</section>
</template>
<script>
export default {
data() {
return {
form: {
model: '',
sortie: ''
},
dataModel: [],
sortiesLoading: true,
dataSortie: [],
isCollapse: false
}
},
mounted() {
this.getModelData()
},
methods: {
/**
* 获取机型
*/
getModelData() {
this.modelData = []
const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] }
this.$api.searchApi('AircraftType', params).then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.dataModel = res.items.content.map(p => {
return {
id: p.id,
resCode: p.defCode,
resName: p.defName
}
})
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
this.form.model = this.dataModel[0].resCode
this.getAddRecursion()
})
})
},
/**
* 获取架次数据
*/
getAddRecursion() {
this.sortiesLoading = true
const params = {
'searchItems': {
'items': [{
'fieldName': 'aircraftTypeId',
'operator': 'EQ',
'value': this.dataModel.filter(p => p.resCode === this.form.model)[0].id
}]
},
sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }]
}
this.dataSortie = []
this.$api.searchApi('AircraftSorties', params)
.then((res) => {
if (res.items && res.items.content && res.items.content.length) {
this.dataSortie = res.items.content.map(p => {
return {
id: p.id,
serialNo: p.defCode
}
})
} else {
this.$message({
showClose: true,
message: res.message,
type: 'error'
})
}
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.dataSortie.length) this.form.sortie = this.dataSortie[0].serialNo
this.sortiesLoading = false
this.$parent.$parent.$refs.right.handleClick()
this.getTreeData()
})
})
},
getTreeData() {
this.$parent.$refs.tree.getTreeData()
}
}
}
</script>
<style lang="scss" >
.physicalConfigurationManagement-from {
border: 1px solid #ccc;
border-radius: 8px;
box-sizing: border-box;
padding: 20px;
.el-select {
width: 100%;
}
.el-form-item:last-child {
margin-bottom: 0px;
}
.form-btn {
text-align: center;
}
.icon-wrapper {
.icon,
span {
vertical-align: middle;
}
margin-bottom: 10px;
}
}
</style>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="row"> <div class="row">
<label>架次:</label> <label>架次:</label>
<el-select v-model="form.sorties" filterable clearable size="mini" placeholder="请选择" :loading="sortiesLoading"> <el-select v-model="form.sorties" filterable clearable size="mini" placeholder="请选择">
<el-option <el-option
v-for="item in sortiesData" v-for="item in sortiesData"
:key="item.id" :key="item.id"
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
sorties: '' sorties: ''
}, },
modelData: [], modelData: [],
sortiesLoading: true,
sortiesData: [], sortiesData: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
...@@ -67,6 +66,7 @@ export default { ...@@ -67,6 +66,7 @@ export default {
const model = this.modelData.find((r) => r.id === val) const model = this.modelData.find((r) => r.id === val)
this.$set(this.form, 'modelName', (model && model.defName) || '') this.$set(this.form, 'modelName', (model && model.defName) || '')
this.$set(this.form, 'sorties', '') this.$set(this.form, 'sorties', '')
this.updateForm()
this.getSortiesData() this.getSortiesData()
} }
}, },
...@@ -78,6 +78,7 @@ export default { ...@@ -78,6 +78,7 @@ export default {
} }
const sorties = this.sortiesData.find((r) => r.id === val) const sorties = this.sortiesData.find((r) => r.id === val)
this.$set(this.form, 'sortiesName', (sorties && sorties.defCode) || '') this.$set(this.form, 'sortiesName', (sorties && sorties.defCode) || '')
this.updateForm()
this.getExtPosition() this.getExtPosition()
} }
} }
...@@ -91,33 +92,33 @@ export default { ...@@ -91,33 +92,33 @@ export default {
*/ */
getModelData() { getModelData() {
this.modelData = [] this.modelData = []
const params = { 'searchItems': { 'items': [] }, 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }] } const params = {
this.$api.searchApi('AircraftType', params).then((res) => { 'searchItems': { 'items': [] },
if (res.items && res.items.content && res.items.content.length) { 'sortItem': [{ 'fieldName': 'modifyTime', 'sortOrder': 'asc' }]
this.modelData = res.items.content.map(p => { }
return { this.$api.searchApi('AircraftType', params)
.then(res => {
if (res && res.items && res.items.content && res.items.content.length) {
this.modelData = res.items.content.map(p => ({
id: p.id, id: p.id,
defCode: p.defCode, defCode: p.defCode,
defName: p.defName defName: p.defName
} }))
}) // 如果modelData不为空,则设置form.model为第一个元素的id
} if (this.modelData.length) {
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.modelData && this.modelData.length) {
this.form.model = this.modelData[0].id this.form.model = this.modelData[0].id
} }
this.getSortiesData() this.getSortiesData()
}
}) })
.catch(err => {
console.error('Failed to fetch aircraft types:', err)
}) })
}, },
/** /**
* 获取架次数据 * 获取架次数据
*/ */
getSortiesData() { getSortiesData() {
this.sortiesLoading = true
const params = { const params = {
'searchItems': { 'searchItems': {
'items': [{ 'items': [{
...@@ -126,123 +127,35 @@ export default { ...@@ -126,123 +127,35 @@ export default {
'value': this.form.model || '' 'value': this.form.model || ''
}] }]
}, },
sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] 'sortItem': [{ 'fieldName': 'defCode', 'sortOrder': 'asc' }]
} }
this.sortiesData = [] this.sortiesData = []
this.$api.searchApi('AircraftSorties', params) this.$api.searchApi('AircraftSorties', params)
.then((res) => { .then((res) => {
if (res.items && res.items.content && res.items.content.length) { if (res.items && res.items.content && res.items.content.length) {
this.sortiesData = res.items.content.map(p => { this.sortiesData = res.items.content.map(p => ({
return {
id: p.id, id: p.id,
defCode: p.defCode defCode: p.defCode
} }))
})
} if (this.sortiesData.length) {
})
.catch((err) => console.log(err))
.finally(() => {
this.$nextTick(() => {
if (this.sortiesData && this.sortiesData.length) {
this.form.sorties = this.sortiesData[0].id this.form.sorties = this.sortiesData[0].id
this.$set(this.form, 'sortiesName', (this.sortiesData[0].defCode) || '')
} }
this.sortiesLoading = false }
// this.$parent.$parent.$refs.right.handleClick()
this.getExtPosition()
}) })
.catch((err) => {
console.error('Failed to fetch aircraft sorties:', err)
}) })
}, },
updateForm() {
this.$emit('formChange', this.form)
},
/**
* 初始化树结构
*/
getExtPosition() { getExtPosition() {
this.$refs.tree.getExtPosition() this.$refs.tree.getExtPosition()
// this.reloadTreeData()
},
// 加载数据
// getExtPosition(level = -1) {
// this.treeLoading = true
// const params = {
// pageFrom: 1,
// pageSize: 9999,
// searchItems: {
// children: [
// {
// items: [
// {
// fieldName: 'aircraftSortiesId', // 架次ID
// operator: 'EQ',
// value: this.form.sorties || ''
// }
// ],
// operator: 'AND'
// }
// ],
// items: [],
// operator: 'AND'
// },
// openProps: [
// {
// name: 'extPositionPlans'
// },
// {
// name: 'extPositionLinks',
// openProps: [
// {
// name: 'target',
// openProps: [
// {
// name: 'wrProduction'
// }
// ]
// }
// ]
// }
// ],
// sortItem: [
// {
// 'fieldName': 'serialNumber',
// 'sortOrder': 'desc'
// }
// ]
// }
// this.$api.searchApi('ExtPosition', params)
// .then((res) => {
// res.items && res.items.content && res.items.content.forEach(element => {
// element.workingStatus = element.extPositionPlans && element.extPositionPlans.length > 0 ? element.extPositionPlans[0].planState : null
// })
// this.treeData = [
// {
// serialNumber: `BBOM-${this.form.modelName}-${this.form.sortiesName}`,
// materName: '',
// gaceVersio: '',
// state: '',
// id: 1,
// children: res.items.content || [],
// level: 0
// }
// ]
// this.defaultExpandedKeys = [1]
// })
// .catch((err) => console.log(err))
// .finally(() => {
// this.treeLoading = false
// })
// },
loadNode(node, resolve) {
if (node.level === 0) {
return resolve([{ name: 'region' }])
}
if (node.level > 1) return resolve([])
setTimeout(() => {
const data = [{
name: 'leaf',
leaf: true
}, {
name: 'zone'
}]
resolve(data)
}, 500)
} }
} }
} }
...@@ -250,7 +163,6 @@ export default { ...@@ -250,7 +163,6 @@ export default {
<style lang="scss" > <style lang="scss" >
.physicalConfigurationManagement_left { .physicalConfigurationManagement_left {
// margin: 4px;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
......
<!-- <!--
* @Author:ljm * @LastEditTime: 2024-07-12 15:07:23
* @Date: 2021-04-25
* @LastEditTime:
* @Description: 架次实物构型-记实 * @Description: 架次实物构型-记实
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/physicalDocumentationOfSorties/index.vue'
--> -->
<template> <template>
<section class="physical-documentation-of-sorties-material"> <section class="physical-documentation-of-sorties-material">
...@@ -54,7 +51,7 @@ ...@@ -54,7 +51,7 @@
<div class="logo" style="margin: 20px 20px 10px 0px"> <div class="logo" style="margin: 20px 20px 10px 0px">
<img src="/icons/u212.svg" alt=""><span>装配记实</span> <img src="/icons/u212.svg" alt=""><span>装配记实</span>
</div> </div>
<div class="dee-tools"> <!-- <div class="dee-tools">
<div class="tools-block"> <div class="tools-block">
<div <div
class="tool-item" class="tool-item"
...@@ -67,7 +64,7 @@ ...@@ -67,7 +64,7 @@
<i v-show="preserveDisabled" class="el-icon-loading" /> <i v-show="preserveDisabled" class="el-icon-loading" />
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="right"> <div class="right">
<div class="legnd"> <div class="legnd">
...@@ -101,9 +98,10 @@ ...@@ -101,9 +98,10 @@
</template> </template>
<script> <script>
import { post } from '@/utils/http'
import Table from './table' import Table from './table'
import { downloadPdfHandle } from '@/api/inventory.js' // import { downloadPdfHandle } from '@/api/inventory.js'
import axios from 'axios' // import axios from 'axios'
export default { export default {
name: 'Material', name: 'Material',
components: { components: {
...@@ -125,22 +123,20 @@ export default { ...@@ -125,22 +123,20 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
getComprehensive() { getComprehensive() {
var { model, sortie } = const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form const activeName = this.$parent.$parent.$parent.activeName
var activeName = this.$parent.$parent.$parent.activeName
this.comprehensive = [] this.comprehensive = []
this.HttpRequest( post(
`DxProcessPlan/comprehensive?sorties=${sortie}&planType=${model}&number=${activeName}`, `ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{}, {}
'post'
) )
.then((res) => { .then((res) => {
if (res.items) { if (res.items) {
this.comprehensive = { this.comprehensive = {
scrapQuantity: res.items['报废单'].countCarry || 0, scrapQuantity: res.items['报废单'].countCarry || 0,
scrapCount: res.items['报废单'].countAO || 0, scrapCount: res.items['报废单'].countAO || 0,
materialsQuantity: res.items['代料单'].countCarry || 0, materialsQuantity: res.items['器材代料'].countCarry || 0,
materialsCount: res.items['代料单'].countAO || 0, materialsCount: res.items['器材代料'].countAO || 0,
stringQuantity: res.items['串件单'].countCarry || 0, stringQuantity: res.items['串件单'].countCarry || 0,
stringCount: res.items['串件单'].countAO || 0 stringCount: res.items['串件单'].countAO || 0
} }
...@@ -148,49 +144,49 @@ export default { ...@@ -148,49 +144,49 @@ export default {
}) })
.catch((err) => console.error(err)) .catch((err) => console.error(err))
.finally(() => {}) .finally(() => {})
},
exportTable() {
this.preserveDisabled = true
const baseURl = downloadPdfHandle()
var { model, sortie } =
this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form
axios({
method: 'get',
url: `/DifferenceExcel/download/excel?planType=${model}&sorties=${sortie}`,
baseURL: baseURl,
params: {
},
headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
responseType: 'arraybuffer'
})
.then((res) => {
const blob = new Blob([res.data], {
type:
'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
})
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob)
} else {
const elink = document.createElement('a')
elink.download = 'MBOM差异表' + '.xlsx'
elink.style.display = 'none'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
document.body.removeChild(elink)
} }
// } else { // exportTable() {
// // IE10+下载 // this.preserveDisabled = true
// const baseURl = downloadPdfHandle()
// var { model, sortie } =
// this.$parent.$parent.$parent.$parent.$refs.left.$refs.form.form
// axios({
// method: 'get',
// url: `/DifferenceExcel/download/excel?planType=${model}&sorties=${sortie}`,
// baseURL: baseURl,
// params: {
// },
// headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
// responseType: 'arraybuffer'
// })
// .then((res) => {
// const blob = new Blob([res.data], {
// type:
// 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
// })
// if (window.navigator.msSaveOrOpenBlob) {
// navigator.msSaveBlob(blob) // navigator.msSaveBlob(blob)
// } else {
// const elink = document.createElement('a')
// elink.download = 'MBOM差异表' + '.xlsx'
// elink.style.display = 'none'
// elink.href = URL.createObjectURL(blob)
// document.body.appendChild(elink)
// elink.click()
// document.body.removeChild(elink)
// }
// // } else {
// // // IE10+下载
// // navigator.msSaveBlob(blob)
// // }
// })
// .catch((err) => {
// console.error(err)
// })
// .finally(() => {
// this.preserveDisabled = false
// })
// } // }
})
.catch((err) => {
console.error(err)
})
.finally(() => {
this.preserveDisabled = false
})
}
} }
} }
</script> </script>
...@@ -233,8 +229,7 @@ export default { ...@@ -233,8 +229,7 @@ export default {
img { img {
width: 50px; width: 50px;
height: 58px; height: 58px;
margin-bottom: 5px; // margin-bottom: 5px;
// height: ;
} }
} }
.right { .right {
......
<template> <template>
<section class="physical-documentation-of-sorties-material-table"> <section class="physical-documentation-of-sorties-material-table dee-table">
<!-- 表格 --> <!-- 表格 -->
<el-table <el-table
v-loading="loading"
:data="tableData" :data="tableData"
height="calc(100% - 40px)" height="calc(100% - 40px)"
border border
...@@ -45,12 +44,11 @@ ...@@ -45,12 +44,11 @@
</section> </section>
</template> </template>
<script> <script>
import { post } from '@/utils/http'
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
// 加载中
loading: false,
// 所有可动态配置的表格列 // 所有可动态配置的表格列
colums1: [ colums1: [
{ {
...@@ -91,13 +89,6 @@ export default { ...@@ -91,13 +89,6 @@ export default {
sortable: true, sortable: true,
width: 180 width: 180
} }
// {
// title: '软件版本记实',
// show: true,
// key: 'recordSoftware',
// sortable: true,
// width: 180
// },
], ],
colums2: [ colums2: [
{ {
...@@ -110,7 +101,7 @@ export default { ...@@ -110,7 +101,7 @@ export default {
{ {
title: '代料单', title: '代料单',
show: true, show: true,
key: 'totalMinutes', key: 'recordSubstitute',
sortable: true, sortable: true,
width: 120 width: 120
}, },
...@@ -152,14 +143,13 @@ export default { ...@@ -152,14 +143,13 @@ export default {
// 初始化数据 // 初始化数据
init() { init() {
this.tableData = [] this.tableData = []
var id = const id =
this.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.id .rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) { if (!id || !number) {
return return
} }
this.loading = true
const params = { const params = {
id: id, id: id,
number: number, number: number,
...@@ -168,22 +158,21 @@ export default { ...@@ -168,22 +158,21 @@ export default {
numberOrName: this.$parent.search numberOrName: this.$parent.search
} }
// 发送请求 // 发送请求
this.HttpRequest('/DxProcessPlan/planDetails', params, 'post') post('/ExtProcessPlan/planDetails', params)
.then((res) => { .then((res) => {
if ( if (
res.items && res.items &&
res.items.physicalRecordDDxPage && res.items.physicalRecordDS &&
res.items.physicalRecordDDxPage && res.items.physicalRecordDS &&
res.items.physicalRecordDDxPage.content && res.items.physicalRecordDS.content &&
res.items.physicalRecordDDxPage.content.length res.items.physicalRecordDS.content.length
) { ) {
this.tableData = res.items.physicalRecordDDxPage.content this.tableData = res.items.physicalRecordDS.content
this.tablePagination.total = res.items.physicalRecordDDxPage.totalElements this.tablePagination.total = res.items.physicalRecordDS.totalElements
} }
}) })
.catch((err) => console.log(err)) .catch((err) => console.log(err))
.finally(() => { .finally(() => {
this.loading = false
}) })
}, },
setPage($event, state) { setPage($event, state) {
......
<!-- <!--
* @Author:ljm * @LastEditTime: 2024-07-12 18:03:48
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 16:18:32
* @Description: 架次实物构型-预览 * @Description: 架次实物构型-预览
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/sortiesPhysicalConfigurationsSame/index.vue'
--> -->
<template> <template>
<section <section
v-loading="loading"
class="physical-documentation-of-sorties-preview" class="physical-documentation-of-sorties-preview"
> >
<label v-show="showTitle" :title="title">{{ title }}</label> <label v-show="showTitle" :title="title">{{ title }}</label>
...@@ -16,8 +12,6 @@ ...@@ -16,8 +12,6 @@
</template> </template>
<script> <script>
// import { downloadPdfHandle } from '@/api/inventory.js'
// import axios from 'axios'
import { get } from '@/utils/http' import { get } from '@/utils/http'
export default { export default {
name: 'Preview', name: 'Preview',
...@@ -25,8 +19,7 @@ export default { ...@@ -25,8 +19,7 @@ export default {
return { return {
showTitle: false, showTitle: false,
title: '', title: '',
openUrl: '', openUrl: ''
loading: false
} }
}, },
mounted() {}, mounted() {},
...@@ -38,19 +31,7 @@ export default { ...@@ -38,19 +31,7 @@ export default {
if (!id || !number) { if (!id || !number) {
return return
} }
this.loading = true
this.showTitle = false this.showTitle = false
// const baseURl = VUE_APP_BASE_API || process.env.VUE_APP_BASE_API // eslint-disable-line
// axios({
// method: 'POST',
// url: 'ExtProcessPlan/createPDF',
// baseURL: baseURl,
// params: {
// id: id
// },
// headers: { token: `${localStorage.getItem('token')}`, 'equipment_id': `${localStorage.getItem('uid')}` },
// responseType: 'arraybuffer'
// })
get(`ExtProcessPlan/createPDF?id=${id}`).then((res) => { get(`ExtProcessPlan/createPDF?id=${id}`).then((res) => {
const blob = new Blob([res.data], { const blob = new Blob([res.data], {
type: 'application/pdf' type: 'application/pdf'
...@@ -60,7 +41,6 @@ export default { ...@@ -60,7 +41,6 @@ export default {
} else { } else {
this.openUrl = URL.createObjectURL(blob) this.openUrl = URL.createObjectURL(blob)
this.$nextTick(() => { this.$nextTick(() => {
this.loading = false
this.title = this.$parent.$parent.$parent.$parent.$refs.left.$refs.tree this.title = this.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.serialNumber .rowData.serialNumber
setTimeout(() => { setTimeout(() => {
...@@ -69,7 +49,6 @@ export default { ...@@ -69,7 +49,6 @@ export default {
}) })
} }
}).catch(() => { }).catch(() => {
this.loading = false
}) })
} }
} }
......
<!-- <!--
* @Author:ljm * @LastEditTime: 2024-07-12 10:21:15
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 15:12:05
* @Description: 架次实物构型-质量控制 * @Description: 架次实物构型-质量控制
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/sortiesPhysicalConfigurationsSame/index.vue'
--> -->
<template> <template>
<section class="physical-documentation-of-sorties-quality"> <section class="physical-documentation-of-sorties-quality">
...@@ -50,6 +47,7 @@ ...@@ -50,6 +47,7 @@
</template> </template>
<script> <script>
import { post } from '@/utils/http'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import Table from './table' import Table from './table'
export default { export default {
...@@ -139,12 +137,12 @@ export default { ...@@ -139,12 +137,12 @@ export default {
}, },
methods: { methods: {
initEcharts() { initEcharts() {
var chartDom = document.getElementById('main') const chartDom = document.getElementById('main')
var that = this const that = this
var elementResizeDetectorMaker = require('element-resize-detector') // 引入监听dom变化的组件 const elementResizeDetectorMaker = require('element-resize-detector') // 引入监听dom变化的组件
var erd = elementResizeDetectorMaker() const erd = elementResizeDetectorMaker()
// 用于使chart自适应高度和宽度,通过窗体高宽计算容器高宽 // 用于使chart自适应高度和宽度,通过窗体高宽计算容器高宽
// var resizeWorldMapContainer = function() { // let resizeWorldMapContainer = function() {
// // eslint-disable-line // // eslint-disable-line
// chartDom.style.width = chartDom.scrollWidth + 'px' // chartDom.style.width = chartDom.scrollWidth + 'px'
// chartDom.style.height = chartDom.clientHeight + 'px' // chartDom.style.height = chartDom.clientHeight + 'px'
...@@ -159,9 +157,8 @@ export default { ...@@ -159,9 +157,8 @@ export default {
}) })
}, },
getComprehensive() { getComprehensive() {
var { model, sortie } = const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form const activeName = this.$parent.$parent.$parent.activeName
var activeName = this.$parent.$parent.$parent.activeName
this.myChart.setOption({ this.myChart.setOption({
series: [ series: [
{ {
...@@ -175,36 +172,35 @@ export default { ...@@ -175,36 +172,35 @@ export default {
} }
] ]
}) })
this.HttpRequest( post(
`DxProcessPlan/comprehensive?sorties=${sortie}&planType=${model}&number=${activeName}`, `ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{}, {}
'post'
) )
.then((res) => { .then((res) => {
if (res.items) { if (res.items) {
// 发起 // 发起
var launch = [ const launch = [
res.items['报废'].countAO, res.items['报废'].countAO,
res.items['不合格'].countAO, res.items['不合格审理单'].countAO,
res.items['质量问题'].countAO, res.items['质量预审单'].countAO,
res.items['器材代料'].countAO, res.items['器材代料'].countAO,
res.items['串件申请单'].countAO res.items['串件单'].countAO
] ]
// 完成 // 完成
var Finish = [ const Finish = [
res.items['报废'].countNotOk, res.items['报废'].countNotOk,
res.items['不合格'].countNotOk, res.items['不合格审理单'].countNotOk,
res.items['质量问题'].countNotOk, res.items['质量预审单'].countNotOk,
res.items['器材代料'].countNotOk, res.items['器材代料'].countNotOk,
res.items['串件申请单'].countNotOk res.items['串件单'].countNotOk
] ]
// 审理 // 审理
var hear = [ const hear = [
res.items['报废'].countCarry, res.items['报废'].countCarry,
res.items['不合格'].countCarry, res.items['不合格审理单'].countCarry,
res.items['质量问题'].countCarry, res.items['质量预审单'].countCarry,
res.items['器材代料'].countCarry, res.items['器材代料'].countCarry,
res.items['串件申请单'].countCarry res.items['串件单'].countCarry
] ]
this.myChart.setOption({ this.myChart.setOption({
series: [ series: [
......
<template> <template>
<section class="sorties-physical-configurations-same-table"> <section class="sorties-physical-configurations-same-table dee-table">
<!-- 表格 --> <!-- 表格 -->
<el-table <el-table
v-loading="loading"
:data="tableData" :data="tableData"
height="calc(100% - 40px)" height="calc(100% - 40px)"
border border
...@@ -32,12 +31,13 @@ ...@@ -32,12 +31,13 @@
</section> </section>
</template> </template>
<script> <script>
import { post } from '@/utils/http'
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
// 加载中 // 加载中
loading: false, // loading: false,
// 分页 // 分页
tablePagination: { tablePagination: {
currentPage: 1, currentPage: 1,
...@@ -65,12 +65,13 @@ export default { ...@@ -65,12 +65,13 @@ export default {
// 初始化数据 // 初始化数据
init() { init() {
this.tableData = [] this.tableData = []
var id = this.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree.rowData.id const id = this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
var number = this.$parent.$parent.$parent.$parent.activeName .rowData.id
const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) { if (!id || !number) {
return return
} }
this.loading = true // this.loading = true
const params = { const params = {
id: id, id: id,
number: number, number: number,
...@@ -79,18 +80,18 @@ export default { ...@@ -79,18 +80,18 @@ export default {
numberOrName: this.$parent.search numberOrName: this.$parent.search
} }
// 发送请求 // 发送请求
this.HttpRequest('/DxProcessPlan/planDetails', params, 'post') post('/ExtProcessPlan/planDetails', params)
.then((res) => { .then((res) => {
if (res.items && res.items.qualityRecordDxPage && if (res.items && res.items.quality &&
res.items.qualityRecordDxPage.content && res.items.quality.content &&
res.items.qualityRecordDxPage.content.length) { res.items.quality.content.length) {
this.tableData = res.items.qualityRecordDxPage.content this.tableData = res.items.quality.content
this.tablePagination.total = res.items.qualityRecordDxPage.totalElements this.tablePagination.total = res.items.quality.totalElements
} }
}) })
.catch((err) => console.log(err)) .catch((err) => console.log(err))
.finally(() => { .finally(() => {
this.loading = false // this.loading = false
}) })
}, },
setPage($event, state) { setPage($event, state) {
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
<el-tab-pane label="实物记实" name="DRecord"> <el-tab-pane label="实物记实" name="DRecord">
<Material ref="DRecord" /> <Material ref="DRecord" />
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane label="供应商记实" name="ERecord">
<Supplier ref="ERecord" />
</el-tab-pane> -->
<el-tab-pane label="预览" name="FPreview"> <el-tab-pane label="预览" name="FPreview">
<Preview ref="FPreview" /> <Preview ref="FPreview" />
</el-tab-pane> </el-tab-pane>
...@@ -31,71 +28,67 @@ import Schedule from './schedule' ...@@ -31,71 +28,67 @@ import Schedule from './schedule'
import Material from './material' import Material from './material'
// 质量记实 // 质量记实
import Quality from './quality' import Quality from './quality'
// 供应商记实
// import Supplier from './supplier'
export default { export default {
components: { components: {
Preview, Preview,
Material, Material,
Quality, Quality,
Schedule Schedule
// Supplier
}, },
props: { props: {
collapse: { leftSearchForm: {
type: Boolean, type: Object,
default: () => true default: () => {}
} }
}, },
data() { data() {
return { return {
activeName: '', activeName: 'BRecord',
tabPaneData: [] tabPaneData: []
} }
}, },
watch: {
activeName: {
handler(val) {
if (val && val !== 'FPreview' && this.leftSearchForm.sorties && this.leftSearchForm.model) {
this.$nextTick(() => {
this.$refs[this.activeName].getComprehensive()
})
}
}
},
leftSearchForm: {
deep: true,
handler(val) {
if (val && val.sorties && val.model) {
this.$nextTick(() => {
this.$refs[this.activeName].getComprehensive()
})
}
}
}
},
created() { created() {
this.$bus.$on('treeCurrentRowData', (data) => { this.$bus.$on('treeCurrentRowData', (data) => {
this.treeRowData = JSON.parse(JSON.stringify(data)) if (data && data.id && data.nodeLevel > 2) {
this.handleClick()
}
}) })
this.getTabs()
}, },
methods: { methods: {
handleClick() { handleClick() {
if (this.activeName === 'FPreview') { if (this.activeName === 'FPreview') {
this.$parent.$parent.$parent.$refs.left.$refs.tree.setBRecordOrCRecord() this.$parent.$parent.$parent.$refs.left.$refs.tree.setBRecordOrCRecord()
this.$refs[this.activeName].init() this.$refs[this.activeName].init()
} else if (this.activeName === 'ERecord') {
this.$refs[this.activeName].$refs.table.init()
} else { } else {
if (this.activeName === 'DRecord') { if (this.activeName === 'DRecord') {
this.$parent.$refs.left.$refs.tree.setBRecordOrCRecord() this.$parent.$parent.$parent.$refs.left.$refs.tree.setBRecordOrCRecord()
} }
this.$refs[this.activeName].getComprehensive() this.$refs[this.activeName].$refs.table.tablePagination.currentPage = 1
this.$refs[this.activeName].$refs.table.tablePagination.pageSize = 10
this.$refs[this.activeName].$refs.table.init() this.$refs[this.activeName].$refs.table.init()
} }
}, },
getTabs() {
this.tabPaneData = []
this.HttpRequest('DxProcessPlan/rightMenu', {}, 'post')
.then((res) => {
if (res.items) {
for (var key in res.items) {
this.tabPaneData.push({
key: key,
value: res.items[key]
})
}
}
})
.catch((err) => console.log(err))
.finally(() => {
this.tabPaneData.length &&
this.$nextTick(() => {
this.activeName = this.tabPaneData[0].key
this.handleClick()
})
})
},
previewPDF() { previewPDF() {
this.$refs.FPreview.getPdf() this.$refs.FPreview.getPdf()
} }
......
<!-- <!--
* @Author:ljm * @LastEditTime: 2024-07-12 10:05:03
* @Date: 2021-04-25
* @LastEditTime: 2024-07-09 14:51:34
* @Description: 架次实物构型-进度 * @Description: 架次实物构型-进度
* @FilePath: /mes-web/applications/dee-mes/src/views/mes//physicalQualityAndConfiguratioCnontrol/physicalConfigurationManagement/SortiesPhysicalConfigurationsSchedule/index.vue'
--> -->
<template> <template>
<section class="physical-documentation-of-sorties-schedule"> <section class="physical-documentation-of-sorties-schedule">
...@@ -64,7 +61,7 @@ ...@@ -64,7 +61,7 @@
</div> </div>
</div> </div>
</div> </div>
<Table ref="table" :tree-row-data="treeRowData" /> <Table ref="table" />
</section> </section>
</template> </template>
...@@ -76,12 +73,6 @@ export default { ...@@ -76,12 +73,6 @@ export default {
components: { components: {
Table Table
}, },
props: {
treeRowData: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
comprehensive: [ comprehensive: [
...@@ -107,14 +98,17 @@ export default { ...@@ -107,14 +98,17 @@ export default {
search: '', search: '',
colors: [{ color: '#5cb87a', percentage: 100 }] colors: [{ color: '#5cb87a', percentage: 100 }]
} }
},
watch: {
},
created() {
}, },
mounted() {}, mounted() {},
methods: { methods: {
getComprehensive() { getComprehensive() {
const { modelName, sortiesName } = const { modelName, sortiesName } = this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
this.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.form
const activeName = this.$parent.$parent.$parent.activeName const activeName = this.$parent.$parent.$parent.activeName
console.log('🚀 activeName:', activeName)
this.comprehensive = [ this.comprehensive = [
{ {
key: 1, key: 1,
...@@ -137,8 +131,7 @@ export default { ...@@ -137,8 +131,7 @@ export default {
] ]
post( post(
`ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`, `ExtProcessPlan/comprehensive?sorties=${sortiesName}&planType=${modelName}&number=${activeName}`,
{}, {}
'post'
) )
.then((res) => { .then((res) => {
if (res.items) { if (res.items) {
......
...@@ -37,15 +37,9 @@ import { post } from '@/utils/http' ...@@ -37,15 +37,9 @@ import { post } from '@/utils/http'
export default { export default {
components: {}, components: {},
props: { props: {
treeRowData: {
type: Object,
default: () => {}
}
}, },
data() { data() {
return { return {
// 加载中
loading: false,
// 分页 // 分页
tablePagination: { tablePagination: {
currentPage: 1, currentPage: 1,
...@@ -95,10 +89,10 @@ export default { ...@@ -95,10 +89,10 @@ export default {
// 初始化数据 // 初始化数据
init() { init() {
this.tableData = [] this.tableData = []
var id = const id =
this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree this.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$refs.left.$refs.tree
.rowData.id .rowData.id
var number = this.$parent.$parent.$parent.$parent.activeName const number = this.$parent.$parent.$parent.$parent.activeName
if (!id || !number) { if (!id || !number) {
return return
} }
...@@ -110,7 +104,7 @@ export default { ...@@ -110,7 +104,7 @@ export default {
numberOrName: this.$parent.search numberOrName: this.$parent.search
} }
// 发送请求 // 发送请求
post('/ExtProcessPlan/planDetails', params, 'post') post('/ExtProcessPlan/planDetails', params)
.then((res) => { .then((res) => {
if ( if (
res.items && res.items &&
......
<template>
<dee-dialog
title="附件浏览"
:dialog-visible.sync="visible"
width="50%"
:before-close="handleClose"
class="sorties-physical-configurations-supplier-dialog"
>
<div>
<!-- <upload-files v-if="uploadVisble" v-model="form.objFileLinks" /> -->
</div>
</dee-dialog>
</template>
<script>
// import UploadFiles from '@/components/Lean/UploadFiles'
export default {
// components: { UploadFiles },
data() {
return {
visible: false,
disabled: false,
uploadVisble: true,
form: {
results: '',
objFileLinks: []
},
row: {},
loading: false
}
},
created() {},
methods: {
// 打开弹出框
open(row = {}) {
this.form = {
results: '',
objFileLinks: []
}
this.row = row
this.form.results = row.results
this.visible = true
this.getList(row.id)
},
getList(sourceId) {
this.loading = true
this.uploadVisble = false
const params = {
indices: ['ObjFileLink'],
searchItems: {
items: [
{
fieldName: 'sourceId',
operator: 'EQ',
value: sourceId
}
],
operator: 'AND'
},
openProps: [
{
pageFrom: 1,
pageSize: 1,
name: 'target'
}
]
}
this.HttpRequest('/FileUtil/checkFile', params, 'post')
.then((res) => {
this.form.objFileLinks = res.items.content[0].objFileLinks
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
this.uploadVisble = true
})
},
/**
* 保存功能
* 根据是否有id处理创建和编辑逻辑
*/
save() {
this.updateFile()
this.removeFile()
},
removeFile() {
var result = []
var index = []
this.form.objFileLinks.forEach((item, i) => {
if (item.operator === 'REMOVE') {
result.push({ id: item.id })
index.push(i)
}
})
index.forEach((item) => {
this.$delete(this.form.objFileLinks, item)
})
// 发送请求
this.HttpRequest('/FileUtil/removeFile', result, 'post')
.then((res) => {
})
.catch((err) => console.log(err))
.finally(() => {})
},
// 上传附件
updateFile() {
var result = []
this.form.objFileLinks.forEach((item) => {
result.push({
targetId: item.target.id, // fileId
targetIdType: 'Papers',
sourceId: this.row.id, // 处理单id
sourceIdType: 'ExamineRecord'
})
})
this.disabled = true
this.HttpRequest('/FileUtil/upload', result, 'post')
.then((res) => {
this.reset('上传')
})
.catch((err) => console.log(err))
.finally(() => {
this.disabled = false
})
},
// 重置弹出框
reset(message) {
this.visible = false
this.$message({
message: `${message}成功`,
type: 'success'
})
this.$emit('reload')
this.form = {
results: '',
objFileLinks: []
}
},
handleClose() {
this.visible = false
}
}
}
</script>
<style lang="scss">
.view-dialog {
.el-form-item__label,
.dee-table-header {
display: none !important;
}
}
</style>
<template>
<div class="sorties-physical-configurations-supplier">
<Table ref="table" @open="(row) => $refs.dialog.open(row)" />
<!-- 弹出框 -->
<Dialog ref="dialog" />
</div>
</template>
<script>
import Table from './table'
import Dialog from './dialog.vue'
export default {
name: 'Supplier',
components: {
Table,
Dialog
},
data() {
return {}
},
created() {},
methods: {
getComprehensive() {}
}
}
</script>
<style lang="scss">
.sorties-physical-configurations-supplier {
height: 100%;
display: flex;
flex-direction: column;
> section {
height: 20px;
flex-grow: 1;
display: flex;
flex-direction: column;
> .el-table {
height: 20px;
flex-grow: 1;
}
.el-pagination {
text-align: right;
padding-top: 10px;
}
}
.el-table thead th {
color: #2e2e2e;
font-weight: 700;
font-size: 14px;
padding: 0;
background-color: #f3f6f7;
line-height: 46px !important;
}
.el-table .see-excel {
color: #3a8ee6;
cursor: pointer;
}
}
.sorties-physical-configurations-supplier-dialog .upload-files {
.dee-upload-page,
.el-form-item--small.el-form-item {
margin-bottom: 0 !important;
}
.dee-table-header,
.dee-form2 .el-form-item--small .el-form-item__label {
display: none;
}
.el-form-item__content {
padding-left: 0 !important;
}
}
</style>
<!-- <!--
* @LastEditTime: 2024-07-09 10:09:20 * @LastEditTime: 2024-07-12 15:38:19
* @Description: 实物构型管理 * @Description: 实物构型管理
--> -->
<template> <template>
...@@ -12,13 +12,12 @@ ...@@ -12,13 +12,12 @@
> >
<template slot="paneL"> <template slot="paneL">
<div class="left-container"> <div class="left-container">
<Left ref="left" /> <Left ref="left" @formChange="formChangeHandle" />
</div> </div>
</template> </template>
<template slot="paneR"> <template slot="paneR">
<div class="right-container"> <div class="right-container">
<!-- 223333 --> <Right ref="right" :left-search-form="leftSearchForm" />
<Right ref="right" :collapse="collapse" />
</div> </div>
</template> </template>
</dee-fold-pane> </dee-fold-pane>
...@@ -37,12 +36,13 @@ export default { ...@@ -37,12 +36,13 @@ export default {
}, },
data() { data() {
return { return {
collapse: true collapse: true,
leftSearchForm: {}
} }
}, },
methods: { methods: {
handleCollapse(val) { formChangeHandle(val) {
// this.collapse = val this.leftSearchForm = JSON.parse(JSON.stringify(val))
} }
} }
} }
...@@ -94,14 +94,11 @@ export default { ...@@ -94,14 +94,11 @@ export default {
justify-content:flex-start; justify-content:flex-start;
padding: 6px 0px; padding: 6px 0px;
.search-input{ .search-input{
// width: calc(100% - 150px);
// flex:1;
margin-right:10px; margin-right:10px;
} }
} }
} }
.box { .box {
// width: 100%;
margin: 4px; margin: 4px;
border: 1px solid #d8d8d8; border: 1px solid #d8d8d8;
border-radius: 8px; border-radius: 8px;
......
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