|
@@ -2,8 +2,8 @@
|
|
|
* @Author : yuanrunwei
|
|
|
* @Date : 2021-11-01 18:03:02
|
|
|
* @LastEditors : yuanrunwei
|
|
|
- * @LastEditTime : 2021-11-02 18:10:37
|
|
|
- * @FilePath : \spfm-front\src\pages\main\dataConfig\components\form.vue
|
|
|
+ * @LastEditTime : 2021-12-03 18:44:44
|
|
|
+ * @FilePath : \spfm-market-front\src\pages\main\performance\components\form.vue
|
|
|
-->
|
|
|
<template>
|
|
|
<el-form :inline="true" :model="object">
|
|
@@ -12,7 +12,8 @@
|
|
|
v-for="({ props, label, type, dictionary }, index) in form"
|
|
|
:key="index"
|
|
|
:span="6"
|
|
|
- ><el-form-item :label="label">
|
|
|
+ >
|
|
|
+ <el-form-item :label="label">
|
|
|
<template v-if="type === 'select'">
|
|
|
<el-select
|
|
|
v-model="object[props]"
|
|
@@ -25,9 +26,18 @@
|
|
|
:value="value"
|
|
|
v-for="({ label, value }, index) in dictionary"
|
|
|
:key="index"
|
|
|
- ></el-option> </el-select
|
|
|
- ></template> </el-form-item
|
|
|
- ></el-col>
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-input
|
|
|
+ v-model="object[props]"
|
|
|
+ :placeholder="label"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="handleSearch"
|
|
@@ -54,15 +64,15 @@ export default {
|
|
|
props: {
|
|
|
form: {
|
|
|
type: Array,
|
|
|
- default: () => []
|
|
|
+ default: () => [],
|
|
|
},
|
|
|
handle: {
|
|
|
type: Array,
|
|
|
- default: () => []
|
|
|
- }
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
},
|
|
|
data: () => ({
|
|
|
- object: {}
|
|
|
+ object: {},
|
|
|
}),
|
|
|
methods: {
|
|
|
handleSearch() {
|
|
@@ -70,7 +80,7 @@ export default {
|
|
|
},
|
|
|
handleSubmit(params) {
|
|
|
this.$emit(params, this.object);
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|