|
@@ -88,6 +88,8 @@
|
|
|
|
|
|
|
|
<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
|
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
|
|
|
|
|
+
|
|
|
|
|
+ <matterPop v-if='matterShow' @close='close'></matterPop>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -102,9 +104,11 @@
|
|
|
pageeLedgerMain,
|
|
pageeLedgerMain,
|
|
|
assetPage
|
|
assetPage
|
|
|
} from '@/api/pda/workOrder.js'
|
|
} from '@/api/pda/workOrder.js'
|
|
|
|
|
+ import matterPop from './matterPop.vue'
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- baTreePicker
|
|
|
|
|
|
|
+ baTreePicker,
|
|
|
|
|
+ matterPop
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -122,7 +126,9 @@
|
|
|
isType: null,
|
|
isType: null,
|
|
|
|
|
|
|
|
pid: null, // 上个页面id
|
|
pid: null, // 上个页面id
|
|
|
- storageKey: null
|
|
|
|
|
|
|
+ storageKey: null,
|
|
|
|
|
+
|
|
|
|
|
+ matterShow: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -204,32 +210,10 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
confirm(id, name) {
|
|
confirm(id, name) {
|
|
|
-
|
|
|
|
|
- // console.log(this.getParentNodeId(this.classificationList, id))
|
|
|
|
|
-
|
|
|
|
|
this.categoryLevelId = id
|
|
this.categoryLevelId = id
|
|
|
this.getList()
|
|
this.getList()
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- getParentNodeId(tree, childId) {
|
|
|
|
|
- // 遍历树节点
|
|
|
|
|
- for (let node of tree) {
|
|
|
|
|
- // 如果当前节点就是目标节点的父节点,直接返回当前节点id
|
|
|
|
|
- if (node.children && node.children.some(child => child.id === childId)) {
|
|
|
|
|
- return node.id;
|
|
|
|
|
- }
|
|
|
|
|
- // 否则继续遍历当前节点的子节点
|
|
|
|
|
- if (node.children) {
|
|
|
|
|
- const parentId = getParentNodeId(node.children, childId);
|
|
|
|
|
- if (parentId !== null) {
|
|
|
|
|
- return parentId;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- // 如果没有找到父节点,则返回null
|
|
|
|
|
- return null;
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
getList() {
|
|
getList() {
|
|
@@ -290,25 +274,35 @@
|
|
|
|
|
|
|
|
//勾选
|
|
//勾选
|
|
|
selectVal(e, val, index) {
|
|
selectVal(e, val, index) {
|
|
|
- this.list[index].checked = !this.list[index].checked
|
|
|
|
|
-
|
|
|
|
|
- this.seletedAll = !this.list.some(item => !item.checked)
|
|
|
|
|
-
|
|
|
|
|
- const idx = this.memoList.findIndex(
|
|
|
|
|
- item => item.id === this.list[index].id
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- if (this.list[index].checked) {
|
|
|
|
|
- if (idx === -1) {
|
|
|
|
|
- this.memoList.push(this.list[index])
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- if (idx > -1) {
|
|
|
|
|
- this.memoList.splice(idx, 1)
|
|
|
|
|
|
|
+ if(this.isType == 'pick') {
|
|
|
|
|
+ this.list[index].checked = !this.list[index].checked
|
|
|
|
|
+
|
|
|
|
|
+ this.seletedAll = !this.list.some(item => !item.checked)
|
|
|
|
|
+
|
|
|
|
|
+ const idx = this.memoList.findIndex(
|
|
|
|
|
+ item => item.id === this.list[index].id
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ if (this.list[index].checked) {
|
|
|
|
|
+ if (idx === -1) {
|
|
|
|
|
+ this.memoList.push(this.list[index])
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (idx > -1) {
|
|
|
|
|
+ this.memoList.splice(idx, 1)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ } else if(this.isType == 'feed') {
|
|
|
|
|
+ this.matterShow = true
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ close() {
|
|
|
|
|
+ this.matterShow = false
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//跳转回添加页面
|
|
//跳转回添加页面
|