123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <base-form slot="content" ref="ruleForm" :data="searchData">
- <div slot="footer">
- <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
- <el-button :loading="listLoading" icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
- </div>
- </base-form>
- </template>
- <script>
- export default {
- props: {
- listLoading: Boolean
- },
- inject: ['parentData'],
- mixins,
- data() {
- return {
- searchData: []
- }
- },
- mounted () {
- this.getDef()
- },
- methods: {
- addHandle () {
- this.parentData.isDtlShow = true
- this.parentData.curObj = {}
- },
- getDef (str) {
- this.searchData = [
- { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
- { label: '门店名称', key: 'store_name' },
- { label: '店长', key: 'store_manager' },
- { label: '店长电话', key: 'manager_phone' },
- ]
- this.setDefaultValue(params, 'searchData')
- },
- searchHandle() {
- const oldform = this.$refs.ruleForm.baseForm
- const newForm = { ...oldform }
- this.$emit('change', newForm)
- }
- }
- }
- </script>
|