|
@@ -17,6 +17,7 @@
|
|
|
<script>
|
|
|
import {mapGetters} from 'vuex';
|
|
|
import { getEqCode } from "@/api/scan/request";
|
|
|
+import tools from "@/utils/tools";
|
|
|
export default {
|
|
|
name: "getCode",
|
|
|
props: {
|
|
@@ -39,7 +40,8 @@ export default {
|
|
|
label: "facility"
|
|
|
},
|
|
|
falg: true,
|
|
|
- content: []
|
|
|
+ content: [],
|
|
|
+ alloptions:[]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -66,8 +68,8 @@ export default {
|
|
|
},
|
|
|
getData() {
|
|
|
getEqCode().then(res => {
|
|
|
- console.log(res.data)
|
|
|
- this.options = this.changeArr(res.data.Content);
|
|
|
+ this.alloptions = this.changeArr(res.data.Content);
|
|
|
+ this.options = tools.deepCopy(this.alloptions);
|
|
|
if (!!this.value && this.value.length) {
|
|
|
let value = {}
|
|
|
this.options.map(item => {
|
|
@@ -106,7 +108,7 @@ export default {
|
|
|
|
|
|
//修改list
|
|
|
changeList() {
|
|
|
- this.options = this.options.filter(item => {
|
|
|
+ this.options = this.alloptions.filter(item => {
|
|
|
if (this.content.indexOf(item.code) > -1) {
|
|
|
return item
|
|
|
}
|