| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <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'}">
- <exportTreeListWithCheckBoxZjqjg
- :pid="pid"
- :type="type"
- :pidNodes="pidNodes"
- :height="dxdcAsideHeight"
- :width="treeWidth"
- @treeCheckedDataChange="treeCheckedDataChange"
- ></exportTreeListWithCheckBoxZjqjg>
- </el-card>
- </el-col>
- <el-tab-pane
- :label="option.label"
- :name="option.label"
- v-for="option in options"
- :key="option.value">
- <el-col :span="20">
- <component v-if="showTable" :is="option.value" :ids="ids" type="042"
- :newYear="newYear"></component>
- </el-col>
- </el-tab-pane>
- </el-tabs>
- </el-main>
- </el-container>
- </el-container>
- <!-- 添加/编辑人员弹窗 -->
- </div>
- </template>
- <script>
- import report_zjry1 from "./report_zjry1.vue";
- import report_zjry2 from "./report_zjry2.vue";
- import report_zjry3 from "./report_zjry3.vue";
- import exportTreeListWithCheckBoxZjqjg from "./exportTreeListWithCheckBox_zjqjg";
- export default {
- components: {
- report_zjry1: report_zjry1,
- report_zjry2: report_zjry2,
- report_zjry3: report_zjry3,
- exportTreeListWithCheckBoxZjqjg: exportTreeListWithCheckBoxZjqjg,
- },
- props: [],
- data() {
- return {
- options: [
- {
- value: "report_zjry1",
- label: "农村饮用水达标提标行动明查暗访反馈表"
- },
- {
- value: "report_zjry2",
- label: "问题明细统计表"
- },
- {
- value: "report_zjry3",
- label: "问题数目统计表"
- }
- ],
- value: "",
- currentViewId: "农村饮用水达标提标行动明查暗访反馈表",
- showTable: true,
- currentNodeType: "",
- ids: [],
- pid: "000",
- pidNodes: [],
- type: "041",
- 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);
- },
- }
- };
- </script>
- <style>
- </style>
|