From 27ceedcc075b8ee892f4c1615d4497f3239bbd51 Mon Sep 17 00:00:00 2001 From: haha Date: Sat, 14 Oct 2023 19:52:07 +0800 Subject: [PATCH] update code --- package.json | 7 ++-- public/detail.html | 40 ----------------------- public/video.html | 41 ------------------------ src/components/project-overview-chart.js | 22 ++++++------- src/pages/index.js | 8 ----- src/pages/index.vue | 27 ++++++++-------- src/pages/projectDetail.js | 8 ----- src/pages/projectEngin.js | 8 ----- src/pages/projectProgress.js | 7 ---- src/pages/projectProgress.vue | 4 +-- src/pages/projectQuality.js | 7 ---- src/pages/projectQuality.vue | 2 +- src/pages/projectSafety.js | 7 ---- src/pages/projectVideo.js | 7 ---- src/pages/quality/materialSealChart.vue | 31 +++++++++++++----- src/pages/toAIVideoProject.vue | 35 +++++++++++++++++--- yarn.lock | 5 +++ 17 files changed, 88 insertions(+), 178 deletions(-) delete mode 100644 public/detail.html delete mode 100644 public/video.html delete mode 100644 src/pages/index.js delete mode 100644 src/pages/projectDetail.js delete mode 100644 src/pages/projectEngin.js delete mode 100644 src/pages/projectProgress.js delete mode 100644 src/pages/projectQuality.js delete mode 100644 src/pages/projectSafety.js delete mode 100644 src/pages/projectVideo.js diff --git a/package.json b/package.json index 86b1ed9..4c7b626 100644 --- a/package.json +++ b/package.json @@ -15,15 +15,16 @@ "element-ui": "^2.15.13", "emittery": "^0.8.1", "file-saver": "2.0.5", + "gsap": "^3.12.2", "js-cookie": "^3.0.5", - "nprogress": "0.2.0", "less": "^4.1.3", "less-loader": "^11.1.3", "lodash.debounce": "^4.0.8", "logt": "^1.4.1", + "nprogress": "0.2.0", "vue": "^2.6.14", - "vuex": "3.6.0", - "vue-router": "^3.1.3" + "vue-router": "^3.1.3", + "vuex": "3.6.0" }, "devDependencies": { "@babel/core": "^7.12.16", diff --git a/public/detail.html b/public/detail.html deleted file mode 100644 index 17d2a6e..0000000 --- a/public/detail.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - - - - - - - - - - - - - - - -
- - - diff --git a/public/video.html b/public/video.html deleted file mode 100644 index dd92858..0000000 --- a/public/video.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - <%= htmlWebpackPlugin.options.title %> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - diff --git a/src/components/project-overview-chart.js b/src/components/project-overview-chart.js index 90c8d27..fefd38f 100644 --- a/src/components/project-overview-chart.js +++ b/src/components/project-overview-chart.js @@ -74,15 +74,13 @@ Vue.component("project-overview-chart", { { value: chartData[i].value, name: chartData[i].name, - itemStyle: { - normal: { - //颜色渐变 - color: color[i] - }, + itemStyle: { + //颜色渐变 + color: color[i] }, }, ) - } + } /* let total = chartData.reduce((a, b) => { return a + b.value; }, 0);*/ @@ -96,19 +94,17 @@ Vue.component("project-overview-chart", { itemWidth: 12, itemGap: 8, textStyle: { + color: "#c3dbfd", fontSize: 14, - rich: { + rich: { name: { color: "#c3dbfd", - padding: [10, 5, 20, 5], - // align: 'right' - // width: 60 + padding: [10, 5, 20, 5], }, percent: { color: "#18DB9F", fontSize: 16, - padding: [0, 5, 0, 5], - // align: 'right' + padding: [0, 5, 0, 5], }, }, }, @@ -118,7 +114,7 @@ Vue.component("project-overview-chart", { if(total_datas==0){ percent=0; } - return "{name| " + name + "}"+this.sp+"{value|" + res[0].value + "} {percent|" + percent + "%}"; + return "{name| " + name + "}"+this.sp+"{val|" + res[0].value + "} {percent|" + percent + "%}"; }, }; let opt={...legendOption,...(this.legendOpt||{})}; diff --git a/src/pages/index.js b/src/pages/index.js deleted file mode 100644 index 374f9d9..0000000 --- a/src/pages/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from 'vue' -import App from './index.vue' -import './init.js' -Vue.config.productionTip = false - -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/index.vue b/src/pages/index.vue index ccba7e5..7b05d4c 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -35,8 +35,8 @@
质量管理
+ :key="elKey" :typedata="dangersDatas" :text="qualityNavTitle" :height="260" + style="top:-30px"> @@ -260,15 +260,15 @@ export default { legendOpt1: { icon: "rect", textStyle: { - fontSize: 14, + color: "#c3dbfd", + fontSize: 14, rich: { name: { color: "#c3dbfd", - padding: [10, 5, 20, 5], + padding: [0, 20, 0, 0], }, percent: { - color: "#4676FD", - padding: [10, 5, 20, 5], + color: "#4676FD" }, }, }, @@ -277,18 +277,20 @@ export default { icon: "rect", orient: "horizontal", left: '50%', - top: 'top', - itemGap: 0, + top: '0', + itemGap: 0, + textStyle: { - fontSize: 14, + padding:[0,0,2,0], + fontSize: 10, + color: "#c3dbfd", rich: { name: { color: "#c3dbfd", - padding: [5, 2, 20, 2], + padding: [5, 2, 5, 2], }, percent: { - color: "#4676FD", - fontSize: 16, + color: "#4676FD", padding: [0, 2, 0, 2], }, }, @@ -804,7 +806,6 @@ export default { sum += it.value; }) this.overviewTotal = sum; - console.log(tmps); this.typeDistributionData = tmps; this.elKey++; }) diff --git a/src/pages/projectDetail.js b/src/pages/projectDetail.js deleted file mode 100644 index c79c8a0..0000000 --- a/src/pages/projectDetail.js +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from 'vue' -import App from './projectDetail.vue' -Vue.config.productionTip = false -import './init.js' - -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/projectEngin.js b/src/pages/projectEngin.js deleted file mode 100644 index 7f98632..0000000 --- a/src/pages/projectEngin.js +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from 'vue' -import App from './projectEngin.vue' -Vue.config.productionTip = false -import './init.js' - -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/projectProgress.js b/src/pages/projectProgress.js deleted file mode 100644 index b0111b3..0000000 --- a/src/pages/projectProgress.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import App from './projectProgress.vue' -Vue.config.productionTip = false -import './init.js' -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/projectProgress.vue b/src/pages/projectProgress.vue index 70b9365..ded1da8 100644 --- a/src/pages/projectProgress.vue +++ b/src/pages/projectProgress.vue @@ -149,7 +149,7 @@
- + @@ -933,7 +933,7 @@ export default { } } - &.header { + &.tb-header { background-color: #2D5280; } } diff --git a/src/pages/projectQuality.js b/src/pages/projectQuality.js deleted file mode 100644 index 166eb66..0000000 --- a/src/pages/projectQuality.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import App from './projectQuality.vue' -Vue.config.productionTip = false -import './init.js' -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/projectQuality.vue b/src/pages/projectQuality.vue index 58620b1..25b7756 100644 --- a/src/pages/projectQuality.vue +++ b/src/pages/projectQuality.vue @@ -381,7 +381,7 @@ export default { this.$api.materialSeal.groupTop12Month(postData).then(d=>{ this.materialSealList=(d||[]).map(it=>{ return { - label:(it.m<10?'0'+it.m:it.m)+'\n'+(it.y+'').substring(2), + label:(it.m<10?'0'+it.m:it.m)+'\n'+(it.y+'').substring(2)+'', value:it.cnt } }); diff --git a/src/pages/projectSafety.js b/src/pages/projectSafety.js deleted file mode 100644 index 64522ef..0000000 --- a/src/pages/projectSafety.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import App from './projectSafety.vue' -Vue.config.productionTip = false -import './init.js' -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/projectVideo.js b/src/pages/projectVideo.js deleted file mode 100644 index 79766c4..0000000 --- a/src/pages/projectVideo.js +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from 'vue' -import App from './projectVideo.vue' -Vue.config.productionTip = false -import './init.js' -new Vue({ - render: h => h(App), -}).$mount('#app') diff --git a/src/pages/quality/materialSealChart.vue b/src/pages/quality/materialSealChart.vue index fde68b7..a29dd0c 100644 --- a/src/pages/quality/materialSealChart.vue +++ b/src/pages/quality/materialSealChart.vue @@ -51,23 +51,38 @@ export default { this.option = { xAxis: { type: 'category', - padding:0, - data: (this.optData||[]).map(it=>it.label) + padding: 0, + data: (this.optData || []).map(it => it.label), + }, + graphic: { + type: "text", + left: "30", + bottom: '35', + style: { + text: '月\n年', + textAlign: "center", + fill: "#fff", + fontSize: 12, + fontWeight: 700 + } }, yAxis: { - type: 'value' + type: 'value', + lable: { + fontSize: 6 + } }, series: [ { - data: (this.optData||[]).map(it=>it.value), + data: (this.optData || []).map(it => it.value), label: { - show: true, - color:'#82c9ff', + show: true, + color: '#82c9ff', position: 'top' }, type: 'line', - symbol:'circle', - symbolSize:10, + symbol: 'circle', + symbolSize: 10, areaStyle: {} } ] diff --git a/src/pages/toAIVideoProject.vue b/src/pages/toAIVideoProject.vue index e4d1b61..5899d53 100644 --- a/src/pages/toAIVideoProject.vue +++ b/src/pages/toAIVideoProject.vue @@ -97,10 +97,10 @@
-
最新预警 0
+
最新预警
-
+
@@ -140,6 +140,7 @@ import '../components/amplify/shipinguanli/amplify-spjk' import '../components/project-overview-chart' import '../components/rank-chart' import debounce from 'lodash.debounce' +import gsap from 'gsap' export default { data() { return { @@ -166,14 +167,14 @@ export default { icon: "rect", textStyle: { fontSize: 14, + color: "#c3dbfd", rich: { name: { color: "#c3dbfd", - padding: [10, 5, 20, 5], + padding: [0, 20, 0, 0], }, percent: { - color: "#4676FD", - padding: [10, 5, 20, 5], + color: "#4676FD" }, }, }, @@ -230,6 +231,9 @@ export default { if(this.$root.hasInitHeader){ this.initMe(); } + this.$nextTick(()=>{ + this.listAnm(); + }); }, created() { this.init() @@ -332,6 +336,27 @@ export default { } }, methods: { + stopListAnm(){ + if(this.listTimer){ + clearTimeout(this.listTimer); + this.listTimer=null; + } + }, + listAnm(){ + let func=()=>{ + let el=document.querySelector("#warningListMax"); + if(el.clientHeight
项目 状态