| | |
| | | `${$t('dataManage.templateManage')}`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="searchComp subpage_Div"> |
| | | <div class="searchComp subpage_Div" ref="container"> |
| | | <el-form |
| | | ref="ruleForm" |
| | | :model="ruleForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item> |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item label="名称"> |
| | | <el-input |
| | | style="width:200px" |
| | | v-model="ruleForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | icon="el-icon-refresh" |
| | | @click="restRefreshTable" |
| | |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-form-item> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | @click="setRefreshTable" |
| | |
| | | size="small" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | icon="el-icon-delete" |
| | |
| | | size="small" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item style="float:right"> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | @click="setTableInsert" |
| | |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <div class="table_box" :style="styleVar"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 57px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="margin-top:10px"> |
| | | <div style="margin-top:25px"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | "height": "calc(100% - 109px)", |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.showTableData(); |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight() |
| | | }, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | }); |
| | | }, |
| | | //修改取消 |
| | | closeEditData() { |
| | | this.closeInsertData(); |
| | |
| | | } |
| | | |
| | | .searchComp { |
| | | margin: 10px auto; |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | |
| | | margin-bottom: 20px; |
| | | |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |