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

@ -18,6 +18,7 @@ import MarkdownEdit from "./MarkdownEdit/index.vue";
import FileUpload from "./FileUpload/index.vue";
import Date from "./Date/index.vue";
import Empty from "./Empty/index.vue";
import CheckBox from "@/components/checkBox/index.vue";
export {
AddressSelect,
FrameWork,
@ -38,5 +39,6 @@ export {
MarkdownEdit,
FileUpload,
Date,
Empty
Empty,
CheckBox
};

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();

View File

@ -1,20 +1,20 @@
<template>
<div style="width: 100%" :class="getConfiger.showSelectType === 'radio' ? 'tabBoxRadio' : ''">
<!-- hasChildren要在tableData中定义表示当前行有没有下一级 children要在tableData中定义表示下一级的数据-->
<el-table
ref="multipleTableRef"
:data="tableData"
<el-table
ref="multipleTableRef"
:data="tableData"
@selection-change="handleSelectionChange"
:row-key="getConfiger.rowKey"
:border="getConfiger.border"
:row-key="getConfiger.rowKey"
:border="getConfiger.border"
:default-expand-all="getConfiger.defaultExpandAll"
:stripe="getConfiger.stripe"
:height="tableHeight"
v-loading="tableConfiger.loading"
:stripe="getConfiger.stripe"
:height="tableHeight"
v-loading="tableConfiger.loading"
:lazy="getConfiger.lazy"
:load="load"
:tree-props="treePros"
style="width: 100%"
:load="load"
:tree-props="treePros"
style="width: 100%"
:header-cell-class-name="() => 'HeadBgColor'"
:highlight-current-row="getConfiger.showSelectType === 'radio'"
:row-style="{ height: getConfiger.rowHeight === 'auto' ? getConfiger.rowHeight : getConfiger.rowHeight + 'px' }">
@ -83,6 +83,8 @@ const props = defineProps({
// 可选的时候选择的数据
const emit = defineEmits(["chooseData"]);
const multipleTableRef = ref();
console.log(props.tableConfiger);
const currentRow = ref();
let getConfiger = reactive({
showSelectType: null, // 显示多选还是单选还是没有选择 checkBox/radio/null

View File

@ -1,8 +1,9 @@
<template>
<div class="checkBox">
{{ data }}
<el-checkbox class="checkall" v-if="showAll" v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAll">全部</el-checkbox>
<el-checkbox-group v-model="hasChecked" @change="handleCheckedChange">
<el-checkbox v-for="(item,idx) in checkedList" :key="idx" :label="item">{{item}}</el-checkbox>
<el-checkbox v-for="(item,idx) in checkedList" :key="idx" :label="item">{{item.zdmc}}</el-checkbox>
</el-checkbox-group>
</div>
</template>
@ -20,6 +21,10 @@ const props = defineProps({
}, showAll: {
type: Boolean,
default: true
},
m: {
type: Array,
default:()=>[]
}
});
const checkAll = ref(false);