diff --git a/package-lock.json b/package-lock.json
index 69b403b..f04872e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -15,6 +15,7 @@
"echarts": "^5.3.3",
"element-plus": "^2.2.6",
"moment": "^2.29.1",
+ "spark-md5": "^3.0.2",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.2",
@@ -12665,6 +12666,11 @@
"resolved": "https://registry.npmmirror.com/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz",
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ="
},
+ "node_modules/spark-md5": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/spark-md5/-/spark-md5-3.0.2.tgz",
+ "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw=="
+ },
"node_modules/spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmmirror.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
@@ -25999,6 +26005,11 @@
"resolved": "https://registry.npmmirror.com/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz",
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ="
},
+ "spark-md5": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/spark-md5/-/spark-md5-3.0.2.tgz",
+ "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw=="
+ },
"spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmmirror.com/spdx-correct/download/spdx-correct-3.1.1.tgz",
diff --git a/package.json b/package.json
index 668e2f3..644942d 100644
--- a/package.json
+++ b/package.json
@@ -14,6 +14,7 @@
"echarts": "^5.3.3",
"element-plus": "^2.2.6",
"moment": "^2.29.1",
+ "spark-md5": "^3.0.2",
"vue": "^3.0.0",
"vue-router": "^4.0.0-0",
"vuex": "^4.0.2",
diff --git a/src/components/TendencyChart.vue b/src/components/TendencyChart.vue
index 6e4c401..6f00f3b 100644
--- a/src/components/TendencyChart.vue
+++ b/src/components/TendencyChart.vue
@@ -15,17 +15,22 @@ export default {
chartData: []
}
},
+ props: {
+ enable: false,
+ },
+ watch: {
+ enable: function (val) {
+ console.log("ENABLE"+val)
+ if(val)
+ this.initEcharts();
+ },
+ },
mounted() {
- this.initEcharts();
- },
- computed: {
- getTotalNumber() {
- return this.dataList.reduce((prev, item) => {
- prev += item.value
- return prev
- }, 0);
- }
+ console.log("ENABLE"+this.enable)
+ if(this.enable)
+ this.initEcharts();
},
+
methods: {
// 获取配置
getOption() {
diff --git a/src/components/echartsBar.vue b/src/components/echartsBar.vue
new file mode 100644
index 0000000..01a7f0c
--- /dev/null
+++ b/src/components/echartsBar.vue
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
diff --git a/src/components/echartsPie.vue b/src/components/echartsPie.vue
index 7d09cc6..20f9bc0 100644
--- a/src/components/echartsPie.vue
+++ b/src/components/echartsPie.vue
@@ -72,7 +72,7 @@ export default {
},
emphasis: {
label: {
- show: true,
+ show: false,
fontSize: '40',
fontWeight: 'bold'
}
@@ -88,7 +88,7 @@ export default {
type: 'scroll',
orient: 'vertical',
// right: 10,
- left:350,
+ left: '80%',
top: 20,
bottom: 20,
}
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 16a0775..266b30f 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -78,7 +78,7 @@
- 下载模板
+ 下载模板
@@ -95,7 +95,6 @@ import {UploadFilled} from '@element-plus/icons'
import request from "@/utils/request";
import router from "../router";
import {ElMessage} from "element-plus";
-import md5 from 'blueimp-md5'
export default {
name: 'Home',
@@ -126,20 +125,32 @@ export default {
},
methods: {
customUpload(options) {
+ const that = this
let param = new FormData()
- param.append('fileDigest', md5(options.file))
- param.append('uploadFile', options.file)
- request({
- url: '/staff/import',
- data: param,
- method: 'post',
- onUploadProgress: progressEvent => {
- progressEvent.percent = progressEvent.loaded / progressEvent.total * 100 | 0
- options.onProgress(progressEvent)
- }
- }).then((res) => {
- console.log(res.data);
- })
+ const fileReader = new FileReader()
+ fileReader.readAsBinaryString(options.file);
+ fileReader.onload = e => {
+ console.log(e.target.result)
+ let SparkMD5 = require('spark-md5')
+ param.append('fileDigest', SparkMD5.hashBinary(e.target.result))
+ param.append('uploadFile', options.file)
+ request({
+ url: '/staff/import',
+ data: param,
+ method: 'post',
+ onUploadProgress: progressEvent => {
+ progressEvent.percent = progressEvent.loaded / progressEvent.total * 100 | 0
+ options.onProgress(progressEvent)
+ }
+ }).then((res) => {
+ console.log(res.data);
+ ElMessage({
+ message: '导入成功',
+ type: 'success',
+ })
+ that.uploadDialogVisible = false
+ })
+ }
},
getStaffFullname() {
if (this.$store && this.$store.state.staff)
diff --git a/src/views/OngoingProject.vue b/src/views/OngoingProject.vue
index 0a5f01e..1af54d0 100644
--- a/src/views/OngoingProject.vue
+++ b/src/views/OngoingProject.vue
@@ -74,9 +74,9 @@ const tableHeight = ref();
const {proxy, ctx} = getCurrentInstance()
onMounted(() => {
// 设置表格初始高度为innerHeight-offsetTop-表格底部与浏览器底部距离110
- tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
+ tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 300;
window.onresize = () => {
- tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 400;
+ tableHeight.value = window.innerHeight /*- tableRef.value.$el.offsetTop*/ - 300;
};
});
const router = useRouter()
@@ -185,17 +185,19 @@ export default {
staffId: Number
}
},
- computed: {},
+ computed: {
+ canCreateProject() {
+ if (this.$store && this.$store.state.staff)
+ return this.$store.state.staff.staffGlobalLevel < 3
+ else
+ return false
+ },
+ },
mounted() {
},
methods: {
- canCreateProject() {
- if (this.$store && this.$store.state.staff)
- return this.$store.state.staff.staffGlobalLevel > 3
- else
- return false
- },
+
showCloseProjectButton(row) {
return this.$store.state.staff === null ? false : (this.$store.state.staff.staffId === row.projectCreator)
},
diff --git a/src/views/Project.vue b/src/views/Project.vue
index 0db87e7..5946519 100644
--- a/src/views/Project.vue
+++ b/src/views/Project.vue
@@ -60,6 +60,7 @@
项目团队
- 新增成员
+ 新增成员
@@ -18,7 +18,7 @@
-
工作项统计
-
@@ -59,7 +68,9 @@
@@ -209,13 +220,13 @@
-
@@ -254,7 +265,7 @@
title="提示"
:model-value="dialogVisible"
width="30%"
- :before-close="handleClose">
+ >
确认删除该公告?