|
|
@@ -10,7 +10,7 @@
|
|
|
<checkbox-group v-for="(item, index) in ListData" :key="index"
|
|
|
@change="e => selectVal(e, item, index)">
|
|
|
<label class="listBox rx-bs">
|
|
|
-
|
|
|
+
|
|
|
<view class="listBox-sel">
|
|
|
<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
|
|
|
:checked="item.checked" />
|
|
|
@@ -67,6 +67,11 @@
|
|
|
DTOList: {
|
|
|
type: Array,
|
|
|
default: () => {}
|
|
|
+ },
|
|
|
+
|
|
|
+ mattList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => {}
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -80,23 +85,36 @@
|
|
|
},
|
|
|
computed: {
|
|
|
ListData() {
|
|
|
- const data = this.DTOList.map(m => {
|
|
|
- m.checked = false
|
|
|
- return {
|
|
|
- ...m
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- this.list = data
|
|
|
-
|
|
|
- return data
|
|
|
+ console.log(this.mattList)
|
|
|
+ let list = []
|
|
|
+
|
|
|
+ list.push(
|
|
|
+
|
|
|
+ ...this.DTOList.map(i => {
|
|
|
+ const checked =
|
|
|
+ this.mattList.findIndex(itm => itm.id == i.id) > -1
|
|
|
+ console.log(checked)
|
|
|
+ return {
|
|
|
+ checked,
|
|
|
+ ...i
|
|
|
+ }
|
|
|
+ })
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ this.list = list
|
|
|
+
|
|
|
+ return list
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
scrolltolower() {},
|
|
|
|
|
|
save() {
|
|
|
- this.$emit('mattSave', this.memoList, this.matterId)
|
|
|
+ this.$emit('mattSave', this.memoList, this.matterId)
|
|
|
},
|
|
|
|
|
|
//勾选
|
|
|
@@ -112,7 +130,7 @@
|
|
|
if (this.list[index].checked) {
|
|
|
if (idx === -1) {
|
|
|
this.memoList.push(this.list[index])
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
if (idx > -1) {
|