ymy 2 years ago
parent
commit
bccc5a7fa2

+ 4 - 0
src/benyun/components/byInput/byInput.vue

@@ -34,6 +34,10 @@ export default class ByInput extends VueViews {
     if(this.propValue){
       this.setValue(this.propValue)
     }
+    if(this.attrs.defaultValue && !this.value){
+      this.setValue(this.attrs.defaultValue);
+      this.onChange();
+    }
   }
   get placeholder(){
     if(this.attrs.disabled){

+ 0 - 3
src/benyun/components/byTable/byTable.vue

@@ -154,9 +154,6 @@ export default class ByTable extends VueViews {
       }
     })
   }
-	setTableConfig(arr : any) {
-		if(arr) this.setConfig(arr)
-	}
   //点击详情
   detail(row:any){
     let data = (this as any).$lodash.cloneDeep(row);

+ 0 - 103
src/benyun/components/collapseCheckbox/collapseCheckbox.vue

@@ -1,103 +0,0 @@
-<template>
-  <el-collapse v-model="activeNames">
-    <template v-if="collapseItems && collapseItems.length >0">
-      <el-collapse-item v-for="(item, index) of collapseItems" :key="index" :name="index+1">
-        <template slot="title">
-          <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange($event,item)">{{item.title}}</el-checkbox>
-        </template>
-        <el-checkbox-group v-if="item.data && item.data.length > 0" v-model="value" @change="handleCheckedItemChange($event,item)">
-          <el-checkbox v-for="dataItem in item.data" :label="dataItem.value" :key="dataItem.value">{{dataItem.label}}</el-checkbox>
-        </el-checkbox-group>
-      </el-collapse-item>
-    </template>
-  </el-collapse>
-</template>
-
-<script lang="ts">
-/*
-  配置说明
-  config:{
-    attr:{
-     retType:''  //返回值类型 string/arrary
-    },
-    collapseItems:[{
-      title:'',
-      data:[{
-        label:'选项一',
-        value:1
-      },{
-        label:'选项二',
-        value:2
-      }]
-    }]
-  }
-*/
-import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import VueViews from '@/benyun/compVue/VueViews'
-@Component
-export default class CollapseCheckbox extends VueViews {
-  value:Array<any>=[]
-  activeNames:Array<any>=[1]
-  checkAll= false
-  isIndeterminate= false
-
-  get collapseItems(){
-    let data:Array<any>=[];
-    if(this.config?.collapseItems){
-      data = this.config.collapseItems
-    }
-    return data;
-  }
-  created(){
-    if(this.propConfig){
-      this.setConfig(this.propConfig)
-    }
-  }
-  mounted(){}
-
-  setValue(v:any){
-    if(v){
-      this.value = v
-    }else{
-      this.value = []
-    }
-  }
-
-  getValue(){
-    if(this.attrs.retType){
-      let n='';
-      for(const item of this.value){
-        if(!n){
-          n = n + ',' + item
-        }else{
-          n = item
-        }
-      }
-      return n;
-    }else{
-      return this.value;
-    }
-  }
-
-
-  handleCheckAllChange(val:any,config:any){
-    this.value = []
-    if(val && config.data){
-      for(const item of config.data){
-        this.value.push(item.value)
-      }
-    }
-    this.isIndeterminate = false;
-  }
-
-  handleCheckedItemChange(value:any,config:any){
-    let checkedCount = value.length;
-    this.checkAll = checkedCount === config.data.length;
-    this.isIndeterminate = checkedCount > 0 && checkedCount < config.data.length;
-  }
-
-}
-</script>
-<style lang="scss" scoped>
-
-</style>

+ 0 - 56
src/benyun/components/collapseRadio/collapseRadio.vue

@@ -1,56 +0,0 @@
-<template>
-  <el-collapse v-model="activeNames">
-    <template v-if="collapseItems && collapseItems.length >0">
-      <el-collapse-item v-for="(item, index) of collapseItems" :key="index" :name="index+1">
-        <template slot="title">
-          {{ item.title }}
-        </template>
-      </el-collapse-item>
-      <el-radio-group v-model="value">
-        <el-radio :label="3">备选项</el-radio>
-      </el-radio-group>
-    </template>
-  </el-collapse>
-</template>
-
-<script lang="ts">
-/*
-  配置说明
-  config:{
-    attr:{
-     retType:''  //返回值类型 string/arrary
-    },
-    collapseItems:[{
-      title:'',
-      data:[{
-        label:'选项一',
-        value:1
-      },{
-        label:'选项二',
-        value:2
-      }]
-    }]
-  }
-*/
-import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import VueViews from '@/benyun/compVue/VueViews'
-@Component
-export default class CollapseRadio extends VueViews {
-  value:any='';
-  activeNames:Array<any>=[1]
-
-  get collapseItems(){
-    let data:Array<any>=[];
-    if(this.config?.collapseItems){
-      data = this.config.collapseItems
-    }
-    return data;
-  }
-  created(){
-    if(this.propConfig){
-      this.setConfig(this.propConfig)
-    }
-  }
-  mounted(){}
-}
-</script>

+ 0 - 4
src/benyun/plugins/componentRegister.ts

@@ -39,10 +39,6 @@ const comps: Array<ComBase> = [
     name: "selectTree",
     component: () => import("@/benyun/components/selectTree/selectTree.vue"),
   },
-  {
-    name: "collapseCheckbox",
-    component: () => import("@/benyun/components/collapseCheckbox/collapseCheckbox.vue"),
-  },
   {
     name: "byArea",
     component: () => import("@/benyun/components/byArea/byArea.vue"),

+ 1 - 1
src/views/audit/productManagement/components/importProduct.vue

@@ -1,7 +1,7 @@
 <template>
   <vxe-modal v-model="value" id="importProduct" width="70%" height="80%" show-zoom resize transfer v-loading="load">
     <template #title>
-      <span>商品同步</span>
+      <span>商品关联</span>
     </template>
     <template #default>
       <div class="i-box">