Browse Source

2024-03-20

master
zelian_wu 2 years ago
parent
commit
e48887fc20
  1. 7
      src/views/main-navbar.vue
  2. 33
      src/views/modules/part/partInformation.vue
  3. 21
      src/views/modules/project/projectInfo/com_project_info_part.vue

7
src/views/main-navbar.vue

@ -427,6 +427,13 @@ export default {
.icon-svg {
width: 2em;
}
.site-sidebar{
overflow-y: auto;
}
.site-sidebar__inner{
overflow-y: visible;
}
.el-menu--collapse .el-menu .el-submenu, .el-menu--popup, .el-menu-item {
min-width: 50px !important;

33
src/views/modules/part/partInformation.vue

@ -94,6 +94,15 @@
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
<el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">
更多
</el-link >
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toMenu('BOM',scope.row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('Routing',scope.row)">Routing</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
@ -2839,6 +2848,12 @@
created () {
this.getDataList()
},
activated() {
if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
}
this.getDataList()
},
methods: {
//
@ -4232,7 +4247,10 @@
* 单机选中物料信息
* @param row
*/
partClickRow (row) {
partClickRow (row,column) {
if (column.label === '操作'){
return
}
this.$refs.partTable.toggleRowSelection(row)
this.partCurrentRow = JSON.parse(JSON.stringify(row))
},
@ -4516,6 +4534,19 @@
json += '}'
let s = eval('(' + json + ')')
return s
},
toMenu(type,row){
let path = '';
if (type === 'Routing'){
path = 'routing'
}else if (type === 'BOM'){
path = 'bom'
}
if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404'){
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
}else {
this.$router.push({name:`part-${path}Management`,params:{partNo:row.partNo},})
}
}
}
}

21
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -37,9 +37,16 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
<div v-if="item.columnProp === 'testPartNo'">
<el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.testPartNo)"> {{ scope.row[item.columnProp] }}</el-link>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
<div v-else>
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</div>
</template>
</el-table-column>
<!-- <el-table-column-->
@ -1700,7 +1707,13 @@
changeDurabilityWeek () {
this.modalData.durabilityWeek = this.modalData.durabilityDay / 7
},
toPartMenu(partNo){
if (this.$router.resolve(`/part-partInformation`).resolved.name === '404'){
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
}else {
this.$router.push({name:`part-partInformation`,params:{partNo:partNo},})
}
}
},
}
</script>

Loading…
Cancel
Save