telephone-clients 3.0.117 → 3.0.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telephone-clients",
3
- "version": "3.0.117",
3
+ "version": "3.0.118",
4
4
  "description": "呼叫模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -725,21 +725,32 @@
725
725
  watch: {
726
726
  'model.f_repairtype'(val) {
727
727
  if(val!=undefined){
728
- if(val.length>0){
728
+ if(typeof(val) === 'string'){
729
+ this.model.f_repairtype=[]
729
730
  var arry = [];
730
- // for循环遍历val数组
731
- for (let i = 0; i < val.length; i++) {
732
- // 创建新的m对象实例,而不是使用同一个m
733
- var m = {
734
- f_failure_type: val[i],
735
- failurecase: []
736
- };
737
- arry.push(m);
738
- }
739
- // 将arry数组转换为字符串,并赋值给this.model.failure
731
+ var m = {
732
+ f_failure_type:[],
733
+ failurecase: []
734
+ };
735
+ arry.push(m);
740
736
  this.model.failure = JSON.stringify(arry);
737
+ }else if(val instanceof Array){
738
+ //判断是不是数组
739
+ if(val.length>0){
740
+ var arry = [];
741
+ // for循环遍历val数组
742
+ for (let i = 0; i < val.length; i++) {
743
+ // 创建新的m对象实例,而不是使用同一个m
744
+ var m = {
745
+ f_failure_type: val[i],
746
+ failurecase: []
747
+ };
748
+ arry.push(m);
749
+ }
750
+ // 将arry数组转换为字符串,并赋值给this.model.failure
751
+ this.model.failure = JSON.stringify(arry);
752
+ }
741
753
  }
742
-
743
754
  }
744
755
  },
745
756
  'telsource'(){