Преглед изворни кода

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

lxf пре 2 година
родитељ
комит
dbb6cfe8f1

+ 465 - 381
src/components/byForm/index.vue

@@ -1,425 +1,509 @@
 <template>
-  <div class="by-form">
-    <el-form
-      :model="formData"
-      :label-width="formOption.labelWidth"
-      :inline="formOption.inline || false"
-      :rules="rules"
-      :labelPosition="formOption.labelPosition || 'top'"
-      ref="byForm"
-      :disabled='formOption.disabled || false'
-    >
-      <el-form-item
-        :label="i.label"
-        v-for="i in formConfig"
-        :key="i.model"
-        :prop="i.prop"
-        v-show="i.isShow || i.isShow == undefined"
-        :style="
-          i.type == 'title'
-            ? 'width:100%'
-            : i.itemWidth
-            ? 'width:' + i.itemWidth + '%'
-            : formOption.itemWidth
-            ? 'width:' + formOption.itemWidth + '%'
-            : '100%'
-        "
-        :class="i.isHide ? 'dn' : ''"
-      >
-        <el-input
-          v-if="i.type == 'input'"
-          v-model="formData[i.prop]"
-          :placeholder="i.placeholder || '请输入'"
-          @input="(e) => commonsEmit(e, i)"
-          :type="i.itemType ? i.itemType : 'text'"
-          :disabled="i.disabled ? i.disabled : false"
-          :max="i.max"
-          :min="i.min"
-          :maxlength="i.maxlength"
-          :readonly="i.readonly ? i.readonly : false"
-        />
-        <el-input
-          v-if="i.type == 'selectInput'"
-          v-model="formData[i.prop]"
-          :placeholder="i.placeholder || '请输入'"
-          @input="(e) => commonsEmit(e, i)"
-          :type="i.itemType ? i.itemType : 'text'"
-          :disabled="i.disabled ? i.disabled : false"
-          :max="i.max"
-          :min="i.min"
-          :maxlength="i.maxlength"
-          :readonly="i.readonly ? i.readonly : false"
-        >
-          <template #prepend>
-            <el-select
-              v-model="formData[i.selectProp]"
-              :placeholder="i.selectPlaceholder || '请选择'"
-              @change="(e) => commonsEmit(e, i)"
-              :disabled="i.disabled ? i.disabled : false"
-              :readonly="i.readonly ? i.readonly : false"
-              style="width: 80px"
-            >
-              <el-option
-                :label="j.title || j.name || j.label"
-                :value="j.id || j.value"
-                v-for="j in i.data"
-                :key="j.id"
-              >
-              </el-option>
-            </el-select>
-          </template>
-        </el-input>
-        <el-select
-          v-model="formData[i.prop]"
-          :multiple="i.multiple || false"
-          v-else-if="i.type == 'select'"
-          :placeholder="i.placeholder || '请选择'"
-          @change="(e) => commonsEmit(e, i)"
-          :disabled="i.disabled ? i.disabled : false"
-          :filterable="i.filterable ? true : false"
-          :style="i.style"
-          :readonly="i.readonly ? i.readonly : false"
-        >
-          <el-option
-            :label="j.title || j.name || j.label"
-            :value="j.id || j.value"
-            v-for="j in i.data"
-            :key="j.id"
-          >
-          </el-option>
-        </el-select>
-        <el-tree-select
-          v-model="formData[i.prop]"
-          v-else-if="i.type == 'treeSelect'"
-          :data="i.data"
-          :readonly="i.readonly ? i.readonly : false"
-          :props="{
-            value: i.propsTreeValue || 'id',
-            label: i.propsTreeLabel || 'label',
-            children: i.propsTreeChildren || 'children',
-          }"
-          value-key="id"
-          :placeholder="i.placeholder || '请选择'"
-          check-strictly
-        />
-        <el-date-picker
-          v-model="formData[i.prop]"
-          :readonly="i.readonly ? i.readonly : false"
-          v-else-if="i.type == 'date'"
-          :type="i.itemType"
-          :placeholder="i.placeholder || '请选择时间'"
-          @change="commonsEmit"
-          :disabled="i.disabled ? i.disabled : false"
-          :format="i.format ? i.format : dateFormatInit(i.itemType)"
-          :value-format="i.format ? i.format : dateFormatInit(i.itemType)"
-        />
-        <el-switch
-          :disabled="i.disabled ? i.disabled : false"
-          v-else-if="i.type == 'switch'"
-          :readonly="i.readonly ? i.readonly : false"
-          v-model="formData[i.prop]"
-        />
-        <el-checkbox-group
-          v-else-if="i.type == 'checkbox'"
-          v-model="formData[i.prop]"
-          :readonly="i.readonly ? i.readonly : false"
-          :disabled="i.disabled ? i.disabled : false"
-        >
-          <el-checkbox
-            v-for="j in i.data"
-            :key="j.id || j.value"
-            :label="j.id || j.value"
-            name="type"
-          >
-            {{ j.name || j.label }}
-          </el-checkbox>
-        </el-checkbox-group>
-        <el-radio-group
-          v-else-if="i.type == 'radio'"
-          v-model="formData[i.prop]"
-          :readonly="i.readonly ? i.readonly : false"
-          :disabled="i.disabled ? i.disabled : false"
-        >
-          <el-radio
-            :border="i.border ? i.border : false"
-            v-for="j in i.data"
-            :key="j.id || j.value"
-            :label="j.id || j.value"
-            name="type"
-          >
-            {{ j.name || j.label }}
-          </el-radio>
-        </el-radio-group>
-        <el-input-number
-          v-else-if="i.type == 'number'"
-          v-model="formData[i.prop]"
-          :readonly="i.readonly ? i.readonly : false"
-          :placeholder="i.placeholder || '请输入'"
-          @input="commonsEmit"
-          :disabled="i.disabled ? i.disabled : false"
-          :min="i.min ? i.min : 0"
-          :max="i.max ? i.max : 100"
-          :step="i.step ? i.step : 1"
-          :precision="i.precision !== '' ? i.precision : 2"
-          :controls="i.controls === false ? false : true"
-          :style="i.style"
-        >
-        </el-input-number>
-        <el-tree
-          v-else-if="i.type == 'tree'"
-          :data="i.data"
-          :props="i.props"
-          :readonly="i.readonly ? i.readonly : false"
-          :show-checkbox="i.showCheckbox || true"
-        >
-        </el-tree>
-        <el-cascader
-          v-else-if="i.type == 'cascader'"
-          :options="i.data"
-          :props="i.props"
-          :readonly="i.readonly ? i.readonly : false"
-          :placeholder="i.placeholder || '请选择'"
-          @change="commonsEmit"
-          :disabled="i.disabled ? i.disabled : false"
-          :style="i.style"
-        >
-        </el-cascader>
-        <div class="form-title" v-else-if="i.type == 'title'">
-          {{ i.title }}
-        </div>
-        <slot :name="i.slotName" v-else-if="i.type == 'slot'">
-          {{ i.slotName }}插槽占位符
-        </slot>
-        <div v-else-if="i.type == 'json'" class="by-form-json">
-          <byForm
-            :formConfig="i.json"
-            :formOption="formOption"
-            v-model="formData[i.prop]"
-            ref="byform"
-            :rules="rules"
-          >
-          </byForm>
-        </div>
-      </el-form-item>
-    </el-form>
-  </div>
+	<div class="by-form">
+		<el-form
+			:model="formData"
+			:label-width="formOption.labelWidth"
+			:inline="formOption.inline || false"
+			:rules="rules"
+			:labelPosition="formOption.labelPosition || 'top'"
+			ref="byForm"
+			:disabled="formOption.disabled || false"
+		>
+			<el-form-item
+				:label="i.label"
+				v-for="i in formConfig"
+				:key="i.model"
+				:prop="i.prop"
+				v-show="i.isShow || i.isShow == undefined"
+				:style="
+					i.type == 'title'
+						? 'width:100%'
+						: i.itemWidth
+						? 'width:' + i.itemWidth + '%'
+						: formOption.itemWidth
+						? 'width:' + formOption.itemWidth + '%'
+						: '100%'
+				"
+				:class="i.isHide ? 'dn' : ''"
+			>
+				<el-input
+					v-if="i.type == 'input'"
+					v-model="formData[i.prop]"
+					:placeholder="i.placeholder || '请输入'"
+					@input="(e) => commonsEmit(e, i)"
+					:type="i.itemType ? i.itemType : 'text'"
+					:disabled="i.disabled ? i.disabled : false"
+					:max="i.max"
+					:min="i.min"
+					:maxlength="i.maxlength"
+					:readonly="i.readonly ? i.readonly : false"
+				/>
+				<el-input
+					v-if="i.type == 'selectInput'"
+					v-model="formData[i.prop]"
+					:placeholder="i.placeholder || '请输入'"
+					@input="(e) => commonsEmit(e, i)"
+					:type="i.itemType ? i.itemType : 'text'"
+					:disabled="i.disabled ? i.disabled : false"
+					:max="i.max"
+					:min="i.min"
+					:maxlength="i.maxlength"
+					:readonly="i.readonly ? i.readonly : false"
+				>
+					<template #prepend>
+						<el-select
+							v-model="formData[i.selectProp]"
+							:placeholder="i.selectPlaceholder || '请选择'"
+							@change="(e) => commonsEmit(e, i)"
+							:disabled="i.disabled ? i.disabled : false"
+							:readonly="i.readonly ? i.readonly : false"
+							style="width: 80px"
+						>
+							<el-option
+								:label="j.title || j.name || j.label"
+								:value="j.id || j.value"
+								v-for="j in i.data"
+								:key="j.id"
+							>
+							</el-option>
+						</el-select>
+					</template>
+				</el-input>
+				<el-select
+					v-model="formData[i.prop]"
+					:multiple="i.multiple || false"
+					v-else-if="i.type == 'select'"
+					:placeholder="i.placeholder || '请选择'"
+					@change="(e) => commonsEmit(e, i)"
+					:disabled="i.disabled ? i.disabled : false"
+					:filterable="i.filterable ? true : false"
+					:style="i.style"
+					:readonly="i.readonly ? i.readonly : false"
+				>
+					<el-option
+						:label="j.title || j.name || j.label"
+						:value="j.id || j.value"
+						v-for="j in i.data"
+						:key="j.id"
+					>
+					</el-option>
+				</el-select>
+				<el-tree-select
+					v-model="formData[i.prop]"
+					v-else-if="i.type == 'treeSelect'"
+					:data="i.data"
+					:readonly="i.readonly ? i.readonly : false"
+					:props="{
+						value: i.propsTreeValue || 'id',
+						label: i.propsTreeLabel || 'label',
+						children: i.propsTreeChildren || 'children',
+					}"
+					value-key="id"
+					:placeholder="i.placeholder || '请选择'"
+					check-strictly
+				/>
+				<el-date-picker
+					v-model="formData[i.prop]"
+					:readonly="i.readonly ? i.readonly : false"
+					v-else-if="i.type == 'date'"
+					:type="i.itemType"
+					:placeholder="i.placeholder || '请选择时间'"
+					@change="(e) => commonsEmit(e, i)"
+					:disabled="i.disabled ? i.disabled : false"
+					:format="i.format ? i.format : dateFormatInit(i.itemType)"
+					:value-format="
+						i.format ? i.format : dateFormatInit(i.itemType)
+					"
+				/>
+				<el-switch
+					:disabled="i.disabled ? i.disabled : false"
+					v-else-if="i.type == 'switch'"
+					:readonly="i.readonly ? i.readonly : false"
+					v-model="formData[i.prop]"
+				/>
+				<el-checkbox-group
+					v-else-if="i.type == 'checkbox'"
+					v-model="formData[i.prop]"
+					:readonly="i.readonly ? i.readonly : false"
+					:disabled="i.disabled ? i.disabled : false"
+				>
+					<el-checkbox
+						v-for="j in i.data"
+						:key="j.id || j.value"
+						:label="j.id || j.value"
+						name="type"
+					>
+						{{ j.name || j.label }}
+					</el-checkbox>
+				</el-checkbox-group>
+				<el-radio-group
+					v-else-if="i.type == 'radio'"
+					v-model="formData[i.prop]"
+					:readonly="i.readonly ? i.readonly : false"
+					:disabled="i.disabled ? i.disabled : false"
+				>
+					<el-radio
+						:border="i.border ? i.border : false"
+						v-for="j in i.data"
+						:key="j.id || j.value"
+						:label="j.id || j.value"
+						name="type"
+					>
+						{{ j.name || j.label }}
+					</el-radio>
+				</el-radio-group>
+				<el-input-number
+					v-else-if="i.type == 'number'"
+					v-model="formData[i.prop]"
+					:readonly="i.readonly ? i.readonly : false"
+					:placeholder="i.placeholder || '请输入'"
+					@change="(e) => commonsEmit(e, i)"
+					:disabled="i.disabled ? i.disabled : false"
+					:min="i.min ? i.min : 0"
+					:max="i.max ? i.max : 100"
+					:step="i.step ? i.step : 1"
+					:precision="i.precision !== '' ? i.precision : 2"
+					:controls="i.controls === false ? false : true"
+					:style="i.style"
+				>
+				</el-input-number>
+				<el-tree
+					v-else-if="i.type == 'tree'"
+					:data="i.data"
+					:props="i.props"
+					:readonly="i.readonly ? i.readonly : false"
+					:show-checkbox="i.showCheckbox || true"
+				>
+				</el-tree>
+				<el-cascader
+					v-else-if="i.type == 'cascader'"
+					:options="i.data"
+					:props="i.props"
+					:readonly="i.readonly ? i.readonly : false"
+					:placeholder="i.placeholder || '请选择'"
+					@change="(e) => commonsEmit(e, i)"
+					:disabled="i.disabled ? i.disabled : false"
+					:style="i.style"
+				>
+				</el-cascader>
+				<div class="form-title" v-else-if="i.type == 'title'">
+					{{ i.title }}
+				</div>
+				<slot :name="i.slotName" v-else-if="i.type == 'slot'">
+					{{ i.slotName }}插槽占位符
+				</slot>
+				<div class="upload" v-else-if="i.type == 'upload'" >
+					<el-upload
+						v-model="formData[i.prop]"
+						action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+						:data="uploadData"
+						list-type="picture-card"
+						:on-remove="handleRemove"
+						:on-success="handleSuccess"
+						:before-upload="handleBeforeUpload"
+						
+					>
+						<!-- <el-icon class="el-icon--upload"><upload-filled /></el-icon> -->
+						<el-icon><Plus /></el-icon>
+					</el-upload>
+				</div>
+				<div v-else-if="i.type == 'table'" class="by-form-table" style="width:100%">
+					<el-table :data="formData[i.prop]" style="width: 100%">
+						<el-table-column :prop="j.prop" :label="j.label" :width="i.width" v-for='(j,jindex) in i.column'>
+							<template #default="scope" v-if="j.type">
+								<component 
+										@change="(e) => formTableChange(e,scope,j)" 
+										v-model="scope.row[j.prop]" 
+										:is="formTableObj[j.type]"
+										:placeholder="j.placeholder || '请输入'"
+										:type="j.type == 'number' ? 'number' : 'text'"
+									>
+									<el-option
+										:label="n.title || n.name || n.label"
+										:value="n.id || n.value"
+										v-for="n in j.data"
+										:key="n.id"
+										v-if="j.type == 'select'"
+									>
+									</el-option>
+								</component>
+							</template>
+						</el-table-column>
+						
+					</el-table>
+				</div>
+				<div v-else-if="i.type == 'json'" class="by-form-json">
+					<byForm
+						:formConfig="i.json"
+						:formOption="formOption"
+						v-model="formData[i.prop]"
+						ref="byform"
+						:rules="rules"
+					>
+					</byForm>
+				</div>
+			</el-form-item>
+		</el-form>
+	</div>
 </template>
 <script>
 export default {
-  name: "byForm",
-};
+	name: 'byForm',
+}
 </script>
 <script  setup>
-import { set } from "@vueuse/shared";
-import { reactive } from "vue";
+import { set } from '@vueuse/shared'
+import { reactive } from 'vue'
 defineProps({
-  modelValue: {
-    type: Object,
-    default: false,
-  },
-  formConfig: {
-    type: Array,
-    default: false,
-  },
-  disabled: {
-    type: Boolean,
-    default: false,
-  },
-  formOption: {
-    type: Object,
-    default: false,
-  },
-  rules: {
-    type: Object,
-    default: false,
-  },
-});
+	modelValue: {
+		type: Object,
+		default: false,
+	},
+	formConfig: {
+		type: Array,
+		default: false,
+	},
+	disabled: {
+		type: Boolean,
+		default: false,
+	},
+	formOption: {
+		type: Object,
+		default: false,
+	},
+	rules: {
+		type: Object,
+		default: false,
+	},
+})
+const formTableChange = (e,scope,column) => {
+	if(column.fn) {
+		column.fn(e,scope)
+	}
+	console.log(formData)
+	console.log(e,scope)
+}
+const formTableObj = {
+	number:'el-input',
+	text:'el-input',
+	select:'el-select',
+	input:"el-input",
+
+}
+const fileList = ref([])
+const fileListCopy = ref([])
+const uploadData = ref({})
+//文件上传相关方法
+const handleSuccess = (res, file, files) => {
+	emit('update:modelValue', formData.value)
+}
+
+const handleRemove = (file) => {
+	const index = fileListCopy.value.findIndex(
+		(x) => x.uid === file.uid || x.id === file.id
+	)
+	fileListCopy.value.splice(index, 1)
+}
+
+const handleBeforeUpload = async (file) => {
+	const res = await proxy.post('/fileInfo/getSing', { fileName: file.name })
+	uploadData.value = res.uploadBody
+	fileListCopy.value.push({
+		id: res.id,
+		fileName: res.fileName,
+		path: res.fileUrl,
+		url: res.fileUrl,
+		uid: file.uid,
+	})
+}
 
-const isInit = ref(false);
-const { proxy } = getCurrentInstance();
-const emit = defineEmits(["update:modelValue"]);
+const isInit = ref(false)
+const { proxy } = getCurrentInstance()
+const emit = defineEmits(['update:modelValue'])
 const formData = computed(() => {
-  return proxy.modelValue;
-});
-const formDataReset = ref({ ...proxy.modelValue });
+	return proxy.modelValue
+})
+const formDataReset = ref({ ...proxy.modelValue })
 const commonsEmit = (prop, item) => {
-  if (item.fn) {
-    item.fn(prop);
-  }
-  emit("update:modelValue", formData.value);
-};
+	if (item.fn) {
+		item.fn(prop)
+	}
+	emit('update:modelValue', formData.value)
+}
 const loadInit = () => {
-  const v = this;
-  for (let i = 0; i < proxy.formConfig.length; i++) {
-    const element = proxy.formConfig[i];
-    if (element.isLoad) {
-      commonGetdata(element.isLoad, i);
-    }
-  }
-};
+	const v = this
+	for (let i = 0; i < proxy.formConfig.length; i++) {
+		const element = proxy.formConfig[i]
+		if (element.isLoad) {
+			commonGetdata(element.isLoad, i)
+		}
+	}
+}
 const dateFormatInit = (itemType) => {
-  const formatObj = {
-    year: "YYYY",
-    month: "YYYY-MM",
-    date: "YYYY-MM-DD hh:mm:ss",
-    dates: "YYYY-MM-DD",
-    datetime: "YYYY-MM-DD hh:mm:ss",
-    monthrange: "YYYY-MM-DD hh:mm:ss",
-    datetimerange: "YYYY-MM-DD hh:mm:ss",
-    daterange: "YYYY-MM-DD hh:mm:ss",
-  };
-  return formatObj[itemType];
-};
+	const formatObj = {
+		year: 'YYYY',
+		month: 'YYYY-MM',
+		date: 'YYYY-MM-DD hh:mm:ss',
+		dates: 'YYYY-MM-DD',
+		datetime: 'YYYY-MM-DD hh:mm:ss',
+		monthrange: 'YYYY-MM-DD hh:mm:ss',
+		datetimerange: 'YYYY-MM-DD hh:mm:ss',
+		daterange: 'YYYY-MM-DD hh:mm:ss',
+	}
+	return formatObj[itemType]
+}
 
 //公用递归,保证key,val统一
 const commonRecursive = (arr, labelKey, labelVal, childrenName) => {
-  for (let i = 0; i < arr.length; i++) {
-    if (labelKey == "stringArray") {
-      arr[i] = {
-        label: arr[i],
-        value: arr[i],
-        id: arr[i],
-        title: arr[i],
-      };
-    } else {
-      arr[i].title = arr[i].label = arr[i][labelKey];
-      arr[i].id = arr[i].value = arr[i][labelVal];
-    }
+	for (let i = 0; i < arr.length; i++) {
+		if (labelKey == 'stringArray') {
+			arr[i] = {
+				label: arr[i],
+				value: arr[i],
+				id: arr[i],
+				title: arr[i],
+			}
+		} else {
+			arr[i].title = arr[i].label = arr[i][labelKey]
+			arr[i].id = arr[i].value = arr[i][labelVal]
+		}
 
-    if (childrenName) {
-      arr[i].children = arr[i][childrenName];
-    }
-    arr[i].checked = false;
-    typeof arr[i][labelVal] == String
-      ? (arr[i].key = arr[i][labelVal])
-      : (arr[i].key = JSON.stringify(arr[i][labelVal]));
-    if (childrenName) {
-      this.commonRecursive(
-        arr[i][childrenName],
-        labelKey,
-        labelVal,
-        childrenName
-      );
-    }
-  }
-};
+		if (childrenName) {
+			arr[i].children = arr[i][childrenName]
+		}
+		arr[i].checked = false
+		typeof arr[i][labelVal] == String
+			? (arr[i].key = arr[i][labelVal])
+			: (arr[i].key = JSON.stringify(arr[i][labelVal]))
+		if (childrenName) {
+			this.commonRecursive(
+				arr[i][childrenName],
+				labelKey,
+				labelVal,
+				childrenName
+			)
+		}
+	}
+}
 
 //请求form表单所需数据字典
 const commonGetdata = (isLoad, i) => {
-  proxy[isLoad.method](isLoad.url, isLoad.req).then((message) => {
-    console.log(message);
-    if (getFormat(isLoad.resUrl, message) == undefined) {
-      console.log("请查看isLoad配置是否正确url:" + isLoad.url);
-      return;
-    }
-    proxy.formConfig[i].data = getFormat(isLoad.resUrl, message);
-    if (isLoad.labelKey) {
-      commonRecursive(
-        proxy.formConfig[i].data,
-        isLoad.labelKey,
-        isLoad.labelVal,
-        isLoad.childrenName
-      );
-    }
-    console.log(proxy.formConfig[i].data);
-  });
-};
+	proxy[isLoad.method](isLoad.url, isLoad.req).then((message) => {
+		console.log(message)
+		if (getFormat(isLoad.resUrl, message) == undefined) {
+			console.log('请查看isLoad配置是否正确url:' + isLoad.url)
+			return
+		}
+		proxy.formConfig[i].data = getFormat(isLoad.resUrl, message)
+		if (isLoad.labelKey) {
+			commonRecursive(
+				proxy.formConfig[i].data,
+				isLoad.labelKey,
+				isLoad.labelVal,
+				isLoad.childrenName
+			)
+		}
+		console.log(proxy.formConfig[i].data)
+	})
+}
 
 //根据resurl获取数据
 const getFormat = (formatStr, props) => {
-  if (!formatStr) return props;
-  return formatStr
-    .split(".")
-    .reduce((total, cur) => (!total ? "" : total[cur]), props);
-};
+	if (!formatStr) return props
+	return formatStr
+		.split('.')
+		.reduce((total, cur) => (!total ? '' : total[cur]), props)
+}
 
 //初始化所有表单
 
 const formDataInit = () => {
-  var map = {
-    input: "",
-    radio: null,
-    select: null,
-    checkbox: [],
-    date: "",
-    datetime: "",
-    daterange: [],
-    datetimerange: [],
-    year: null,
-    month: null,
-    switch: false,
-    inputNumber: 0,
-    cascader: [],
-    Solt: null,
-    Transfer: [],
-    Upload: { path: null, id: null, name: null },
-    password: "",
-    treeSelect: "",
-    json: {},
-  };
-  const formDataCopy = { ...formData.value };
-  for (let i = 0; i < proxy.formConfig.length; i++) {
-    const element = proxy.formConfig[i];
+	var map = {
+		input: '',
+		radio: null,
+		select: null,
+		checkbox: [],
+		date: '',
+		datetime: '',
+		daterange: [],
+		datetimerange: [],
+		year: null,
+		month: null,
+		switch: false,
+		inputNumber: 0,
+		cascader: [],
+		Solt: null,
+		Transfer: [],
+		Upload: { path: null, id: null, name: null },
+		password: '',
+		treeSelect: '',
+		json: {},
+	}
+	const formDataCopy = { ...formData.value }
+	for (let i = 0; i < proxy.formConfig.length; i++) {
+		const element = proxy.formConfig[i]
 
-    if (formDataCopy[element.prop] || element.type === "slot") {
-      continue;
-    }
+		if (formDataCopy[element.prop] || element.type === 'slot') {
+			continue
+		}
 
-    if (map[element.itemType] != undefined) {
-      formData.value[element.prop] = map[element.itemType];
-    } else {
-      formData.value[element.prop] = element.multiple ? [] : map[element.type];
-    }
-  }
+		if (map[element.itemType] != undefined) {
+			formData.value[element.prop] = map[element.itemType]
+		} else {
+			formData.value[element.prop] = element.multiple
+				? []
+				: map[element.type]
+		}
+	}
 
-  emit("update:modelValue", formData.value);
-};
+	emit('update:modelValue', formData.value)
+}
 
 const handleSubmit = async (onSubmit) => {
-  try {
-    const flag = await proxy.$refs["byForm"].validate();
-    if (flag) {
-      const form = { ...formData.value };
-      proxy.formConfig.map((item) => {
-        if (item.type == "json") {
-          form[item.prop] = JSON.stringify(form[item.prop]);
-        }
-      });
-      emit("update:modelValue", form);
-      onSubmit();
-      return true;
-    }
-  } catch (err) {
-    console.log("请检查表单!");
-    return false;
-  }
-};
-const byform = ref(null); // 延迟使用,因为还没有返回跟挂载
-onMounted(() => {});
+	try {
+		const flag = await proxy.$refs['byForm'].validate()
+		if (flag) {
+			const form = { ...formData.value }
+			proxy.formConfig.map((item) => {
+				if (item.type == 'json') {
+					form[item.prop] = JSON.stringify(form[item.prop])
+				}
+			})
+			emit('update:modelValue', form)
+			onSubmit()
+			return true
+		}
+	} catch (err) {
+		console.log('请检查表单!')
+		return false
+	}
+}
+const byform = ref(null) // 延迟使用,因为还没有返回跟挂载
+onMounted(() => {})
 defineExpose({
-  handleSubmit,
-});
-formDataInit();
-loadInit();
+	handleSubmit,
+})
+formDataInit()
+loadInit()
 </script>
 
 <style>
 .form-title {
-  font-size: 14px;
-  font-weight: bold;
-  margin-top: 22px;
-  color: #333333;
+	font-size: 14px;
+	font-weight: bold;
+	margin-top: 22px;
+	color: #333333;
 }
 .by-form .el-form--inline .el-form-item {
-  margin-right: 0px;
-  padding-right: 32px;
-  box-sizing: border-box;
+	margin-right: 0px;
+	padding-right: 32px;
+	box-sizing: border-box;
 }
 
 .dn {
-  display: none !important;
+	display: none !important;
 }
-.by-form-json .by-form .el-form .el-form-item{
-  margin-bottom: 18px;
+.by-form-json .by-form .el-form .el-form-item {
+	margin-bottom: 18px;
 }
 </style>

+ 448 - 410
src/components/byTable/demo.vue

@@ -1,437 +1,475 @@
 <template>
-  <div class="box-container">
-    <!-- <Banner /> -->
-    <div class="content">
-      <byTable
-        ref="singleTable"
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :height="tableHeight"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
-          //element talbe事件都能传
-          'row-click': handleRowClick,
-          'cell-contextmenu': handleRowClick.apply,
-          'select-all': select,
-        }"
-        :action-list="[
-          {
-            text: '新建合同',
-            plain: true,
-            type: 'warning',
-            action: () => openModal('add'),
-          },
-        ]"
-        @get-list="getList"
-      >
-        <template #slotName="{ item }">
-          {{ item.createTime }}
-        </template>
-      </byTable>
-    </div>
-    <el-dialog
-      :title="modalType == 'add' ? '新增' : '编辑'"
-      v-model="dialogVisible"
-      width="500"
-      :before-close="handleClose"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData"
-      >
-        <template #slot> 可自定义所需功能 </template>
-      </byForm>
-      <template #footer>
-        <span class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="dialogVisible = false"
-            >确 定</el-button
-          >
-        </span>
-      </template>
-    </el-dialog>
-  </div>
+	<div class="box-container">
+		<!-- <Banner /> -->
+		<div class="content">
+			<byTable
+				ref="singleTable"
+				:source="sourceList.data"
+				:pagination="sourceList.pagination"
+				:config="config"
+				:loading="loading"
+				:height="tableHeight"
+				highlight-current-row
+				:selectConfig="selectConfig"
+				:table-events="{
+					//element talbe事件都能传
+					'row-click': handleRowClick,
+					'cell-contextmenu': handleRowClick.apply,
+					'select-all': select,
+				}"
+				:action-list="[
+					{
+						text: '新建合同',
+						plain: true,
+						type: 'warning',
+						action: () => openModal('add'),
+					},
+				]"
+				@get-list="getList"
+			>
+				<template #slotName="{ item }">
+					{{ item.createTime }}
+				</template>
+			</byTable>
+		</div>
+		<el-dialog
+			:title="modalType == 'add' ? '新增' : '编辑'"
+			v-model="dialogVisible"
+			width="500"
+			:before-close="handleClose"
+		>
+			<byForm
+				:formConfig="formConfig"
+				:formOption="formOption"
+				v-model="formData"
+			>
+				<template #slot> 可自定义所需功能 </template>
+			</byForm>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="dialogVisible = false">取 消</el-button>
+					<el-button type="primary" @click="dialogVisible = false"
+						>确 定</el-button
+					>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
 </template>
   
 <script setup>
 /* eslint-disable vue/no-unused-components */
-import { ElMessage, ElMessageBox } from "element-plus";
-import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
-import { computed, defineComponent, ref } from "vue";
-const loading = ref(false);
-const fixedRight = ref("right");
-const align = ref("center");
-const tableHeight = ref(null);
-const border = ref(true);
+import { ElMessage, ElMessageBox } from 'element-plus'
+import byTable from '@/components/byTable/index'
+import byForm from '@/components/byForm/index'
+import { computed, defineComponent, ref } from 'vue'
+const loading = ref(false)
+const fixedRight = ref('right')
+const align = ref('center')
+const tableHeight = ref(null)
+const border = ref(true)
 const sourceList = ref({
-  data: [],
-  pagination: {
-    total: 3,
-    pageNum: 1,
-    pageSize: 10,
-  },
-});
-const singleTable = ref({});
-const dialogVisible = ref(false);
-const modalType = ref("add");
-const { proxy } = getCurrentInstance();
+	data: [],
+	pagination: {
+		total: 3,
+		pageNum: 1,
+		pageSize: 10,
+	},
+})
+const singleTable = ref({})
+const dialogVisible = ref(false)
+const modalType = ref('add')
+const { proxy } = getCurrentInstance()
 const selectConfig = computed(() => {
-  return [
-    {
-      label: "合同状态1",
-      prop: "tdaProductId",
+	return [
+		{
+			label: '合同状态1',
+			prop: 'tdaProductId',
 
-      data: [
-        {
-          label: "已关闭",
-          value: "123",
-        },
-      ],
-    },
-    {
-      label: "合同状态22",
-      prop: "tdaApplicationId",
-      data: [
-        {
-          label: "已关闭",
-          value: "123",
-        },
-      ],
-    },
-  ];
-});
+			data: [
+				{
+					label: '已关闭',
+					value: '123',
+				},
+			],
+		},
+		{
+			label: '合同状态22',
+			prop: 'tdaApplicationId',
+			data: [
+				{
+					label: '已关闭',
+					value: '123',
+				},
+			],
+		},
+	]
+})
 const config = computed(() => {
-  return [
-    {
-      type: "selection",
-      attrs: {
-        checkAtt: "isCheck",
-      },
-    },
-    {
-      attrs: {
-        label: "权限字符",
-        prop: "roleKey",
-      },
-    },
-    {
-      attrs: {
-        label: "显示顺序",
-        prop: "dataScope",
-        align: "center",
-        width: 200,
-      },
-      // 渲染字符串,默认不想展示 prop 的值,而是想对它做一些处理的时候,可以用这个方法
-      render(isForbid) {
-        return isForbid ? "禁用中" : "非禁用";
-      },
-    },
-    {
-      attrs: {
-        label: "状态",
-        align: align.value,
-        width: 100,
-        click: (items) => {
-          console.log(items);
-        },
-      },
-      // 渲染组件,返回值为一个数组, data 作为组件的 v-model,适用于需要展示复杂的数据的场景
-      renderComponent(row) {
-        return [
-          {
-            name: "el-switch",
-            data: row.menuCheckStrictly,
-            change: (e) => {
-              console.log(e, "change事件");
-            },
-            click: (e) => {
-              console.log(e, "click事件");
-            },
-          },
-        ];
-      },
-    },
-    {
-      attrs: {
-        label: "创建时间",
-        align: align.value,
-        width: 200,
-        prop: "createTime",
-        slot: "slotName",
-      },
-    },
-    {
-      attrs: {
-        label: "操作",
-        width: "400",
-        align: align.value,
-        // 设置当前列恢复点击事件冒泡
-        // isBubble: false,
-        fixed: fixedRight.value,
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-              bg: true,
-            },
-            el: "button",
-            click() {
-              ElMessage({
-                message: JSON.stringify(row),
-              });
-            },
-          },
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-              bg: true,
-            },
-            el: "button",
-            click() {
-              ElMessage({
-                message: `编号${row.id} router -> 已跳转到编辑页面!`,
-              });
-            },
-          },
-          // {
-          // 	attrs: {
-          // 		label: '发布',
-          // 		type: 'primary',
-          // 		text: true,
-          // 		bg: true,
-          // 	},
-          // 	el: 'button',
-          // 	click() {
-          // 		setPublish(row)
-          // 	},
-          // },
-          // !row.isForbid
-          // 	? {
-          // 			attrs: {
-          // 				label: '三元写法ture',
-          // 				type: 'primary',
-          // 				text: true,
-          // 				bg: true,
-          // 				disabled: false,
-          // 			},
-          // 			el: 'button',
-          // 			click() {
-          // 				setForbid(row)
-          // 			},
-          // 	  }
-          // 	: {
-          // 			attrs: {
-          // 				label: '三元写法false',
-          // 				text: true,
-          // 				bg: true,
-          // 				type: 'primary',
-          // 				disabled: false,
-          // 				style: {
-          // 					color: '#e6a23c',
-          // 				},
-          // 			},
-          // 			el: 'button',
-          // 			click() {
-          // 				setForbid(row)
-          // 			},
-          // 	  },
-        ];
-      },
-    },
-  ];
-});
+	return [
+		{
+			type: 'selection',
+			attrs: {
+				checkAtt: 'isCheck',
+			},
+		},
+		{
+			attrs: {
+				label: '权限字符',
+				prop: 'roleKey',
+			},
+		},
+		{
+			attrs: {
+				label: '显示顺序',
+				prop: 'dataScope',
+				align: 'center',
+				width: 200,
+			},
+			// 渲染字符串,默认不想展示 prop 的值,而是想对它做一些处理的时候,可以用这个方法
+			render(isForbid) {
+				return isForbid ? '禁用中' : '非禁用'
+			},
+		},
+		{
+			attrs: {
+				label: '状态',
+				align: align.value,
+				width: 100,
+				click: (items) => {
+					console.log(items)
+				},
+			},
+			// 渲染组件,返回值为一个数组, data 作为组件的 v-model,适用于需要展示复杂的数据的场景
+			renderComponent(row) {
+				return [
+					{
+						name: 'el-switch',
+						data: row.menuCheckStrictly,
+						change: (e) => {
+							console.log(e, 'change事件')
+						},
+						click: (e) => {
+							console.log(e, 'click事件')
+						},
+					},
+				]
+			},
+		},
+		{
+			attrs: {
+				label: '创建时间',
+				align: align.value,
+				width: 200,
+				prop: 'createTime',
+				slot: 'slotName',
+			},
+		},
+		{
+			attrs: {
+				label: '操作',
+				width: '400',
+				align: align.value,
+				// 设置当前列恢复点击事件冒泡
+				// isBubble: false,
+				fixed: fixedRight.value,
+			},
+			// 渲染 el-button,一般用在最后一列。
+			renderHTML(row) {
+				return [
+					{
+						attrs: {
+							label: '修改',
+							type: 'primary',
+							text: true,
+							bg: true,
+						},
+						el: 'button',
+						click() {
+							ElMessage({
+								message: JSON.stringify(row),
+							})
+						},
+					},
+					{
+						attrs: {
+							label: '删除',
+							type: 'danger',
+							text: true,
+							bg: true,
+						},
+						el: 'button',
+						click() {
+							ElMessage({
+								message: `编号${row.id} router -> 已跳转到编辑页面!`,
+							})
+						},
+					},
+					// {
+					// 	attrs: {
+					// 		label: '发布',
+					// 		type: 'primary',
+					// 		text: true,
+					// 		bg: true,
+					// 	},
+					// 	el: 'button',
+					// 	click() {
+					// 		setPublish(row)
+					// 	},
+					// },
+					// !row.isForbid
+					// 	? {
+					// 			attrs: {
+					// 				label: '三元写法ture',
+					// 				type: 'primary',
+					// 				text: true,
+					// 				bg: true,
+					// 				disabled: false,
+					// 			},
+					// 			el: 'button',
+					// 			click() {
+					// 				setForbid(row)
+					// 			},
+					// 	  }
+					// 	: {
+					// 			attrs: {
+					// 				label: '三元写法false',
+					// 				text: true,
+					// 				bg: true,
+					// 				type: 'primary',
+					// 				disabled: false,
+					// 				style: {
+					// 					color: '#e6a23c',
+					// 				},
+					// 			},
+					// 			el: 'button',
+					// 			click() {
+					// 				setForbid(row)
+					// 			},
+					// 	  },
+				]
+			},
+		},
+	]
+})
 
-const formData = reactive({});
+const formData = reactive({})
 const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
-  rules: [],
-});
+	inline: true,
+	labelWidth: 100,
+	itemWidth: 100,
+	rules: [],
+})
 const formConfig = computed(() => {
-  return [
-    {
-      type: "input",
-      prop: "name",
-      label: "label名称",
-      required: true,
-      itemWidth: 100,
-      //disabled:true,
-      itemType: "textarea",
-    },
-    {
-      type: "select",
-      prop: "xiala",
-      label: "下拉框",
-      multiple: true,
-      style: {
-        width: "300px",
-      },
-      isLoad: {
-        url: "/getRouters",
-        resUrl: "data",
-        //如果接口回来为stringArray,可以把labelkey和labelval都设置为stringArray
-        labelKey: "name",
-        labelVal: "path",
-      },
-      //所有组件的change事件监听
-      fn: (e) => {
-        console.log(e);
-      },
-    },
-    {
-      type: "date",
-      prop: "date",
-      label: "时间",
-      itemType: "date",
-    },
-    {
-      type: "radio",
-      prop: "radio",
-      label: "单选",
-    },
-    {
-      type: "slot",
-      slotName: "slot",
-      label: "插槽",
-    },
-    {
-      type: "selectInput",
-      label: "交易金额",
-      itemWidth: 60,
-      data:[],
-      placeholder: "请输入",
-      selectPlaceholder: "币种",
-      selectProp: "currency",
-      isLoad: {
-        url: "/supplierInfo/page",
-        req: {
-          pageNum: 1,
-          pageSize: 9999,
-        },
-        labelKey: "name",
-        labelVal: "id",
-        method: "post",
-        resUrl: "rows",
-      },
-    },
-    {
-      //使用此功能需要初始化prop数据至少是对象
-      type: "json",
-      prop: "standardJson",
-      json: [
-        {
-          type: "input",
-          prop: "englishName",
-          label: "英文名",
-        },
-        {
-          type: "input",
-          prop: "code",
-          label: "备注",
-        },
-        {
-          type: "input",
-          prop: "netWeight",
-          label: "净重",
-        },
-        {
-          type: "input",
-          prop: "customhouse",
-          label: "海关编码",
-        },
-      ],
-    },
-  ];
-});
+	return [
+		{
+			type: 'input',
+			prop: 'name',
+			label: 'label名称',
+			required: true,
+			itemWidth: 100,
+			//disabled:true,
+			itemType: 'textarea',
+		},
+		{
+			type: 'table',
+			prop: 'tableData',
+			column: [
+				{
+					label: '申购数量',
+					type: 'number',
+					prop: 'num',
+					fn: (e, scope) => {
+						console.log(e, scope)
+					},
+				},
+				{
+					label: '年龄',
+					type: 'input',
+					prop: 'age',
+				},
+				{
+					label: '人员',
+					type: 'select',
+					prop: 'renyuan',
+					data: [
+						{
+							label: '选择对象1',
+							value: 1,
+						},
+						{
+							label: '选择对象2',
+							value: 2,
+						},
+						{
+							label: '选择对象5',
+							value: 5,
+						},
+					],
+				},
+			],
+		},
+		{
+			type: 'select',
+			prop: 'xiala',
+			label: '下拉框',
+			multiple: true,
+			style: {
+				width: '300px',
+			},
+			isLoad: {
+				url: '/getRouters',
+				resUrl: 'data',
+				//如果接口回来为stringArray,可以把labelkey和labelval都设置为stringArray
+				labelKey: 'name',
+				labelVal: 'path',
+			},
+			//所有组件的change事件监听
+			fn: (e) => {
+				console.log(e)
+			},
+		},
+		{
+			type: 'date',
+			prop: 'date',
+			label: '时间',
+			itemType: 'date',
+		},
+		{
+			type: 'radio',
+			prop: 'radio',
+			label: '单选',
+		},
+		{
+			type: 'slot',
+			slotName: 'slot',
+			label: '插槽',
+		},
+		{
+			type: 'selectInput',
+			label: '交易金额',
+			itemWidth: 60,
+			data: [],
+			placeholder: '请输入',
+			selectPlaceholder: '币种',
+			selectProp: 'currency',
+			isLoad: {
+				url: '/supplierInfo/page',
+				req: {
+					pageNum: 1,
+					pageSize: 9999,
+				},
+				labelKey: 'name',
+				labelVal: 'id',
+				method: 'post',
+				resUrl: 'rows',
+			},
+		},
+		{
+			//使用此功能需要初始化prop数据至少是对象
+			type: 'json',
+			prop: 'standardJson',
+			json: [
+				{
+					type: 'input',
+					prop: 'englishName',
+					label: '英文名',
+				},
+				{
+					type: 'input',
+					prop: 'code',
+					label: '备注',
+				},
+				{
+					type: 'input',
+					prop: 'netWeight',
+					label: '净重',
+				},
+				{
+					type: 'input',
+					prop: 'customhouse',
+					label: '海关编码',
+				},
+			],
+		},
+	]
+})
 
 const sleep = (time = 1000) => {
-  return new Promise((resolve) => setTimeout(resolve, time));
-};
+	return new Promise((resolve) => setTimeout(resolve, time))
+}
 const getList = async (res) => {
-  console.log(sourceList.value);
-  console.log({ ...sourceList.value.pagination, ...res });
-  loading.value = true;
-  proxy.get("/system/role/list?pageNum=1&pageSize=10").then((message) => {
-    console.log(message);
-    sourceList.value.data = message.rows;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
-};
+	console.log(sourceList.value)
+	console.log({ ...sourceList.value.pagination, ...res })
+	loading.value = true
+	proxy.get('/system/role/list?pageNum=1&pageSize=10').then((message) => {
+		console.log(message)
+		sourceList.value.data = message.rows
+		setTimeout(() => {
+			loading.value = false
+		}, 200)
+	})
+}
 const openModal = () => {
-  dialogVisible.value = true;
-};
+	dialogVisible.value = true
+}
 const select = (row, column, cell) => {
-  ElMessage({
-    dangerouslyUseHTMLString: true, // Be careful :)
-    message: `点了全选`,
-  });
-};
+	ElMessage({
+		dangerouslyUseHTMLString: true, // Be careful :)
+		message: `点了全选`,
+	})
+}
 const handleRowClick = (row, column, cell) => {
-  ElMessage({
-    dangerouslyUseHTMLString: true, // Be careful :)
-    message: `row-click 事件,单击了<span style="color: red;"> 第${row.$index}行 </span>请看控制台 log`,
-  });
-  console.log("回调参数分别为: row, column, cell");
-  console.log(row, column, cell);
-};
+	ElMessage({
+		dangerouslyUseHTMLString: true, // Be careful :)
+		message: `row-click 事件,单击了<span style="color: red;"> 第${row.$index}行 </span>请看控制台 log`,
+	})
+	console.log('回调参数分别为: row, column, cell')
+	console.log(row, column, cell)
+}
 const setPublish = (row) => {
-  ElMessageBox.confirm(
-    `此操作会将${row.name}发布到线上, 是否继续?`,
-    `编号${row.id}提示`,
-    {
-      confirmButtonText: "确定",
-      cancelButtonText: "取消",
-      type: "warning",
-    }
-  )
-    .then(() => {
-      ElMessage({
-        type: "success",
-        message: "发布成功!",
-      });
-    })
-    .catch(() => {
-      ElMessage({
-        type: "info",
-        message: "已取消发布",
-      });
-    });
-};
+	ElMessageBox.confirm(
+		`此操作会将${row.name}发布到线上, 是否继续?`,
+		`编号${row.id}提示`,
+		{
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning',
+		}
+	)
+		.then(() => {
+			ElMessage({
+				type: 'success',
+				message: '发布成功!',
+			})
+		})
+		.catch(() => {
+			ElMessage({
+				type: 'info',
+				message: '已取消发布',
+			})
+		})
+}
 const setForbid = async (row) => {
-  loading.value = true;
-  await sleep();
-  loading.value = false;
-  row.isForbid = !row.isForbid;
-};
+	loading.value = true
+	await sleep()
+	loading.value = false
+	row.isForbid = !row.isForbid
+}
 const copyLink = (row) => {
-  ElMessage({
-    type: "success",
-    message: "指令测试-复制成功,可以粘贴啦!",
-  });
-};
-getList();
+	ElMessage({
+		type: 'success',
+		message: '指令测试-复制成功,可以粘贴啦!',
+	})
+}
+getList()
 </script>
   
   <style lang="scss" scoped>
 .box-container {
-  .content {
-    position: relative;
-    margin: 0 auto;
-  }
+	.content {
+		position: relative;
+		margin: 0 auto;
+	}
 }
 </style>

+ 4 - 4
src/components/byTable/index.vue

@@ -23,7 +23,7 @@
       <div style="display: flex">
         <div
           class="by-dropdown"
-          v-for="i in selectConfigCopy"
+          v-for="(i,index) in selectConfigCopy"
           :key="i.prop"
           style="margin-right: 10px"
         >
@@ -36,7 +36,7 @@
           </div>
           <ul class="by-dropdown-lists">
             <li
-              @click="searchItemSelct('all', i)"
+              @click="searchItemSelct('all', i,index)"
               v-if="i.isShowAll === false ? i.isShowAll : true"
             >
               全部
@@ -383,9 +383,9 @@ export default defineComponent({
     };
     //下拉搜索相关
 
-    const searchItemSelct = (item, i) => {
+    const searchItemSelct = (item, i,index) => {
       if (item == "all") {
-        i.label = "全部";
+        i.label = props.selectConfig[index].labelCopy
         proxy.$emit(
           "getList",
           Object.assign(props.filterParams, { [i.prop]: "" })

+ 7 - 1
src/views/finance/fundManage/accountPayment/index.vue

@@ -349,6 +349,11 @@ const formConfig = computed(() => {
 			label: '摘要',
 		},
 		{
+			type: 'upload',
+			prop: 'upload',
+			label: '摘要',
+		},
+		{
 			type: 'slot',
 			slotName: 'productPic',
 			prop: 'fileList',
@@ -437,7 +442,8 @@ const select = (_selection, row) => {
 }
 
 const submitForm = () => {
-	console.log(byform.value)
+	console.log(fileList)
+
 	byform.value.handleSubmit((valid) => {
 		
 		submitLoading.value = true

+ 25 - 1
src/views/finance/fundManage/fundsStatement/index.vue

@@ -52,7 +52,11 @@
 				label="币种"
 				width="150"
 				fixed
-			/>
+			>
+				<template #default="{ row }">
+					{{dictDataEcho(row.currencyType, dictsData.account_currency)}}
+				</template>
+			</el-table-column>
 			<el-table-column
 				:label="index + '日'"
 				v-for="index of dayNum"
@@ -112,6 +116,13 @@ let req = ref({
 	dateBetween: formatDate(new Date(), 'yyyy-MM'),
 	managementId:null,
 })
+let dictsData = {}
+proxy
+	.getDict(['payment_status', 'payment_type','account_currency'])
+	.then((res) => {
+		dictsData = res
+		console.log(res)
+	})
 
 const getList = async () => {
 	console.log(req.value,123123123)
@@ -215,5 +226,18 @@ getAccountManagement()
 		left: 0;
 		top: 0;
 	}
+	//修改tabletr边框颜色
+	.is-group {
+		tr {
+			.el-table_1_column_1{
+				background: #EEEEEE!important;
+				
+			}
+			th{
+				border-color: #fff!important;
+			}
+		}
+	}
 }
+
 </style>

+ 1 - 1
src/views/process/processConfig/processChart.vue

@@ -21,7 +21,7 @@
 </template>
 
 <script setup>
-import { VueFlow } from '@vue-flow/core'
+
 import vueFlow from '@/views/process/processConfig/vueFlow.vue'
 const title = ref('')
 onMounted(() => {

+ 6 - 2
src/views/process/processConfig/vueFlow.vue

@@ -6,7 +6,7 @@
 	</div>
 	<el-button @click="submitAll" type="primary">保存</el-button>
 	<el-dialog
-		:title="modalType == 'add' ? '新增' : '编辑'"
+		title="节点信息配置"
 		v-model="dialogVisible"
 		width="500"
 		v-loading="loading"
@@ -236,7 +236,10 @@ const submitForm = () => {
 	byform.value.handleSubmit((valid) => {
 		flowDefinitionNodeObj.value[formData.data.id] = formData.data
 		console.log(flowDefinitionNodeObj.value)
+		dialogVisible.value = false
 	})
+	
+
 }
 
 const submitFormData = {
@@ -266,7 +269,7 @@ const submitAll = () => {
 			console.log(element)
 			if(!flowDefinitionNodeObj.value[element.id]) {
 				ElMessage({
-					message: '有节点未配置,请检查节点123123123',
+					message: '有节点未配置,请检查节点',
 					type: 'warning',
 				})
 				return
@@ -596,6 +599,7 @@ const antvInit = () => {
 			formData.data = {
 				id: cell.id,
 				cell: cell,
+				nodeButtonSet:[1],
 			}
 		}
 

+ 7 - 3
src/views/system/role2/index.vue

@@ -282,7 +282,9 @@ const treeChange = ((e) => {
 const openModal = () => {
 	dialogVisible.value = true
 	modalType.value = 'add'
-	formData.data = {}
+	formData.data = {
+		tableData:[{num:111,age:222,renyuan:2},{num:111,age:222,renyuan:1}]
+	}
 }
 const TreetenantId = ref('')
 const selection = ref({
@@ -319,7 +321,8 @@ const submitTree = () => {
 
 
 const submitForm = () => {
-	
+	console.log(formData.data)
+	return
 	byform.value.handleSubmit((valid) => {
 		const method = modalType.value == 'add' ? 'POST' : 'PUT'
 		console.log(method)
@@ -343,7 +346,8 @@ const submitForm = () => {
 
 const getDtl = (row) => {
 	formData.data = {...row}
-	
+	delete formData.data.menuIds
+	console.log(formData.data)
 	modalType.value = 'edit'
 	console.log(modalType.value)
 	dialogVisible.value = true