| | |
| | | <template> |
| | | <div> |
| | | <div class="App" v-loading="this.loading"> |
| | | <div style="display: flex; justify-content: flex-end;margin-bottom: 10px"> |
| | | <el-button icon="el-icon-more" plain size="small" type="primary" @click="MoreHandler">更多</el-button> |
| | | </div> |
| | | <avue-data-box :animation="true" :option="option"></avue-data-box> |
| | | <!-- <avue-data-panel :animation="true":option="option"></avue-data-panel>--> |
| | | <avue-data-box ref="dataBox" :animation="true" :option="option" ></avue-data-box> |
| | | <el-dialog :visible.sync="dialogTableVisible" append-to-body class="avue-dialog avue-dialog--top" title="主数据配置" |
| | | top="0"> |
| | | <avue-crud ref="crud" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getList, save} from "@/api/system/statistic"; |
| | | import {flowRoute} from "@/util/flow"; |
| | | |
| | | export default { |
| | | name: "Statistic", |
| | | data() { |
| | | return { |
| | | loading:true, |
| | | Crud: { |
| | | form: '', |
| | | data: [], |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.MasterGetList() |
| | | this.MasterGetList(); |
| | | }, |
| | | mounted() { |
| | | this.FontInfo() |
| | | }, |
| | | computed() { |
| | | |
| | | }, |
| | | methods: { |
| | | FontInfo(){ |
| | | this.$nextTick(() => { |
| | | const dataFatherBox = this.$refs.dataBox.$el; |
| | | console.log(dataFatherBox); |
| | | this.$nextTick(() => { |
| | | setTimeout(() => { |
| | | //字体 |
| | | const info = dataFatherBox.querySelectorAll('.item-info .info'); |
| | | //边框 |
| | | const items = dataFatherBox.querySelectorAll('.item'); |
| | | // console.log('info', info); |
| | | info.forEach((info) => { |
| | | info.style.fontSize = '16px'; |
| | | }); |
| | | items.forEach((item) => { |
| | | item.style.border = '1px solid rgb(200, 200, 200, 1)'; |
| | | }); |
| | | this.loading=false; |
| | | }, 1000); // 延迟1秒查找info元素 |
| | | }); |
| | | }); |
| | | }, |
| | | selectionChange(row) { |
| | | // console.log(row) |
| | | this.SelectRow = row; |
| | |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.$message.success('保存成功!') |
| | | //清除已有数组中push数据 |
| | | this.option.data = []; |
| | | this.newData=[]; |
| | | |
| | | this.MasterGetList() |
| | | this.dialogTableVisible = false; |
| | | //字体和边框重新加载 |
| | | this.loading=true; |
| | | this.FontInfo() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | isDefault: item.isDefault, |
| | | color: this.hexColor, |
| | | uiUrl: item.menuRoute, |
| | | id: 'custom-title' |
| | | }); |
| | | } else if (item.isDefault === 0) { |
| | | this.newData.push(item); |