This commit is contained in:
ln1778 2024-09-10 10:47:01 +08:00
parent baa8568ea8
commit 0bee153304
3 changed files with 24 additions and 48 deletions

View File

@ -34,6 +34,7 @@
<agNumberRange v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-numberRange'" size="small"/> <agNumberRange v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-numberRange'" size="small"/>
<agMultifunctionSearch v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-multifunction-search'" size="small"/> <agMultifunctionSearch v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-multifunction-search'" size="small"/>
<agQuery v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-query'" size="small"/> <agQuery v-bind="item" v-model="formValue[item.enName]" v-if="item.type=='ag-query'" size="small"/>
<ag-mution-checkbox :datas="item.datas" :placeholder="item.placeholder" v-model="formValue[item.enName]" v-if="item.type=='ag-mution-checkbox'" size="small"> </ag-mution-checkbox>
</slot> </slot>
</el-form-item> </el-form-item>
</ag-col> </ag-col>

View File

@ -10,7 +10,7 @@
> >
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<span> <span>
<span :class="{ color: checkedList.length }">{{ checkedList.length==0?placeholder:dropdownvalue }}</span <span :class="{ color: checkedList.length }">{{ checkedList.length==0?placeholder||'请选择':dropdownvalue }}</span
><span class="list-length" v-if="valuelength >= 1" ><span class="list-length" v-if="valuelength >= 1"
>+ {{ valuelength }}</span >+ {{ valuelength }}</span
></span ></span
@ -19,7 +19,7 @@
class="el-icon-arrow-up el-icon--right" class="el-icon-arrow-up el-icon--right"
:class="{ 'rotate-arrow': down }" :class="{ 'rotate-arrow': down }"
></i> ></i>
<i v-else class="el-icon-close el-icon--right" @click="clear"></i> <i v-else class="el-icon-close el-icon--right" @click.stop.prevent="clear"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-input <el-input
@ -70,6 +70,7 @@
</template> </template>
<script> <script>
import { nextTick } from 'vue';
export default { export default {
props: ["datas", "placeholder", "value"], props: ["datas", "placeholder", "value"],
name: "AgMutionCheckbox", name: "AgMutionCheckbox",
@ -87,8 +88,6 @@
isIndeterminate: false, isIndeterminate: false,
retract: false, retract: false,
olddatas:[ olddatas:[
{label:"方法1",value:"1"},
{label:"方法2",value:"2"}
], ],
oldvalue:[] oldvalue:[]
}; };
@ -178,13 +177,16 @@
methods: { methods: {
clear(){ clear(){
this.checkedList = []; this.checkedList = [];
this.valuelength=0;
this.dropdownvalue="";
this.isIndeterminate = false; this.isIndeterminate = false;
this.checkAll=false; this.checkAll=false;
this.nextTick(()=>{
this.$refs.multioncheckref.hide();
});
}, },
checkeddown(val){ checkeddown(val){
this.oldvalue={list:this.checkedList,checkAll:this.checkAll,isIndeterminate:this.isIndeterminate}; this.oldvalue={list:this.checkedList,checkAll:this.checkAll,isIndeterminate:this.isIndeterminate};
}, },
dropdownchange(){ dropdownchange(){
this.down = !this.down; this.down = !this.down;

View File

@ -54,7 +54,7 @@
</agUpdate> </agUpdate>
<ag-form :data="formdata" label-width="120px" label-position="right" v-model="formvalue"> <ag-form :data="formdata" label-width="120px" label-position="right" v-model="formvalue">
</ag-form> </ag-form>
<ag-mution-checkbox :datas="checklist" @onSearch="onCheckSearch" placeholder="请选择" v-model="checkvalue"> </ag-mution-checkbox> <ag-mution-checkbox :datas="checklist" @onSearch="onCheckSearch" v-model="checkvalue"> </ag-mution-checkbox>
<!-- <el-input agMultionCheckbox <!-- <el-input agMultionCheckbox
size="small" size="small"
placeholder="请输入内容" placeholder="请输入内容"
@ -74,13 +74,7 @@
<script> <script>
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import Vue from 'vue'; import Vue from 'vue';
import agDialog from "../packages/agDialog/src/index.vue";
import agInput from "../packages/agInput/src/index.vue";
import agSelect from "../packages/agSelect/src/index.vue";
import agNumberRange from "../packages/agNumberRange/src/index.vue";
import agCascadeOptional from "../packages/agCascadeOptional/src/index.vue"; import agCascadeOptional from "../packages/agCascadeOptional/src/index.vue";
import agQuery from "../packages/agQuery/src/index.vue";
import agTable from "../packages/agTable/src/index.vue";
import vuedraggable from 'vuedraggable'; import vuedraggable from 'vuedraggable';
import agElemUI from "../packages/index.js"; import agElemUI from "../packages/index.js";
@ -141,7 +135,7 @@ export default {
}, },
inputValue:"", inputValue:"",
date_value:null, date_value:null,
checkvalue:['2'], checkvalue:[],
value: "选项1", value: "选项1",
a_value: "59584", a_value: "59584",
values: ["4",""], values: ["4",""],
@ -375,53 +369,32 @@ export default {
{label:"IMEI/机器编号",span:12,type:"ag-input-number",enName:'imei',value:'43543',placeholder:'请输入IMEI/机器编号',size:'small',clearable:true,max:10,min:2,step:2,show:true}, {label:"IMEI/机器编号",span:12,type:"ag-input-number",enName:'imei',value:'43543',placeholder:'请输入IMEI/机器编号',size:'small',clearable:true,max:10,min:2,step:2,show:true},
{label:"质检码",span:12,type:"ag-rate",value:'',enName:'ser_sn',placeholder:'请输入质检码',size:'small',clearable:true,show:true,options:[{value:'1',label:'112'},{value:'2',label:'2223'}]}, {label:"质检码",span:12,type:"ag-rate",value:'',enName:'ser_sn',placeholder:'请输入质检码',size:'small',clearable:true,show:true,options:[{value:'1',label:'112'},{value:'2',label:'2223'}]},
{label:"质检时间",span:12,type:"ag-multifunction-search",enName:'time',showAlpha:true,size:'small',colorFormat:'hsv',show:true}, {label:"质检时间",span:12,type:"ag-multifunction-search",enName:'time',showAlpha:true,size:'small',colorFormat:'hsv',show:true},
{label:"头像",span:12,type:"ag-query",enName:'avatar',inputs:[ {label:"头像",span:12,type:"ag-mution-checkbox",enName:'avatar',datas:[
{ {
label:"分类", label:"分类",
elem:'el-select', value:"class",
name:"class",
options:[
{
value: "Chengdu",
label: "成都",
},
{
value: "Shenzhen",
label: "深圳",
},
{
value: "Guangzhou",
label: "广州",
},
{
value: "Dalian",
label: "大连",
},
]
}, },
{ {
label:"品牌", label:"品牌",
elem:'el-select', value:"brand",
name:"brand", placeholder:"请输入品牌"
placeholder:"请输入品牌",
options:[]
}, },
{ {
label:"型号", label:"型号",
elem:'el-select', elem:'el-select',
name:"model", value:"model",
options: [] options: []
}, },
{ {
label:"颜色", label:"颜色",
elem:'el-select', elem:'el-select',
name:"color", value:"color",
options:[] options:[]
}, },
{ {
label:"容量", label:"容量",
elem:'el-select', elem:'el-select',
name:"capacity", value:"capacity",
options:[] options:[]
} }
],placeholder:'请输入质检码',size:'small',clearable:true,show:true,limit:4,multiple:true}, ],placeholder:'请输入质检码',size:'small',clearable:true,show:true,limit:4,multiple:true},