| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <template>
- <div>
- <el-container>
- <el-container>
- <el-main id="dxdcListMain" style="padding:5px 20px;">
- <el-tabs v-model="currentViewId" type="card">
- <el-col :span="4" ref="elw">
- <el-card :body-style="{'padding':'0'}">
- <export-tree-list-with-check-box-xry
- :pid="pid"
- :type="type"
- :pidNodes="pidNodes"
- :height="dxdcAsideHeight"
- :width="treeWidth"
- @treeCheckedDataChange="treeCheckedDataChange"
- @changeYear="changeYear"
- ></export-tree-list-with-check-box-xry>
- </el-card>
- </el-col>
- <el-tab-pane
- :label="option.label"
- :name="option.label"
- v-for="option in options"
- :key="option.value"
- >
- <!-- <component v-if="currentViewId == option.label" :is="option.value"></component> -->
- <el-col :span="20">
- <component v-if="showTable" :is="option.value" :ids="ids" type="001"
- :newYear="newYear"></component>
- </el-col>
- </el-tab-pane>
- </el-tabs>
- </el-main>
- </el-container>
- </el-container>
- <!-- 添加/编辑人员弹窗 -->
- </div>
- </template>
- <script>
- import report_xxsk_fj from "./report_xxsk_fj.vue";
- import report_xxskhtk_fj from "./report_xxskhtk_fj.vue";
- import exportTreeListWithCheckBoxXry from "./exportTreeListWithCheckBox_xry";
- export default {
- components: {
- report_xxsk_fj,
- report_xxskhtk_fj,
- exportTreeListWithCheckBoxXry: exportTreeListWithCheckBoxXry,
- },
- props: [],
- data() {
- return {
- options: [
- {
- value: "report_xxsk_fj",
- label: "小型水库统计报表"
- },
- {
- value: "report_xxskhtk_fj",
- label: "小型水库回头看统计报表"
- }
- ],
- value: "",
- currentViewId: "小型水库统计报表",
- showTable: true,
- currentNodeType: "",
- ids: [],
- pid: "000",
- pidNodes: [],
- type: "001",
- dxdcMainHeight: window.innerHeight - 180,
- dxdcAsideHeight: window.innerHeight - 180,
- windowHeight: window.innerHeight - 200,
- windowWidth: window.innerWidth - 350,
- treeWidth: 250,
- newYear: ""
- };
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- }
- },
- mounted() {
- this.treeWidth = this.$refs.elw.$el.clientWidth;
- },
- watch: {},
- methods: {
- //树节点选中或取消事件
- treeCheckedDataChange(params) {
- // 如果是选中状态,把元素id加入到ids里
- if (params.newStatus) {
- params.newCheckedArray.forEach((element, index) => {
- let id = element.id;
- if (id != null && id !== undefined && id !== "") {
- this.ids.push(id);
- }
- });
- } else {
- // 删除取消的元素id
- params.changedItem.forEach((element, index) => {
- let id = element.id;
- let inx = this.ids.indexOf(id);
- if (inx > -1) {
- delete this.ids[inx];
- }
- });
- }
- // 去重
- this.ids = Array.from(new Set(this.ids));
- console.log("ids:" + this.ids);
- },
- changeYear(val) {
- this.newYear = val;
- this.ids = [];
- },
- }
- };
- </script>
- <style>
- </style>
|