From 5771eee59795899b8adc1fe5cc51cb47bf8c7f0b Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期五, 26 一月 2024 18:00:23 +0800 Subject: [PATCH] su --- src/views/team/reportresults/index.vue | 354 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 195 insertions(+), 159 deletions(-) diff --git a/src/views/team/reportresults/index.vue b/src/views/team/reportresults/index.vue index 013d714..cb4b7af 100644 --- a/src/views/team/reportresults/index.vue +++ b/src/views/team/reportresults/index.vue @@ -110,11 +110,11 @@ >缁熻缁撴灉</el-button > </el-col> - <el-col :span="1.5"> + <!-- <el-col :span="1.5"> <el-button type="primary" size="mini" @click="clear" >娓呯┖宸查�夎緭鍑哄垪</el-button > - </el-col> + </el-col> --> </el-row> <div style="width: 100%; margin-left: 10px; display: flex"> @@ -163,6 +163,7 @@ prop="company" label="鍗曚綅" align="center" + width="170px" :show-overflow-tooltip="true" > </el-table-column> @@ -175,41 +176,33 @@ </el-table-column> </el-table> </div> - <div style="width: 50%; display: flex"> - <el-tabs - type="border-card" - style="height: 560px; margin: 0 10px; width: 100%" - > - <el-tab-pane label="鍗曢」"> - <div class="tab3"> - <!-- <div class="tab2"> --> - <v-tree-transfer - :treeData="treedataList" - :defaultProps="{ children: 'tjProjectList', label: 'proName' }" - :defaultKeys="defaultKeys" - @changeKeys="changeCategoryKeys" - :key="datekey" - ></v-tree-transfer> - <!-- <el-tree ref="tree" :data="treedataList" show-checkbox node-key="proId" :props="defaultProps" - :default-expanded-keys="treeId" :default-checked-keys="treeList" @check-change="handleCurrentChecked"> - </el-tree> --> - <!-- </div> --> - <!-- <el-button - style=" - width: 20px; - height: 100px; - margin-left: 10px; - margin-top: 20%; - font-size: 10px; - " - type="primary" - size="mini" - @click="submit" - ><i style="font-size: 18px" class="el-icon-d-arrow-right"></i - ></el-button> --> - </div> - </el-tab-pane> - </el-tabs> + + <div style="width: 60%; display: flex"> + <div class="outside1"> + <el-input placeholder="杈撳叆鍏抽敭瀛楄繘琛岃繃婊�" v-model="filterText"> + </el-input> + <el-tree + ref="tree" + v-loading="loading" + :data="Treedata" + show-checkbox + node-key="proId" + :props="defaultProps" + @check-change="handleCurrentChecked" + :filter-node-method="filterNode" + > + </el-tree> + </div> + <div> + <el-table + :data="DataList" + style="width: 400px; margin-left: 40px" + border + > + <el-table-column prop="proName" label="宸查�夐」鐩垪琛�" align="center"> + </el-table-column> + </el-table> + </div> </div> </div> <div style="margin-right: 64%"> @@ -240,12 +233,69 @@ <el-dialog :title="title2" :visible.sync="open" - width="1300px" + width="1000px" append-to-body > - <div style="height: 620px; margin-top: 10px"> + <!-- <div style="height: 620px; margin-top: 10px"> <div id="main" style="width: 95%; height: 400px"></div> - </div> + </div> --> + <!-- <el-card + class="box-card" + v-for="(item, index) in rongjiList" + :key="index" + > + <div slot="header" class="clearfix"> + <span>{{ item.project.proName }}</span> + </div> + <div> + <el-table :data="item.zhengchang" style="width: 100%"> + <el-table-column prop="orderDetailId" label="浣撴鍙�" width="180"> + </el-table-column> + <el-table-column prop="createBy" label="濮撳悕" width="180"> + </el-table-column> + </el-table> + <el-table :data="item.yichang" style="width: 100%"> + <el-table-column prop="orderDetailId" label="浣撴鍙�" width="180"> + </el-table-column> + <el-table-column prop="createBy" label="濮撳悕" width="180"> + </el-table-column> + </el-table> + </div> + </el-card> --> + <el-collapse v-model="activeNames"> + <el-collapse-item v-for="(item, index) in rongjiList" :key="index"> + <template slot="title"> + {{ item.project.proName }} + </template> + <div style="display: flex"> + <div style="display: flex;flex-direction: column;width:50%" > + <span>姝e父</span> + <el-table border :data="item.zhengchang" style="width: 100%"> + <el-table-column + prop="tjNumber" + label="浣撴鍙�" + > + </el-table-column> + <el-table-column prop="cusName" label="濮撳悕" > + </el-table-column> + </el-table> + </div> + <div style="display: flex;flex-direction: column;width:50%"> + <span>寮傚父</span> + <el-table border :data="item.yichang" style="width: 100%"> + <el-table-column + prop="tjNumber" + label="浣撴鍙�" + > + </el-table-column> + <el-table-column prop="cusName" label="濮撳悕" > + </el-table-column> + </el-table> + </div><br> + + </div> + </el-collapse-item> + </el-collapse> </el-dialog> </div> </div> @@ -258,20 +308,7 @@ require("echarts/lib/component/legend"); require("echarts/lib/chart/pie"); import VTreeTransfer from "../../system/tijian/TreeTransfer.vue"; -import { - deptTreeSelect, - projectGetList, - getOrder, - getCusIdcard, - getPackageListName, - getaddtTransition, - getTransitionList, - getByTeamNo, - getLoadFile, - getIsRequired, - getconfigKey, - getHistryTjOrderProByCusIdCard, -} from "@/api/system/tijian"; +import { projectGetList } from "@/api/system/tijian"; import { getPeopleList, getDeptAndDwDeptByComp, @@ -280,20 +317,23 @@ getStatist, } from "@/api/team/disease"; import { listComp } from "@/api/system/comp"; +import { getJieGuoFenXi } from "@/api/team/reportresults"; export default { components: { VTreeTransfer, }, data() { return { - datekey: Date.now(), - defaultKeys: [], + activeNames: ["1"], + proIds: [], + filterText: "", + DataList: [], + loading: false, defaultProps: { children: "tjProjectList", label: "proName", }, - tjProjectList: [], - treedataList: [], + Treedata: [], rongjiList: [], aids: [], tjNums: [], @@ -364,31 +404,51 @@ this.getData(); this.datekey = Date.now(); }, + watch: { + filterText(val) { + this.$refs.tree.filter(val); + }, + }, methods: { - changeCategoryKeys(val) { - console.log(val); - this.proIds = []; - this.proIds = val; - // if (this.DataList.length != 0) { - // this.DataList.forEach((item) => { - // this.proIds.push(item.proId); - // }); - // } else { - // this.proIds = []; - // } + filterNode(value, data) { + if (!value) return true; + return data.proName.indexOf(value) !== -1; }, getData() { /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ this.loading = true; + /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ projectGetList().then((response) => { - this.treedataList = response.data.list; - console.log(this.treedataList); - this.dXData = response.data.list; + this.Treedata = response.data.list; this.loading = false; - return; }); }, + // 鐐瑰嚮鑾峰彇姣忎釜鏍戣妭鐐� + handleCurrentChecked(data, checked, checkedNodes) { + // if (!data.tjProjectList) { + // return; + // } + if (data.proParentId != "0") { + if (checked === true) { + this.DataList.push(data); + } else { + this.DataList.pop(data); + this.list1 = true; + } + } + // this.TotalPrice1 = 0; + // this.proIds = []; + // if (this.DataList.length != 0) { + // this.list1 = false; + // this.DataList.forEach((item) => { + // this.TotalPrice1 = item.proPrice + this.TotalPrice1; + // item.tjProjectList.forEach((item1) => { + // this.proIds.push(item1.proId); + // }); + // }); + // } + }, // / 澶勭悊榛樿閫変腑褰撳墠鏃ユ湡 getNowTime() { var curDate = new Date().getTime(); @@ -474,96 +534,66 @@ }, tongji() { this.title2 = "缁熻鍥捐〃"; - - let tjRulesStatisticsDto = { - aids: this.aids, - tjNums: this.tjNums, - }; - console.log(tjRulesStatisticsDto); - if ( - tjRulesStatisticsDto.aids.length === 0 || - tjRulesStatisticsDto.tjNums.length === 0 - ) { + if (this.tjNums.length === 0 || this.DataList === 0) { this.$message.warning("璇烽�夋嫨浜哄憳鍜岀梾绉嶏紒"); } else { + this.DataList.forEach((item) => { + this.proIds.push(item.proId); + }); + let dto = { + proIds: this.proIds, + tjNums: this.tjNums, + }; + this.open = true; - getStatist(tjRulesStatisticsDto).then((res) => { + getJieGuoFenXi(dto).then((res) => { this.rongjiList = res.data; + // this.$nextTick(() => { + // var chartDom = document.getElementById("main"); + // var myChart = echarts.init(chartDom); + // var option; - this.$nextTick(() => { - var chartDom = document.getElementById("main"); - var myChart = echarts.init(chartDom); - var option; - - option = { - title: { - text: "鐥呯缁熻", - left: "center", - }, - tooltip: { - trigger: "item", - formatter: "{a} <br/>{b} : {c} ({d}%)", - }, - legend: { - // type: 'scroll', - orient: "vertical", - right: 10, - top: 80, - bottom: 20, - data: this.rongjiList, - }, - series: [ - { - name: "鐥呯鍚嶇О", - type: "pie", - radius: "55%", - center: ["25%", "60%"], - - data: this.rongjiList, - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: "rgba(0, 0, 0, 0.5)", - }, - }, - }, - ], - }; - - option && myChart.setOption(option); - let sizeFun = function () { - myChart.resize(); - }; - window.addEventListener("resize", sizeFun); - }); - // let dataValue1 = []; - // this.dateAll = []; - // this.rongjiList.forEach((item) => { - // console.log(item); - // this.dateAll.push(item.bingzhong); - // dataValue1.push(item.num); - // }); - // let myChart = this.$echarts.init(document.getElementById("main")); - // myChart.setOption({ - // legend: {}, - - // tooltip: {}, - // xAxis: { - // type: "category", - // name: "鐥呯鍚嶇О", - // data: this.dateAll, - // }, - // yAxis: { - // type:'value' - // }, - // series: [ - // { - // name: "浜烘暟", - // type: "bar", - // data: dataValue1, + // option = { + // title: { + // text: "鐥呯缁熻", + // left: "center", // }, - // ], + // tooltip: { + // trigger: "item", + // formatter: "{a} <br/>{b} : {c} ({d}%)", + // }, + // legend: { + // // type: 'scroll', + // orient: "vertical", + // right: 10, + // top: 80, + // bottom: 20, + // data: this.rongjiList, + // }, + // series: [ + // { + // name: "鐥呯鍚嶇О", + // type: "pie", + // radius: "55%", + // center: ["25%", "60%"], + + // data: this.rongjiList, + // emphasis: { + // itemStyle: { + // shadowBlur: 10, + // shadowOffsetX: 0, + // shadowColor: "rgba(0, 0, 0, 0.5)", + // }, + // }, + // }, + // ], + // }; + + // option && myChart.setOption(option); + // let sizeFun = function () { + // myChart.resize(); + // }; + // window.addEventListener("resize", sizeFun); // }); }); } @@ -576,8 +606,14 @@ .el-pagination { margin-left: 47%; } -.tab3 { - width: 100%; +// .tab3 { +// width: 100%; +// display: flex; +// } +.outside1 { + width: 500px; display: flex; + margin-top: 8px; + flex-direction: column; } </style> \ No newline at end of file -- Gitblit v1.8.0