| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <!-- 搜索表单 -->
- <template>
- <el-form label-width="100px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
- <el-row :gutter="24">
- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
- <el-form-item label="计划单号:">
- <el-input clearable v-model="where.planCode" placeholder="请输入" />
- </el-form-item>
- </el-col>
- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
- <el-form-item label="计划名称:">
- <el-input clearable v-model="where.planName" placeholder="请输入" />
- </el-form-item>
- </el-col>
- <el-col class="ele-form-actions" v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
- <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search" size="small">
- 查询
- </el-button>
- <el-button @click="reset" icon="el-icon-refresh-left" size="small" type="primary">重置</el-button>
- </el-col>
- </el-row>
- </el-form>
- </template>
- <script>
- export default {
- components: {},
- data() {
- // 默认表单数据
- const defaultWhere = {
- planName: '',
- planCode: '',
- };
- return {
- // 表单数据
- where: { ...defaultWhere },
- };
- },
- computed: {
- // 是否开启响应式布局
- styleResponsive() {
- return this.$store.state.theme.styleResponsive;
- }
- },
- created() { },
- methods: {
- /* 搜索 */
- search() {
- this.$emit('search');
- },
- /* 重置 */
- reset() {
- this.where = { ...this.defaultWhere };
- this.search();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .ele-form-actions {
- // display: flex;
- // align-items: center;
- // justify-content: flex-end;
- }
- ::v-deep {
- .el-range-editor--medium.el-input__inner {
- width: 100%;
- }
- }
- </style>
|