From 7a8920cd22441a8b14174e4dfad42be591b3725f Mon Sep 17 00:00:00 2001 From: zhangyanpeng <bob.zhang@highdatas.com> Date: 星期二, 17 三月 2020 09:28:04 +0800 Subject: [PATCH] Merge branch 'master' of http://highdatas.com:9000/r/~kimi/srs --- src/components/square.vue | 8 +- src/components/popup/portion/substepReadOnly.vue | 2 .gitignore | 1 src/views/Overview.vue | 107 +++++++++++++++++++---------------- src/components/popup/newProject.vue | 2 src/views/list.vue | 3 6 files changed, 68 insertions(+), 55 deletions(-) diff --git a/.gitignore b/.gitignore index a0dddc6..a5be384 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ *.njsproj *.sln *.sw? +cloc.exe diff --git a/src/components/popup/newProject.vue b/src/components/popup/newProject.vue index a102f54..3f62450 100644 --- a/src/components/popup/newProject.vue +++ b/src/components/popup/newProject.vue @@ -136,9 +136,9 @@ }, mounted() { if(this.rowData.id) { - this.ruleForm = this.rowData; this.xmId = this.rowData.id; } + this.ruleForm = this.rowData; this.userId = localStorage.getItem('userId'); this.assign = localStorage.getItem('assign'); }, diff --git a/src/components/popup/portion/substepReadOnly.vue b/src/components/popup/portion/substepReadOnly.vue index 3b04c4c..1b41bab 100644 --- a/src/components/popup/portion/substepReadOnly.vue +++ b/src/components/popup/portion/substepReadOnly.vue @@ -1487,7 +1487,7 @@ let form_obj = {}; form_obj = this.form_objs[itm_k]; - this.money += form_obj.budget; + this.money += parseFloat(form_obj.budget); } }, diff --git a/src/components/square.vue b/src/components/square.vue index 6b0f9ba..b941b7f 100644 --- a/src/components/square.vue +++ b/src/components/square.vue @@ -43,6 +43,7 @@ <p v-if="noMore">娌℃湁鏇村浜�</p> </div> <el-dialog + v-if="dialogVisible" title="璇︽儏" :visible.sync="dialogVisible" width="40%" @@ -93,11 +94,11 @@ <div style="width: 0px; height: 0px;"> <iframe ref="frame_export" style="width: 0px; height: 0px;"></iframe> </div> - <el-dialog @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> + <el-dialog v-if="dialog_1" @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> <newProject @closeNewProject="closeNewProject" v-bind:rowData="rowData" ref="newProject_"></newProject> </el-dialog> - <el-dialog @close="Cancel1" width="70%" top="50px" :visible.sync="dialog_2" append-to-body> + <el-dialog v-if="dialog_2" @close="Cancel1" width="70%" top="50px" :visible.sync="dialog_2" append-to-body> <newProject ref="newProject1_"></newProject> </el-dialog> </div> @@ -171,7 +172,7 @@ .then(data_ => { if(data_.data.success) { this.rowData = { - id:selected.id, + //id:selected.id, desp:selected.desp, name:selected.title, //objective:this.selected.reseachType, @@ -382,6 +383,7 @@ .handleClose { margin: 10px; text-align: left; + margin-left: 30%; } .handleClose .el-dialog__body { padding: 10px 20px; diff --git a/src/views/Overview.vue b/src/views/Overview.vue index ab7a7cd..95cfcec 100644 --- a/src/views/Overview.vue +++ b/src/views/Overview.vue @@ -1,34 +1,34 @@ <template> - <div class="class_overview"> + <div class="class_overview" > <div style="float: left; width: 100%; height: 50px;"> <span>璇烽�夋嫨椤圭洰锛�</span> - <el-select @change="selectChange_" filterable v-model="value" placeholder="璇烽�夋嫨" size="small"> + <el-select @change="selectChange_" filterable v-model="value" placeholder="璇烽�夋嫨" size="small"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </div> - <div style="float: left; margin-left: 1%; width: 69%; height: 70vh; "> - <div class="z_shadow" style="float: left; margin: 10px; margin-top: 0px; width: 46%; height: 43%; border: 1px solid #e4eef9;"> + <div style="float: left; margin-left: 1%; width: 69%; height: 75vh; "> + <div class="z_shadow" style="float: left; margin: 10px; margin-top: 0px; width: 46%; height: 58%; border: 1px solid #e4eef9;"> <div id="myChart" :style="{width: '100%', height: '100%'}"></div> </div> - <div class="z_shadow" style="float: left; margin: 10px; margin-top: 0px; width: 46%; height: 43%; border: 1px solid #e4eef9;overflow: auto;padding: 5px;"> - <el-timeline :reverse="reverse"> + <div class="z_shadow" style="float: left; margin: 10px; margin-top: 0px; width: 46%; height: 58%; border: 1px solid #e4eef9;overflow: auto;padding: 5px;"> + <el-timeline style="margin-top: 30px;"> <el-timeline-item v-for="(deal, index) in deals" :key="index" :timestamp="deal.createTime"> {{deal.desp}} </el-timeline-item> </el-timeline> </div> - <div class="z_shadow" style="float: left; margin: 10px; width: 46%; height: 43%; border: 1px solid #e4eef9;"> + <div class="z_shadow" style="float: left; margin: 10px; width: 46%; height: 33%; border: 1px solid #e4eef9;"> <el-row :gutter="20"> <el-col :span="6" v-for="(oneUser, index) in userList" :key="index"><div class="grid-content bg-purple"> <i class="el-icon-user-solid"></i> <span>{{oneUser.name}}</span></div></el-col> </el-row> </div> - <div class="z_shadow" style="float: left; margin: 10px; padding: 10px; box-sizing: border-box; width: 46%; height: 43%; border: 1px solid #e4eef9;"> + <div class="z_shadow" style="float: left; margin: 10px; padding: 10px; box-sizing: border-box; width: 46%; height: 33%; border: 1px solid #e4eef9;"> <h3 style="margin: 0px;">鏂囨。搴�</h3> <div class="files_div"> <div style="width: 0px; height: 0px;"> @@ -46,10 +46,10 @@ </div> </div> </div> - <div class="z_shadow" style="float: right; margin-right: 1%; padding: 10px; box-sizing: border-box; width: 28%; height: 70vh; border: 1px solid #e4eef9; overflow: auto;"> - <h3 style="margin: 0px;">椤圭洰姒傝</h3> + <div class="z_shadow" style="float: right; margin-right: 1%; padding: 10px; box-sizing: border-box; width: 28%; height: 75vh; border: 1px solid #e4eef9; overflow: auto;"> + <h3 style="margin: 0px;">椤圭洰姒傝({{usedCnt}}/{{totalCnt}})</h3> <div v-for="(type_itm, k_) in task_itm" :key="k_"> - <h3>{{k_+1}}銆亄{type_itm.name}} <span style="font-size: 12px; color: #409EFF;">{{type_itm.state}} </span></h3> + <h3>{{k_+1}}銆亄{type_itm.name}} ({{type_itm.usedCnt}}/{{type_itm.totalCnt}})<span style="font-size: 12px; color: #409EFF;">{{type_itm.state}} </span></h3> <div> <span>{{type_itm.desp}}</span> </div> @@ -70,7 +70,8 @@ dialog_1: false, fileLevel: 0, fileList: [], - + usedCnt: 0, + totalCnt: 0, task_itm: [ ], @@ -82,22 +83,7 @@ mounted() { this.initSelect(); this.myChart = this.$echarts.init(document.getElementById('myChart')) - let fileList1 = [{ - name: "鏂囦欢鍚嶇О1", - type: "isfile", - path: "" - }, - { - name: "鏂囦欢鍚嶇О2", - type: "isfile", - path: "" - }, - { - name: "鏂囦欢澶瑰悕绉�", - type: "isfiles", - path: "" - }, - ]; + let fileList1 = []; this.fileList = fileList1; this.initChart(); }, @@ -107,7 +93,6 @@ var me = this; this.$axios.get("/api/scheme/all") .then(data_ => { - console.log(data_); if (data_.data.success) { me.options = []; var datas = data_.data.data; @@ -120,12 +105,11 @@ }); } }).catch(error => { - console.log(error); }) }, file_click(file) { if (!file.file) { - + let url = "/api/file/child" ; this.$axios.get(url,{ params:{ @@ -133,7 +117,7 @@ } }) .then(data_ => { - console.log(data_); + if (data_.data.success) { var datas = data_.data.data; @@ -144,8 +128,8 @@ this.fileLevel++; } + }).catch(error => { - console.log(error); }) } else { @@ -169,7 +153,6 @@ } }) .then(data_ => { - console.log(data_); if (data_.data.success) { var datas = data_.data.data; @@ -177,7 +160,6 @@ this.fileLevel--; } }).catch(error => { - console.log(error); }) }, @@ -187,15 +169,20 @@ }, selectChange_(val) { let me = this; + const loading = this.$loading({ + lock: true, + text: '姝e湪鍔犺浇鏁版嵁', + }); let url = "/api/scheme/getSchemeInfo/" + this.value; this.$axios.get(url, { }).then(data_ => { - console.log(data_); if (data_.data.success) { let result = data_.data.data; me.initChart(result.option); me.userList = result.users; + me.usedCnt = result.usedCnt; + me.totalCnt = result.totalCnt; result.paths = result.paths.map(el => { el.path = decodeURI(el.path); return el; @@ -226,19 +213,21 @@ me.fileList = result.paths; me.task_itm = result.scheme; me.deals = result.record; + loading.close(); } }).catch(error => { - console.log(error); + loading.close(); }) }, initChart(datas) { + this.myChart.setOption({ backgroundColor: '#FFF', grid: { top: '12%', - bottom: '19%', - left: '8%', + bottom: '18%', + left: '12%', right: '8%' }, tooltip: { @@ -268,9 +257,10 @@ show: false, alignWithLabel: true }, - data: [ - '12-3', '12-4', '12-5', '12-6', '12-7', '12-8', '12-9', '12-10', '12-11' - ] + data: datas.xAxis, + // [ + // '12-3', '12-4', '12-5', '12-6', '12-7', '12-8', '12-9', '12-10', '12-11' + // ] }, yAxis: { axisLine: { @@ -293,6 +283,21 @@ } } }, + dataZoom: [{ + "show": true, + "height": 16, + "xAxisIndex": [0], + bottom:'3%', + "start": 0, + "end": 30, + handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z', + handleSize: '110%', + handleStyle:{ + color:"#d3dee5", + }, + textStyle:{ color:"#fff"}, + borderColor:"#90979c" + }], series: [{ name: "瀹為檯", type: 'line', @@ -346,9 +351,10 @@ } } }, - data: [ - 20, 18, 17, 10, 7, 4, - ] + data: datas.yAxis2, + // [ + // 20, 18, 17, 10, 7, 4, + // ] }, { name: "鍙傝��", @@ -390,10 +396,11 @@ } }, - data: [ - 20, 17.5, 15, 12.5, 10, - 7.5, 5, 2.5, 0 - ] + data: datas.yAxis1, + // [ + // 20, 17.5, 15, 12.5, 10, + // 7.5, 5, 2.5, 0 + // ] } ] }); @@ -412,6 +419,8 @@ .files_div { height: 90%; + margin-top: 10px; + margin-left: 10px; overflow: auto; } diff --git a/src/views/list.vue b/src/views/list.vue index 0afa51f..ff4631b 100644 --- a/src/views/list.vue +++ b/src/views/list.vue @@ -75,7 +75,7 @@ :total="total"> </el-pagination> - <el-dialog v-if="dialog_1" @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> + <el-dialog v-if="dialog_1" @close="Cancel" width="70%" top="50px" :visible.sync="dialog_1" append-to-body> <newProject @closeNewProject="closeNewProject" v-bind:rowData="rowData" ref="newProject_"></newProject> </el-dialog> <el-dialog v-if="dialog_2" @close="Cancel2" width="70%" top="50px" :visible.sync="dialog_2" append-to-body> @@ -125,6 +125,7 @@ methods: { Cancel() { this.dialog_1 = false; + this.query_(); }, Cancel2() { this.dialog_2 = false; -- Gitblit v1.8.0