This commit is contained in:
lcw
2026-01-12 10:40:05 +08:00
parent eb27d2bd11
commit 5d913a3cf4
10 changed files with 20736 additions and 183 deletions

View File

@ -14,8 +14,8 @@
style="width:100%" :min="item.min || 0" :max="item.max || 1000" />
<!--选择 select-->
<MOSTY.Select v-else-if="item.type == 'select'" @change="handleNum" filterable :multiple="item.multiple"
v-model="listQuery[item.prop]" :dictEnum="item.options" width="100%" clearable
:placeholder="`请选择${item.label}`" />
v-model="listQuery[item.prop]" :collapse-tags="item.multiple" :dictEnum="item.options" width="100%"
clearable :placeholder="`请选择${item.label}`" />
<!-- 选择性别 -->
<MOSTY.Sex v-else-if="item.type == 'Sex'" v-model:sex="listQuery[item.prop]" width="100%" clearable
:placeholder="`请选择${item.label}`" />
@ -24,16 +24,18 @@
v-model="listQuery[item.prop]" clearable filterable />
<!-- 部门department -->
<MOSTY.Department style="width:100%" v-else-if="item.type === 'department'" clearable
:placeholder="listQuery.ssbm ? listQuery.ssbm : `请选择${item.label}`" v-model="listQuery[item.prop]" />
:placeholder="listQuery.ssbm ? listQuery.ssbm : `请选择${item.label}`"
@getDepValue="getdep($event, item.depMc)" v-model="listQuery[item.prop]" />
<!-- 时间选择 type: date/time/datetime/datetimerange/daterange-->
<MOSTY.Date v-else-if="item.type == 'date'" :type="item.lx ? item.lx : 'date'" width="100%" clearable
v-model="listQuery[item.prop]" />
<!-- 上传 upload limit:'限制张数'-->
<MOSTY.Upload v-else-if="item.type == 'upload'" :isAll="item.isAll" :key="item.prop" :showBtn="item.showBtn" :isImg="item.isImg" :limit="item.limit" width="100%"
v-model="listQuery[item.prop]" />
<MOSTY.Upload v-else-if="item.type == 'upload'" :isAll="item.isAll" :key="item.prop" :showBtn="item.showBtn"
:isImg="item.isImg" :limit="item.limit" width="100%" v-model="listQuery[item.prop]" />
<!--选择checkbox -->
<!-- <div v-else-if="item.type == 'checkbox'" >{{item.options }}</div> -->
<MOSTY.CheckBox v-else-if="item.type == 'checkbox'" width="100%" clearable v-model="listQuery[item.prop]"
:checkList="item.options" :placeholder="`请选择${item.label}`" />
:m="item.options" :placeholder="`请选择${item.label}`" />
<!-- 单选radio -->
<el-radio-group v-else-if="item.type == 'radio'" v-model="listQuery[item.prop]">
@ -69,8 +71,8 @@
style="width:100%" :min="child.min || 0" :max="child.max || 1000" />
<!--选择 select-->
<MOSTY.Select v-else-if="child.type == 'select'" @change="handleNum" filterable :multiple="child.multiple"
v-model="listQuery[child.prop]" :dictEnum="child.options" width="100%" clearable
:placeholder="`请选择${child.label}`" />
v-model="listQuery[child.prop]" :collapse-tags="child.multiple" :dictEnum="child.options" width="100%"
clearable :placeholder="`请选择${child.label}`" />
<!-- 部门department -->
<MOSTY.Department style="width:100%" v-else-if="child.type === 'department'" clearable
v-model="listQuery[child.prop]" />
@ -81,8 +83,10 @@
<MOSTY.Upload v-else-if="child.type == 'upload'" :isImg="child.isImg" :limit="child.limit" width="100%"
v-model="listQuery[child.prop]" />
<!--选择checkbox -->
<MOSTY.CheckBox v-else-if="child.type == 'checkbox'" width="100%" clearable v-model="listQuery[child.prop]"
:checkList="child.options" :placeholder="`请选择${child.label}`" />
:data="child.options" :placeholder="`请选择${child.label}`" />
<!-- 单选radio -->
<el-radio-group v-else-if="child.type == 'radio'" v-model="listQuery[child.prop]">
<el-radio v-for="obj in child.options" :key="obj.value" :label="obj.value">{{ obj.label }}</el-radio>
@ -136,7 +140,15 @@ const submit = (resfun) => {
resfun(listQuery.value);
});
};
const getdep = (e, val) => {
if (val) {
if (Array.isArray(e)) {
listQuery.value[val] = e ? e.map(item => item.orgName) : '';
} else {
listQuery.value[val] = e ? e.orgName : '';
}
}
}
const reset = () => {
listQuery.value = {};
elform.value.resetFields();