ZaiZai 1 年之前
父節點
當前提交
8a981d5d37

+ 5 - 2
src/components/table-form/modules/components.vue

@@ -1,10 +1,10 @@
 <template>
     <div
-        :id="id" class="hc-table-form-components-box" :data-key="keyname" :data-index="`${trindex}_${tdindex}`"
+        :id="id" class="hc-table-form-components-box" :data-key="keyname" :data-index="`${trindex || ''}_${tdindex || ''}`"
         :data-x1="x1" :data-x2="x2" :data-y1="y1" :data-y2="y2" :data-tr="trindex" :data-td="tdindex" :data-name="name"
         :data-text="placeholder" :data-type="type" :data-rows="rows" :data-format="valueFormat" :data-weighing="weighing"
         :data-label="label" :data-value="value" :data-src="src" :data-val="val" :data-contractid="contractid" :data-pkeyid="pkeyid"
-        :data-objs="objsData"
+        :data-objs="objsData" :data-multiple="multiple"
     >
         {{ name || placeholder }}
         <div v-if="isSlots" class="slot-content">
@@ -39,6 +39,7 @@ const props = defineProps({
     contractid: [String, Number],
     pkeyid: [String, Number],
     objs: Array,
+    multiple: [Boolean],
 })
 
 const objsData = ref('')
@@ -56,6 +57,7 @@ const name = ref('')
 const typeObj = {
     text: '输入框',
     select: '下拉框',
+    select_option: '下拉框选项',
     textarea: '多行输入框',
     checkbox_group: '多选框组',
     form_checkbox: '多选框组合',
@@ -64,6 +66,7 @@ const typeObj = {
     radio: '单选框',
     date: '日期框',
     time: '时间框',
+    datetime: '日期时间框',
     datetimerange: '日期时间范围框',
     dap_site_data: '远程搜索框',
     strength_search: '设计强度搜索框',

+ 3 - 1
src/components/table-form/modules/el-checkbox-group.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="checkbox_group" />
+    <HcTableFormComponents v-bind="$attrs" type="checkbox_group">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/el-checkbox.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="checkbox" />
+    <HcTableFormComponents v-bind="$attrs" type="checkbox">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/el-option.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="select_option" />
+    <HcTableFormComponents v-bind="$attrs" type="select_option">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/el-radio-group.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="radio_group" />
+    <HcTableFormComponents v-bind="$attrs" type="radio_group">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/el-radio.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="radio" />
+    <HcTableFormComponents v-bind="$attrs" type="radio">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/el-select.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="select" />
+    <HcTableFormComponents v-bind="$attrs" type="select">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/form-checkbox.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="form_checkbox" />
+    <HcTableFormComponents v-bind="$attrs" type="form_checkbox">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/form-echart.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="echart" />
+    <HcTableFormComponents v-bind="$attrs" type="echart">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 3 - 1
src/components/table-form/modules/form-upload.vue

@@ -1,5 +1,7 @@
 <template>
-    <HcTableFormComponents v-bind="$attrs" type="upload" />
+    <HcTableFormComponents v-bind="$attrs" type="upload">
+        <slot />
+    </HcTableFormComponents>
 </template>
 
 <script>

+ 19 - 0
src/views/project/list/set-input.vue

@@ -163,6 +163,25 @@ const dialogSubmit = async () => {
 }
 
 //设置dom数据
+const typeObj = {
+    text: 'input',
+    select: 'select',
+    select_option: '下拉框选项',
+    textarea: 'textarea',
+    checkbox_group: '多选框组',
+    form_checkbox: '多选框组合',
+    checkbox: '多选框',
+    radio_group: '单选框组',
+    radio: '单选框',
+    date: '日期框',
+    time: '时间框',
+    datetime: '日期时间框',
+    datetimerange: '日期时间范围框',
+    dap_site_data: '远程搜索框',
+    strength_search: '设计强度搜索框',
+    upload: '图片展示以及上传框',
+    echart: '图表组件',
+}
 const setDomData = (item) => {
     //formModel.value.name = key
     console.log(item)