diff --git a/attendance-performance-manager-ui/admin/package-lock.json b/attendance-performance-manager-ui/admin/package-lock.json index 595b5cc6c3843dd58c5dc8506a4a7ac62dcf6311..736d2bf67defcb275afc3df8e0c1367454e020d2 100644 --- a/attendance-performance-manager-ui/admin/package-lock.json +++ b/attendance-performance-manager-ui/admin/package-lock.json @@ -6444,9 +6444,8 @@ }, "node_modules/echarts": { "version": "4.9.0", - "resolved": "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz", - "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz", + "integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==", "dependencies": { "zrender": "4.3.2" } @@ -22406,8 +22405,8 @@ }, "echarts": { "version": "4.9.0", - "resolved": "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz", - "integrity": "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz", + "integrity": "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==", "requires": { "zrender": "4.3.2" } diff --git a/attendance-performance-manager-ui/admin/src/assets/images/u17641.svg b/attendance-performance-manager-ui/admin/src/assets/images/u17641.svg new file mode 100644 index 0000000000000000000000000000000000000000..d29703f7128e6dbb1e2048f7c852296c6e96bc8a --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/assets/images/u17641.svg @@ -0,0 +1,7 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="18px" height="18px" xmlns="http://www.w3.org/2000/svg"> + <g transform="matrix(1 0 0 1 -72 -264 )"> + <path d="M 81 268.5 C 83.52 268.5 85.5 270.48 85.5 273 C 85.5 275.52 83.52 277.5 81 277.5 C 78.48 277.5 76.5 275.52 76.5 273 C 76.5 270.48 78.48 268.5 81 268.5 Z " fill-rule="nonzero" fill="#3377ff" stroke="none" /> + <path d="M 81 266.5 C 84.64 266.5 87.5 269.36 87.5 273 C 87.5 276.64 84.64 279.5 81 279.5 C 77.36 279.5 74.5 276.64 74.5 273 C 74.5 269.36 77.36 266.5 81 266.5 Z " stroke-width="5" stroke="#3377ff" fill="none" stroke-opacity="0.247058823529412" /> + </g> +</svg> \ No newline at end of file diff --git a/attendance-performance-manager-ui/admin/src/assets/less/base.css b/attendance-performance-manager-ui/admin/src/assets/less/base.css new file mode 100644 index 0000000000000000000000000000000000000000..83b563268a5b6c77f45cdeb63985de23f03c08ee --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/assets/less/base.css @@ -0,0 +1,296 @@ +html { + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + box-sizing: border-box; +} +html * { + outline: 0; + box-sizing: inherit; + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +html, +body { + height: 100%; + min-height: 100%; + font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; +} +body { + overflow-y: scroll; +} +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +code, +form, +fieldset, +legend, +input, +textarea, +p, +blockquote, +th, +td, +hr, +button, +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + margin: 0; + padding: 0; +} +input, +select, +textarea, +button { + font-size: 100%; + -webkit-appearance: none; + border: 0; + outline: 0; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +fieldset, +img { + border: 0; +} +abbr, +acronym { + border: 0; + font-variant: normal; +} +del { + text-decoration: line-through; +} +address, +caption, +cite, +code, +dfn, +em, +th, +var { + font-style: normal; + font-weight: 500; +} +ol, +ul { + list-style: none; +} +caption, +th { + text-align: left; +} +q:before, +q:after { + content: ""; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +.mt20 { + margin-top: 20px; +} +.mt10 { + margin-top: 10px; +} +.ml10 { + margin-left: 10px; +} +.ml20 { + margin-left: 20px; +} +ins, +a { + text-decoration: none; + cursor: pointer; +} +/* ============================================================ + flex锛氬畾涔夊竷灞€涓虹洅妯″瀷 + flex-v锛氱洅妯″瀷鍨傜洿甯冨眬 + flex-1锛氬瓙鍏冪礌鍗犳嵁鍓╀綑鐨勭┖闂� + flex-align-center锛氬瓙鍏冪礌鍨傜洿灞呬腑 + flex-pack-center锛氬瓙鍏冪礌姘村钩灞呬腑 + flex-pack-justify锛氬瓙鍏冪礌涓ょ瀵归綈 + 鍏煎鎬э細ios 4+銆乤ndroid 2.3+銆亀inphone8+ + ============================================================ */ +.flex { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} +.flex-v { + -webkit-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} +.flex-1 { + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.flex-align-center { + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.flex-pack-center { + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.flex-pack-justify { + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.flex_warp { + flex-wrap: wrap; +} +.flex_end { + justify-content: flex-end; +} +.clearfix:after { + content: ""; + display: table; + clear: both; + font-size: 0; +} +.fl { + float: left; +} +.fr { + float: right; +} +.hide { + display: none; +} +.disabled { + pointer-events: none; +} +#app, +.pages { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + height: 100%; + overflow: hidden; +} +.ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +[v-cloak] { + display: none; +} +[disabled] { + pointer-events: none; +} +.el-dialog .el-checkbox-group .el-checkbox { + margin: 5px 0; + width: 33.33%; +} +.el-dialog .el-checkbox-group .pointBox { + width: 50%; +} +.el-table th { + user-select: all; +} +.el-progress-bar { + padding-right: 70px; + margin-right: -70px; +} +#operatorUserCabinCheckBox .el-checkbox { + white-space: normal !important; + width: 100%; +} +#operatorUserCabinCheckBox .el-checkbox__label { + display: inline; +} +.page-statistics .chart { + margin-bottom: 80px; + border: 1px solid #ededed; + height: 400px; +} +.page-statistics .el-table th.color-gray, +.page-statistics .el-table tr.color-gray { + background-color: #f0f9eb; +} +@media screen and (max-width: 800px) { + .page { + margin: 5px 5px; + } + .el-dialog { + width: 98% !important; + } + .el-dialog .el-checkbox-group .el-checkbox { + margin: 5px 0; + width: 50%; + font-size: 12px; + } + .el-dialog .el-checkbox-group .el-checkbox .el-checkbox__label { + font-size: 12px; + } +} +.mobile-table-card { + margin: 10px auto; + padding: 10px; + box-shadow: 0 0 5px #ccc; +} +.mobile-table-card .mobile-table-cell { + padding: 5px 0; + border-bottom: 1px dotted #eee; +} +.mobile-table-card .mobile-table-cell .cell-title { + font-size: 13px; + color: #666; +} +.mobile-table-card .mobile-table-cell .cell-content { + padding-left: 5px; + text-align: right; + word-break: break-word; +} diff --git a/attendance-performance-manager-ui/admin/src/assets/less/base.less b/attendance-performance-manager-ui/admin/src/assets/less/base.less index e1cbab0f12ef85ec7d50218d564eb6f7d99de360..7718cdcd45c958340f3bde9461bd557938cf77db 100644 --- a/attendance-performance-manager-ui/admin/src/assets/less/base.less +++ b/attendance-performance-manager-ui/admin/src/assets/less/base.less @@ -1,65 +1,118 @@ html { - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; box-sizing: border-box; } html * { - outline: 0; + outline: 0; box-sizing: inherit; - -webkit-text-size-adjust: none; - -webkit-tap-highlight-color: rgba(0,0,0,0) + -webkit-text-size-adjust: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -html,body { - height: 100%; +html, +body { + height: 100%; min-height: 100%; - font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, sans-serif; + font-family: "Microsoft Yahei", "Helvetica Neue", Helvetica, STHeiTi, Arial, + sans-serif; } body { - overflow-y: scroll; -} -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { - margin: 0; - padding: 0 + overflow-y: scroll; +} +body, +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +code, +form, +fieldset, +legend, +input, +textarea, +p, +blockquote, +th, +td, +hr, +button, +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + margin: 0; + padding: 0; } -input,select,textarea,button { - font-size: 100%; +input, +select, +textarea, +button { + font-size: 100%; -webkit-appearance: none; - border:0; + border: 0; outline: 0; } table { - border-collapse: collapse; - border-spacing: 0 + border-collapse: collapse; + border-spacing: 0; } -fieldset,img { - border: 0 +fieldset, +img { + border: 0; } -abbr,acronym { - border: 0; - font-variant: normal +abbr, +acronym { + border: 0; + font-variant: normal; } del { - text-decoration: line-through + text-decoration: line-through; } -address,caption,cite,code,dfn,em,th,var { - font-style: normal; - font-weight: 500 +address, +caption, +cite, +code, +dfn, +em, +th, +var { + font-style: normal; + font-weight: 500; } -ol,ul { - list-style: none +ol, +ul { + list-style: none; } -caption,th { - text-align: left +caption, +th { + text-align: left; } // h1,h2,h3,h4,h5,h6 { @@ -67,39 +120,42 @@ caption,th { // font-weight: 500 // } -q:before,q:after { - content: '' +q:before, +q:after { + content: ""; } -sub,sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sup { - top: -.5em + top: -0.5em; } sub { - bottom: -.25em + bottom: -0.25em; } -.mt20{ - margin-top: 20px; +.mt20 { + margin-top: 20px; } -.mt10{ - margin-top: 10px; +.mt10 { + margin-top: 10px; } -.ml10{ +.ml10 { margin-left: 10px; } -.ml20{ - margin-left: 20px; +.ml20 { + margin-left: 20px; } -ins,a { - text-decoration: none; - cursor: pointer; +ins, +a { + text-decoration: none; + cursor: pointer; } /* ============================================================ flex锛氬畾涔夊竷灞€涓虹洅妯″瀷 @@ -110,39 +166,78 @@ ins,a { flex-pack-justify锛氬瓙鍏冪礌涓ょ瀵归綈 鍏煎鎬э細ios 4+銆乤ndroid 2.3+銆亀inphone8+ ============================================================ */ -.flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;} -.flex-v{-webkit-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;} -.flex-1{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;} -.flex-align-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;} -.flex-pack-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;} -.flex-pack-justify{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;} -.flex_warp{flex-wrap: wrap;} -.flex_end{ - justify-content: flex-end; -} -.clearfix{ - &:after{ - content: ''; +.flex { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} +.flex-v { + -webkit-box-orient: vertical; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; +} +.flex-1 { + -webkit-box-flex: 1; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; +} +.flex-align-center { + -webkit-box-align: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; +} +.flex-pack-center { + -webkit-box-pack: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; +} +.flex-pack-justify { + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} +.flex_warp { + flex-wrap: wrap; +} +.flex_end { + justify-content: flex-end; +} +.clearfix { + &:after { + content: ""; display: table; clear: both; font-size: 0; - } + } } -.fl{float: left}; -.fr{float: right}; -.hide{display: none;} -.disabled{ - pointer-events: none; +.fl { + float: left; } - -#app,.pages{ - .flex; - .flex-v; - height: 100%; +.fr { + float: right; +} +.hide { + display: none; +} +.disabled { + pointer-events: none; } +#app, +.pages { + .flex; + .flex-v; + height: 100%; + overflow: hidden; +} -.ellipsis{ +.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -151,90 +246,89 @@ ins,a { display: none; } [disabled] { - pointer-events: none; -} -.el-dialog{ - .el-checkbox-group{ - .el-checkbox{ - margin: 5px 0; - width: 33.33%; - } - .pointBox{ - width: 50%; - } - } + pointer-events: none; +} +.el-dialog { + .el-checkbox-group { + .el-checkbox { + margin: 5px 0; + width: 33.33%; + } + .pointBox { + width: 50%; + } + } } .el-table th { - user-select: all; + user-select: all; } -.el-progress-bar{ - padding-right: 70px; - margin-right: -70px; +.el-progress-bar { + padding-right: 70px; + margin-right: -70px; } -#operatorUserCabinCheckBox .el-checkbox{ +#operatorUserCabinCheckBox .el-checkbox { white-space: normal !important; - width: 100% + width: 100%; } -#operatorUserCabinCheckBox .el-checkbox__label{ +#operatorUserCabinCheckBox .el-checkbox__label { display: inline; } // 缁熻椤甸潰闅旀棩鏈熷彉鑹� -.page-statistics{ - .chart{ +.page-statistics { + .chart { margin-bottom: 80px; border: 1px solid #ededed; height: 400px; } - .el-table th, .el-table tr{ - &.color-gray{ + .el-table th, + .el-table tr { + &.color-gray { background-color: #f0f9eb; } } } - - -@media screen and (max-width: 800px){ - .page{ - margin: 5px 5px; - } - .el-dialog{ - width: 98%!important; - .el-checkbox-group{ - .el-checkbox{ - margin: 5px 0; - width: 50%; - font-size: 12px; - .el-checkbox__label{ - font-size: 12px; - } - } - } - } +@media screen and (max-width: 800px) { + .page { + margin: 5px 5px; + } + .el-dialog { + width: 98% !important; + .el-checkbox-group { + .el-checkbox { + margin: 5px 0; + width: 50%; + font-size: 12px; + .el-checkbox__label { + font-size: 12px; + } + } + } + } } // .is-active{ // background-color: red; // } -.mobile-table-card{ - margin: 10px auto; - padding: 10px; - box-shadow: 0 0 5px #ccc; - .mobile-table-cell{ - padding: 5px 0; - border-bottom: 1px dotted #eee; - .cell-title{ - font-size: 13px; - color: #666; - } - .cell-content{ - padding-left: 5px; - text-align: right; - word-break: break-word; - } - } -} \ No newline at end of file +.mobile-table-card { + margin: 10px auto; + padding: 10px; + box-shadow: 0 0 5px #ccc; + .mobile-table-cell { + padding: 5px 0; + border-bottom: 1px dotted #eee; + .cell-title { + font-size: 13px; + color: #666; + } + .cell-content { + padding-left: 5px; + text-align: right; + word-break: break-word; + } + } +} diff --git a/attendance-performance-manager-ui/admin/src/assets/mixins/form.js b/attendance-performance-manager-ui/admin/src/assets/mixins/form.js index 6d14ca46d8d0be4146af919303bb1aff61e8e7a7..1b3d72dae394ecbb5afa5cadd722529b1d5fe5a9 100644 --- a/attendance-performance-manager-ui/admin/src/assets/mixins/form.js +++ b/attendance-performance-manager-ui/admin/src/assets/mixins/form.js @@ -8,15 +8,13 @@ export default { methods: { // 娓叉煋鍓嶇疆澶勭悊 beforeRender(data) { - return data + return data; }, // 娓叉煋鍚庣疆澶勭悊 - afterRender(data) { - - }, + afterRender(data) {}, // 鎻愪氦琛ㄥ崟鐨勫墠缃鐞� beforeSubmit(data) { - return data + return data; }, // 鎻愪氦琛ㄥ崟鐨勫悗缃鐞�, 浼氶樆鏂粯璁ょ殑鍥為€€琛屼负 afterSubmit(data) { @@ -39,16 +37,16 @@ export default { // 閮ㄩ棬鏍煎紡鍖栧鐞� this.afterRender(res); }) - .catch(error => { - console.error(error) + .catch((error) => { + console.error(error); this.$message.error(error.message); }) - .then(data => { + .then((data) => { clearTimeout(this.loadingTimer); this.loadingTimer = setTimeout(() => { this.loading = false; }, 300); - }) + }); }, // 鎻愪氦琛ㄥ崟 submitForm(ref) { @@ -56,73 +54,82 @@ export default { el.validate((valid) => { if (!valid) return; this.loading = true; - console.log('鎻愪氦浜�') - this.$post(this.urls.saveUrl || this.pageInfo.saveUrl, - this.beforeSubmit(this.form) + console.log("鎻愪氦浜�"); + this.$post( + this.urls.saveUrl || this.pageInfo.saveUrl, + this.beforeSubmit(this.form) ) - .then(res => { + .then((res) => { this.$message.success(res.msg); this.afterSubmit(res); }) - .catch(error => { + .catch((error) => { this.$message.error(error.message); }) - .then(data => { + .then((data) => { clearTimeout(this.loadingTimer); this.loadingTimer = setTimeout(() => { this.loading = false; }, 200); - }) + }); }); }, // 澶嶅埗涓€涓暟缁勬垨瀵硅薄 util_copy(data) { - return JSON.parse(JSON.stringify(data)) + return JSON.parse(JSON.stringify(data)); }, // 宸ュ叿鏂规硶锛屾妸鏁板瓧杞寲涓哄瓧绗︿覆 util_toString(data, array) { //鍘熷鏁版嵁 const dataCopy = Object.assign({}, data); - array.forEach(item => { + array.forEach((item) => { //濡傛灉鐩哥瓑鍋氭搷浣� - dataCopy[item] = dataCopy[item] === undefined ? '' : dataCopy[item] + ''; - }) + dataCopy[item] = + dataCopy[item] === undefined ? "" : dataCopy[item] + ""; + }); return dataCopy; }, // 宸ュ叿鏂规硶锛屾妸瀛楃涓茶浆鍖栦负鏁扮粍 util_toArrays(data, array) { const dataCopy = Object.assign({}, data); - array.forEach(item => { - dataCopy[item] = dataCopy[item] === undefined ? [] : dataCopy[item].split(","); - }) + array.forEach((item) => { + dataCopy[item] = + dataCopy[item] === undefined ? [] : dataCopy[item].split(","); + }); return dataCopy; }, // 宸ュ叿鏂规硶锛屾妸瀛楃涓茶浆鍖栦负鏍煎紡鍖栨棩鏈� util_toDateStr(data, array) { const dataCopy = Object.assign({}, data); - array.forEach(item => { - dataCopy[item] = dataCopy[item] === undefined ? '' : this.util_formatterDate(dataCopy[item]); - }) + array.forEach((item) => { + dataCopy[item] = + dataCopy[item] === undefined + ? "" + : this.util_formatterDate(dataCopy[item]); + }); return dataCopy; }, util_formatterDate(time) { let date = new Date(Number(time)); - let Y = date.getFullYear() + '-'; - let M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; - let D = this.panLeft(date.getDate()) + ' '; - let h = this.panLeft(date.getHours()) + ':'; - let m = this.panLeft(date.getMinutes()) + ':'; + let Y = date.getFullYear() + "-"; + let M = + (date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1) + "-"; + let D = this.panLeft(date.getDate()) + " "; + let h = this.panLeft(date.getHours()) + ":"; + let m = this.panLeft(date.getMinutes()) + ":"; let s = this.panLeft(date.getSeconds()); - return Y+M+D+h+m+s; + return Y + M + D + h + m + s; }, - panLeft(num){ - return num < 10 ? '0'+num : num; + panLeft(num) { + return num < 10 ? "0" + num : num; }, // 浠巇ict瀛楁鏆村姏鍙栧€硷紝鍙栦笉鍒板垯杩斿洖鍘熷€� util_formatter(key, val) { try { - return this.dict[key][val] + return this.dict[key][val]; } catch (error) { return val; } @@ -135,24 +142,24 @@ export default { } }); }, 0); - } + }, }, computed: { pageInfo() { let currUrl = this.$route.path; - let urlArray = currUrl.split('/'); + let urlArray = currUrl.split("/"); let type = urlArray.pop(); - urlArray.push('save'); - let saveUrl = urlArray.join('/'); + urlArray.push("save"); + let saveUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('edit'); - let editUrl = urlArray.join('/'); + urlArray.push("edit"); + let editUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('add'); - let addUrl = urlArray.join('/'); + urlArray.push("add"); + let addUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('view'); - let viewUrl = urlArray.join('/'); + urlArray.push("view"); + let viewUrl = urlArray.join("/"); return { type, currUrl, @@ -176,9 +183,6 @@ export default { toString: [], // 闇€瑕佹妸number杞寲涓簊tring鐨勮〃鍗曞瓧娈祅ame鏁扮粍 toArrays: [], // 闇€瑕佹妸number杞寲涓篴rrays鐨勮〃鍗曞瓧娈祅ame鏁扮粍 toDate: [], // 闇€瑕佹妸number杞寲涓篸ate鐨勮〃鍗曞瓧娈祅ame鏁扮粍 - } - } -} - - - + }; + }, +}; diff --git a/attendance-performance-manager-ui/admin/src/assets/mixins/formdialog.js b/attendance-performance-manager-ui/admin/src/assets/mixins/formdialog.js index a53cb245b7bb0ed6eabd57fddd77ad03fe211429..5e7b44952ff54d71842b2c5265c3742d13255b9d 100644 --- a/attendance-performance-manager-ui/admin/src/assets/mixins/formdialog.js +++ b/attendance-performance-manager-ui/admin/src/assets/mixins/formdialog.js @@ -1,6 +1,6 @@ export default { created() { - // this.getData(); + // this.getData(); }, beforeDestroy() { clearTimeout(this.loadingTimer); @@ -8,29 +8,27 @@ export default { methods: { // 娓叉煋鍓嶇疆澶勭悊 beforeRender(data) { - return data + return data; }, // 娓叉煋鍚庣疆澶勭悊 - afterRender(data) { - - }, + afterRender(data) {}, // 鎻愪氦琛ㄥ崟鐨勫墠缃鐞� beforeSubmit(data) { - return data + return data; }, // 鎻愪氦琛ㄥ崟鐨勫悗缃鐞�, 浼氶樆鏂粯璁ょ殑鍥為€€琛屼负 afterSubmit(data) { this.$router.go(-1); }, - // 寮€鍚€佸叧闂� - changePath(path) { - this.pageInfo.list = path + "/list"; - this.pageInfo.del = path + "/delete"; - this.pageInfo.add = path + "/add"; - this.pageInfo.edit = path + "/edit"; - this.pageInfo.view = path + "/view"; - }, + // 寮€鍚€佸叧闂� + changePath(path) { + this.pageInfo.list = path + "/list"; + this.pageInfo.del = path + "/delete"; + this.pageInfo.add = path + "/add"; + this.pageInfo.edit = path + "/edit"; + this.pageInfo.view = path + "/view"; + }, // 榛樿鎷夊彇鏁版嵁 getData() { @@ -48,87 +46,100 @@ export default { this.dict = Object.assign({}, this.dict, res.dict); this.afterRender(res); }) - .catch(error => { - this.$message.error(error.message) - throw error + .catch((error) => { + this.$message.error(error.message); + throw error; }) - .then(data => { + .then((data) => { clearTimeout(this.loadingTimer); this.loadingTimer = setTimeout(() => { this.loading = false; }, 300); - }) + }); }, // 鎻愪氦琛ㄥ崟 submitForm(ref) { + console.log(123); + return; const el = this.$refs.form; el.validate((valid) => { if (!valid) return; this.loading = true; - this.$post(this.urls.saveUrl || this.pageInfo.saveUrl, this.beforeSubmit(this.form)) - .then(res => { + this.$post( + this.urls.saveUrl || this.pageInfo.saveUrl, + this.beforeSubmit(this.form) + ) + .then((res) => { this.$message.success(res.msg); this.afterSubmit(res); }) - .catch(error => { + .catch((error) => { this.$message.error(error.message); }) - .then(data => { + .then((data) => { clearTimeout(this.loadingTimer); this.loadingTimer = setTimeout(() => { this.loading = false; }, 200); - }) + }); }); }, // 澶嶅埗涓€涓暟缁勬垨瀵硅薄 util_copy(data) { - return JSON.parse(JSON.stringify(data)) + return JSON.parse(JSON.stringify(data)); }, // 宸ュ叿鏂规硶锛屾妸鏁板瓧杞寲涓哄瓧绗︿覆 util_toString(data, array) { //鍘熷鏁版嵁 const dataCopy = Object.assign({}, data); - array.forEach(item => { + array.forEach((item) => { //濡傛灉鐩哥瓑鍋氭搷浣� - dataCopy[item] = dataCopy[item] === undefined ? '' : dataCopy[item] + ''; - }) + dataCopy[item] = + dataCopy[item] === undefined ? "" : dataCopy[item] + ""; + }); return dataCopy; }, // 宸ュ叿鏂规硶锛屾妸瀛楃涓茶浆鍖栦负鏁扮粍 util_toArrays(data, array) { const dataCopy = Object.assign({}, data); - array.forEach(item => { - dataCopy[item] = dataCopy[item] === undefined ? [] : dataCopy[item].split(","); - }) + array.forEach((item) => { + dataCopy[item] = + dataCopy[item] === undefined ? [] : dataCopy[item].split(","); + }); return dataCopy; }, // 宸ュ叿鏂规硶锛屾妸瀛楃涓茶浆鍖栦负鏍煎紡鍖栨棩鏈� util_toDateStr(data, array) { const dataCopy = Object.assign({}, data); - array.forEach(item => { - dataCopy[item] = dataCopy[item] === undefined ? '' : this.util_formatterDate(dataCopy[item]); - }) + array.forEach((item) => { + dataCopy[item] = + dataCopy[item] === undefined + ? "" + : this.util_formatterDate(dataCopy[item]); + }); return dataCopy; }, util_formatterDate(time) { let date = new Date(Number(time)); - let Y = date.getFullYear() + '-'; - let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; - let D = this.panLeft(date.getDate()) + ' '; - let h = this.panLeft(date.getHours()) + ':'; - let m = this.panLeft(date.getMinutes()) + ':'; + let Y = date.getFullYear() + "-"; + let M = + (date.getMonth() + 1 < 10 + ? "0" + (date.getMonth() + 1) + : date.getMonth() + 1) + "-"; + let D = this.panLeft(date.getDate()) + " "; + let h = this.panLeft(date.getHours()) + ":"; + let m = this.panLeft(date.getMinutes()) + ":"; let s = this.panLeft(date.getSeconds()); return Y + M + D + h + m + s; }, panLeft(num) { - return num < 10 ? '0' + num : num; + return num < 10 ? "0" + num : num; }, // 浠巇ict瀛楁鏆村姏鍙栧€硷紝鍙栦笉鍒板垯杩斿洖鍘熷€� util_formatter(key, val) { try { - return this.dict[key][val] + return this.dict[key][val]; } catch (error) { return val; } @@ -141,24 +152,24 @@ export default { } }); }, 0); - } + }, }, computed: { pageInfo() { let currUrl = this.$route.path; - let urlArray = currUrl.split('/'); + let urlArray = currUrl.split("/"); let type = urlArray.pop(); - urlArray.push('save'); - let saveUrl = urlArray.join('/'); + urlArray.push("save"); + let saveUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('edit'); - let editUrl = urlArray.join('/'); + urlArray.push("edit"); + let editUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('add'); - let addUrl = urlArray.join('/'); + urlArray.push("add"); + let addUrl = urlArray.join("/"); urlArray.pop(); - urlArray.push('view'); - let viewUrl = urlArray.join('/'); + urlArray.push("view"); + let viewUrl = urlArray.join("/"); return { type, currUrl, @@ -182,9 +193,6 @@ export default { toString: [], // 闇€瑕佹妸number杞寲涓簊tring鐨勮〃鍗曞瓧娈祅ame鏁扮粍 toArrays: [], // 闇€瑕佹妸number杞寲涓篴rrays鐨勮〃鍗曞瓧娈祅ame鏁扮粍 toDate: [], // 闇€瑕佹妸number杞寲涓篸ate鐨勮〃鍗曞瓧娈祅ame鏁扮粍 - } - } -} - - - + }; + }, +}; diff --git a/attendance-performance-manager-ui/admin/src/main.js b/attendance-performance-manager-ui/admin/src/main.js index 23b46505bfa9a32195b595e250cf35f7eabedf02..07eb80831ba820b987c9c14bbf7d2abc44c77a30 100644 --- a/attendance-performance-manager-ui/admin/src/main.js +++ b/attendance-performance-manager-ui/admin/src/main.js @@ -1,39 +1,47 @@ -import Vue from 'vue' -import ElementUI from 'element-ui' -import 'element-ui/lib/theme-chalk/index.css' -import './assets/less/base.less' -import App from './App.vue' -import router from './router' -import store from './store' -import Prototype from './assets/utils/prototype' -import Filter from './assets/utils/filter.js' -import GlobalComponents from './assets/utils/globalComponents.js' -import Global from './assets/utils/global.js' -import VueClipboard from 'vue-clipboard2' -import VueAMap from 'vue-amap'; -import * as echarts from 'echarts' +import Vue from "vue"; +import ElementUI from "element-ui"; +import "element-ui/lib/theme-chalk/index.css"; +import "./assets/less/base.less"; +import App from "./App.vue"; +import router from "./router"; +import store from "./store"; +import Prototype from "./assets/utils/prototype"; +import Filter from "./assets/utils/filter.js"; +import GlobalComponents from "./assets/utils/globalComponents.js"; +import Global from "./assets/utils/global.js"; +import VueClipboard from "vue-clipboard2"; +import VueAMap from "vue-amap"; +import * as echarts from "echarts"; // 灏嗚嚜鍔ㄦ敞鍐屾墍鏈夌粍浠朵负鍏ㄥ眬缁勪欢 -import dataV from '@jiaminghi/data-view' +import dataV from "@jiaminghi/data-view"; -Vue.use(dataV) +Vue.use(dataV); Vue.prototype.$echarts = echarts; -Vue.config.productionTip = false +Vue.config.productionTip = false; Vue.use(ElementUI); Vue.use(Prototype); Vue.use(Filter); Vue.use(GlobalComponents); // 鍏ㄥ眬缁勪欢 -Vue.use(VueClipboard) -Vue.use(VueAMap) +Vue.use(VueClipboard); +Vue.use(VueAMap); VueAMap.initAMapApiLoader({ - key: 'f45cca59553214543a5a77e50a7e04df', - plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], - v: '1.4.4', - uiVersion: '1.0', -}) + key: "f45cca59553214543a5a77e50a7e04df", + plugin: [ + "AMap.Scale", + "AMap.OverView", + "AMap.ToolBar", + "AMap.MapType", + "AMap.PlaceSearch", + "AMap.Geolocation", + "AMap.Geocoder", + ], + v: "1.4.4", + uiVersion: "1.0", +}); Vue.prototype.Global = Global; new Vue({ router, store, - render: h => h(App) -}).$mount('#app') + render: (h) => h(App), +}).$mount("#app"); diff --git a/attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue b/attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue index 3a22dc53270417efdf2ca98344c5d7f1d3f32ae5..82f9e70b309b5de60db2fd3d9a05c6ee07149b0d 100644 --- a/attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue +++ b/attendance-performance-manager-ui/admin/src/views/homeCharts/record/list.vue @@ -7,11 +7,15 @@ </div> <dv-scroll-ranking-board :config="config" - style="width:100%;height:93%" + style="width:100%;height:75%" /> </div> - <div class="left_mid"></div> - <div class="left_down"></div> + <div class="left_mid"> + <div id="leida" style="width: 100%;height: 100%;"></div> + </div> + <div class="left_down"> + <div id="rulePie" style="width: 100%;height: 100%;"></div> + </div> </div> <div class="mid"> <div class="mid_top"> @@ -125,7 +129,7 @@ <div class="down_content"> <img class="content_title" src="../../../assets/images/title.png" /> <div style="margin: 20px 0;"> - <el-radio-group v-model="radio1"> + <el-radio-group v-model="type" border> <el-radio-button label="1">閮ㄩ棬璇勪及</el-radio-button> <el-radio-button label="2">涓汉璇勪及</el-radio-button> </el-radio-group> @@ -173,15 +177,19 @@ <div class="right"> <div class="right_top"> <div class="title"> - 閮ㄩ棬缁╂晥鎬诲垎鎺掑悕TOP10 + 涓汉缁╂晥鎬诲垎鎺掑悕TOP10 </div> <dv-scroll-ranking-board - :config="config" - style="width:100%;height:93%" + :config="personConfig" + style="width:100%;height:75%" /> </div> - <div class="right_mid"></div> - <div class="right_down"></div> + <div class="right_mid"> + <div id="shensuPie" style="width: 100%;height: 100%;"></div> + </div> + <div class="right_down"> + <div id="recordPie" style="width: 100%;height: 100%;"></div> + </div> </div> </div> </template> @@ -190,7 +198,7 @@ export default { data() { return { - radio1: "", + type: "1", form: { date1: "", type: [], @@ -199,41 +207,455 @@ export default { config: { data: [ { - name: "鍛ㄥ彛", - value: 55, + name: "閮ㄩ棬1", + value: 95, }, { - name: "鍗楅槼", - value: 120, + name: "閮ㄩ棬2", + value: 90, }, { - name: "瑗垮场", - value: 78, + name: "閮ㄩ棬3", + value: 98, }, { - name: "椹婚┈搴�", - value: 66, + name: "閮ㄩ棬4", + value: 91, }, { - name: "鏂颁埂", + name: "閮ㄩ棬5", value: 80, }, { - name: "淇¢槼", - value: 45, + name: "閮ㄩ棬6", + value: 92, + }, + { + name: "閮ㄩ棬7", + value: 93, + }, + { + name: "閮ㄩ棬8", + value: 94, }, { - name: "婕渤", - value: 29, + name: "閮ㄩ棬9", + value: 90, + }, + { + name: "閮ㄩ棬10", + value: 100, }, ], }, + personConfig: { + data: [ + { + name: "涓汉1", + value: 95, + }, + { + name: "涓汉2", + value: 90, + }, + { + name: "涓汉3", + value: 98, + }, + { + name: "涓汉4", + value: 91, + }, + { + name: "涓汉5", + value: 80, + }, + { + name: "涓汉6", + value: 92, + }, + { + name: "涓汉7", + value: 93, + }, + { + name: "涓汉8", + value: 94, + }, + { + name: "涓汉9", + value: 90, + }, + { + name: "涓汉10", + value: 100, + }, + ], + }, + cricleData: [ + { value: 756, name: "鑰冨嫟缁╂晥" }, + { value: 690, name: "璇勪环缁╂晥" }, + { value: 559, name: "鍔炰欢缁╂晥" }, + { value: 1278, name: "鏁堣兘缁╂晥" }, + ], }; }, - mounted() {}, + mounted() { + this.drawLeiDa(); + this.drawRulePie(); + this.drawCorePie(); + this.drawRecordPie(); + }, + + methods: { + drawLeiDa() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById("leida")); + // 缁樺埗鍥捐〃 + myChart.setOption({ + title: { + text: "寮傚父鍒嗗€煎垎甯冩儏鍐�", + left: "left", + textStyle: { + fontSize: 18, + }, + }, + color: ["#56A3F1", "#FF917C"], + tooltip: {}, + legend: { + data: ["鍔犲垎", "鎵e垎"], + right: 0, + }, + radar: [ + { + center: ["25%", "50%"], + radius: 120, + startAngle: 90, + splitNumber: 4, + shape: "circle", + axisName: { + formatter: "銆恵value}銆�", + color: "#428BD4", + }, + + axisLine: { + lineStyle: { + color: "rgba(211, 253, 250, 0.8)", + }, + }, + splitLine: { + lineStyle: { + color: "rgba(211, 253, 250, 0.8)", + }, + }, + }, + { + indicator: [ + { text: "鑰冨嫟缁╂晥", max: 150 }, + { text: "鍔炰欢缁╂晥", max: 150 }, + { text: "璇勪环缁╂晥", max: 150 }, + { text: "鏁堣兘缁╂晥", max: 120 }, + { text: "鍏朵粬缁╂晥", max: 108 }, + ], + center: ["45%", "60%"], + radius: 80, + axisName: { + color: "#fff", + backgroundColor: "#666", + borderRadius: 10, + padding: [0, 1], + }, + }, + ], + series: [ + { + type: "radar", + radarIndex: 1, + data: [ + { + value: [120, 118, 130, 100, 99, 70], + name: "鍔犲垎", + symbol: "rect", + symbolSize: 12, + areaStyle: { color: "#56A3F1" }, //闆疯揪瑕嗙洊鍖哄煙鑳屾櫙棰滆壊 + label: { + show: true, + formatter: function(params) { + return params.value; + }, + }, + }, + { + value: [100, 93, 50, 90, 70, 60], + areaStyle: { color: "#FF917C" }, //闆疯揪瑕嗙洊鍖哄煙鑳屾櫙棰滆壊 + name: "鎵e垎", + }, + ], + }, + ], + }); + }, + drawRulePie() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById("rulePie")); + myChart.setOption({ + title: { + text: "缁╂晥瑙勫垯鍒嗗竷鎯呭喌", + textStyle: { + fontSize: 18, + }, + }, + tooltip: { + trigger: "item", + }, + legend: { + bottom: "0%", + right: "5%", + orient: "vertical", + textStyle: { + // 鏂囧瓧鐨勬牱寮� + fontSize: 24, // 鍙帶鍒舵瘡涓猯egend椤圭殑闂磋窛 + color: "#828282", + rich: { + // 閫氳繃瀵屾枃鏈瑀ich缁欐瘡涓」璁剧疆鏍峰紡锛屼笅闈㈢殑oneone銆乼wotwo銆乼hreethree鍙互鐞嗚В涓�"姣忎竴鍒�"鐨勬牱寮� + oneone: { + // 璁剧疆鏂囧瓧銆佹暟瀛︺€佽嫳璇繖涓€鍒楃殑鏍峰紡 + width: 50, + color: "#000000", + fontSize: 12, + fontWeight: "bolder", + }, + twotwo: { + // 璁剧疆10鍒嗐€�20鍒嗐€�30鍒嗚繖涓€鍒楃殑鏍峰紡 + width: 35, + color: "#333", + fontSize: 12, + fontWeight: 600, + }, + threethree: { + // 璁剧疆鐧惧垎姣旇繖涓€鍒楃殑鏍峰紡 + width: 20, + color: "#333", + fontSize: 12, + }, + }, + }, + formatter: (name) => { + // formatter鏍煎紡鍖栧嚱鏁板姩鎬佸憟鐜版暟鎹� + console.log(name); + var total = 0; // 鐢ㄤ簬璁$畻鎬绘暟 + var target; // 閬嶅巻鎷垮埌鏁版嵁 + for (var i = 0; i < this.cricleData.length; i++) { + total += this.cricleData[i].value; + if (this.cricleData[i].name == name) { + target = this.cricleData[i].value; + } + } + var v = ((target / total) * 100).toFixed(2); + return `{oneone|${name}} {twotwo|${target}鍒唥 {threethree|${v}%}`; + // 瀵屾枃鏈涓€鍒楁牱寮忓簲鐢� 瀵屾枃鏈浜屽垪鏍峰紡搴旂敤 瀵屾枃鏈涓夊垪鏍峰紡搴旂敤 + }, + }, + series: [ + { + type: "pie", + radius: ["40%", "70%"], + // avoidLabelOverlap: false, + left: "-50%", + top: "10%", + label: { + position: "center", + fontSize: 16, + formatter: () => { + let str = "鎬�" + "\n" + `${756 + 690 + 559 + 1278}`; + return str; + }, + }, + labelLine: { + show: false, + }, + data: this.cricleData, + }, + ], + }); + }, + drawCorePie() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById("shensuPie")); + myChart.setOption({ + title: { + text: "缁╂晥瑙勫垯鍒嗗竷鎯呭喌", + textStyle: { + fontSize: 18, + }, + }, + tooltip: { + trigger: "item", + }, + legend: { + bottom: "0%", + right: "5%", + orient: "vertical", + textStyle: { + // 鏂囧瓧鐨勬牱寮� + fontSize: 24, // 鍙帶鍒舵瘡涓猯egend椤圭殑闂磋窛 + color: "#828282", + rich: { + // 閫氳繃瀵屾枃鏈瑀ich缁欐瘡涓」璁剧疆鏍峰紡锛屼笅闈㈢殑oneone銆乼wotwo銆乼hreethree鍙互鐞嗚В涓�"姣忎竴鍒�"鐨勬牱寮� + oneone: { + width: 50, + color: "#000000", + fontSize: 12, + fontWeight: "bolder", + }, + twotwo: { + width: 35, + color: "#333", + fontSize: 12, + fontWeight: 600, + }, + threethree: { + // 璁剧疆鐧惧垎姣旇繖涓€鍒楃殑鏍峰紡 + width: 20, + color: "#333", + fontSize: 12, + }, + }, + }, + formatter: (name) => { + // formatter鏍煎紡鍖栧嚱鏁板姩鎬佸憟鐜版暟鎹� + var total = 0; // 鐢ㄤ簬璁$畻鎬绘暟 + var target; // 閬嶅巻鎷垮埌鏁版嵁 + for (var i = 0; i < this.cricleData.length; i++) { + total += this.cricleData[i].value; + if (this.cricleData[i].name == name) { + target = this.cricleData[i].value; + } + } + var v = ((target / total) * 100).toFixed(2); + return `{oneone|${name}}`; + // 瀵屾枃鏈涓€鍒楁牱寮忓簲鐢� 瀵屾枃鏈浜屽垪鏍峰紡搴旂敤 瀵屾枃鏈涓夊垪鏍峰紡搴旂敤 + }, + }, + series: [ + { + type: "pie", + // avoidLabelOverlap: false, + left: "-25%", + top: "10%", + label: { + normal: { + show: true, + position: "outside", + rich: { + // 閫氳繃瀵屾枃鏈瑀ich缁欐瘡涓」璁剧疆鏍峰紡锛屼笅闈㈢殑oneone銆乼wotwo銆乼hreethree鍙互鐞嗚В涓�"姣忎竴鍒�"鐨勬牱寮� + async: { + width: 50, + color: "#000000", + fontSize: 12, + fontWeight: "bolder", + }, + hr: { + width: 35, + color: "#333", + fontSize: 12, + fontWeight: 600, + }, + per: { + // 璁剧疆鐧惧垎姣旇繖涓€鍒楃殑鏍峰紡 + width: 20, + color: "#333", + fontSize: 12, + }, + }, + formatter: "{per|{d}%}", + }, + }, + labelLine: { + show: true, + }, + data: this.cricleData, + }, + ], + }); + }, - methods: {}, + drawRecordPie() { + let xData = ["鏈紑濮�", "杩涜涓�", "宸插畬缁�", "鍏ㄩ儴闂嵎"]; + let yData = [2, 8, 116, 126]; + let colorList = ["#97e7ff", "#75f5ff", "#00deff", "#0093ff", "#2a5fcf"]; + let visualMapPiecesData = []; + // visualMap: { + // pieces: [ + // { value: 123, label: '123锛堣嚜瀹氫箟鐗规畩棰滆壊锛�', color: 'grey' } + // ] + // } + for (var i = 0; i < xData.length; i++) { + visualMapPiecesData.push({ + value: yData[i], + label: xData[i], + color: colorList[i], + }); + } + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById("recordPie")); + myChart.setOption({ + title: { + text: "缁╂晥瑙勫垯鍒嗗竷鎯呭喌", + textStyle: { + fontSize: 18, + }, + }, + tooltip: { + trigger: "item", + }, + + polar: { + radius: [0, "90%"], + center: ["50%", "55%"], + }, + angleAxis: { + show: false, // 闅愯棌鍒诲害 + max: 180, + startAngle: 90, + }, + radiusAxis: { + show: true, + type: "category", + data: xData, + }, + + visualMap: { + top: 40, + x: "left", + orient: "vertical", + textStyle: { + color: "#000", + }, + pieces: visualMapPiecesData, + outOfRange: { + color: "#999", + }, + }, + series: [ + { + type: "bar", + data: yData, + coordinateSystem: "polar", + itemStyle: { + normal: { + // 瀹氬埗鏄剧ず锛堟寜椤哄簭锛� + color: function(params) { + return colorList[params.dataIndex]; + }, + }, + }, + }, + ], + }); + }, + }, }; </script> @@ -393,6 +815,21 @@ export default { height: 100%; text-align: center; padding: 40px 30px 10px 30px; + /deep/.el-radio-button { + width: 150px; + text-align: center; + border: 1px solid #eee; + } + /deep/.el-radio-button__inner { + width: 150px; + } + /deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner { + width: 150px; + border: none; + background: #1890ff; + color: #fff; + border: 1px solid #eee; + } .form { width: 70%; margin: 0 auto; @@ -411,6 +848,7 @@ export default { background: #fff; border-radius: 8px; padding: 10px; + overflow: hidden; .title { font-weight: 600; margin-bottom: 5px; diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/components/AttendIndex.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/components/AttendIndex.vue new file mode 100644 index 0000000000000000000000000000000000000000..2ace54f1061b305c26b64c476685e8922195c8c5 --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/components/AttendIndex.vue @@ -0,0 +1,172 @@ +<template> + <div class="attend_page"> + <div class="left_box"> + <h3>鍒嗙被绠$悊</h3> + <el-button type="primary" style="margin:20px 0" @click="addCate"> + + 鏂板鍒嗙被</el-button + > + <div class="left_content"> + <div + :class="index == i ? 'category_box check' : 'category_box'" + v-for="(val, i) in dataArr" + :key="i" + @click="handleClick(val, i)" + > + <span>{{ val.name }}</span> + <div> + <i class="el-icon-edit-outline"></i> + <i class="el-icon-delete"></i> + </div> + </div> + </div> + </div> + <div class="right_box"> + <h3>瑙勫垯绠$悊</h3> + <div class="search_box"> + <el-button type="primary" style="margin:20px 0" @click="addRules"> + + 鏂板瑙勫垯</el-button + > + <div class="search"> + <el-input + placeholder="璇疯緭鍏ヨ€冩牳鍐呭鍏抽敭瀛楁悳绱�" + style="width: 300px;margin-right: 10px;" + ></el-input> + <el-button type="primary"> 鎼滅储 </el-button> + </div> + </div> + <div class="table_box"></div> + </div> + <drawer-show ref="drawerform" @ok="getData" /> + <dialog-show ref="dialogform" @ok="getData" /> + </div> +</template> + +<script> +import drawerShow from "../drawershow"; +import dialogShow from "../dialogshow"; + +export default { + name: "AdminAttendIndex", + components: { + drawerShow, + dialogShow, + }, + data() { + return { + index: -1, + dataArr: [ + { + name: "宸ヤ綔绾緥", + }, + ], + }; + }, + + mounted() {}, + + methods: { + handleClick(val, i) { + this.index = i; + }, + addRules() { + this.$refs.drawerform.add(); + }, + addCate() { + this.$refs.dialogform.add(); + }, + }, +}; +</script> + +<style lang="less" scoped> +.attend_page { + width: 100%; + height: 100%; + display: flex; + h3 { + border-width: 0px; + display: flex; + font-family: "寰蒋闆呴粦 Bold", "寰蒋闆呴粦 Regular", "寰蒋闆呴粦", sans-serif; + font-weight: 700; + font-style: normal; + } + .left_box { + width: 344px; + height: 735px; + background-color: rgba(242, 247, 249, 0.447058823529412); + border: none; + border-radius: 8px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; + font-family: "寰蒋闆呴粦", sans-serif; + font-weight: 400; + font-style: normal; + padding: 20px; + + .left_content { + width: 100%; + height: 600px; + overflow-y: auto; + .category_box { + display: flex; + justify-content: space-between; + align-items: center; + border-width: 0px; + width: 304px; + height: 48px; + background: inherit; + background: #ffffff; + border: none; + border-radius: 4px; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; + font-family: "寰蒋闆呴粦", sans-serif; + font-weight: 400; + font-style: normal; + font-size: 14px; + color: #000; + text-align: left; + padding: 0 10px; + border: 1px solid #ddd; + + &:hover { + background-color: rgba(22, 202, 122, 1); + color: #ffffff; + border: none; + } + i { + font-style: normal; + font-size: 18px; + margin: 0 5px; + cursor: pointer; + } + } + .check { + background-color: rgba(22, 202, 122, 1); + color: #ffffff; + border: none; + } + } + } + .right_box { + flex: 1; + padding: 20px; + .search_box { + width: 100%; + height: 60px; + display: flex; + justify-content: space-between; + align-items: center; + } + .table_box { + width: 100%; + height: 100%; + } + } +} +</style> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/dialogshow.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/dialogshow.vue new file mode 100644 index 0000000000000000000000000000000000000000..80aba7d33db81a8e53280b1b1a1b7966cf517d8c --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/dialogshow.vue @@ -0,0 +1,134 @@ +<template> + <!-- 寮瑰嚭妗嗚〃鍗� --> + <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-row> + <Field + label="缁╂晥瑙勫垯id" + prop="ruleId" + v-model="form.ruleId" + placeholder="璇疯緭鍏ョ哗鏁堣鍒檌d" + /> + <Field + label="瑙勫垯绠€绉�" + prop="ruleBrief" + v-model="form.ruleBrief" + placeholder="璇疯緭鍏ヨ鍒欑畝绉�" + /> + <Field + label="鍒嗙被鍚嶇О" + prop="name" + v-model="form.name" + placeholder="璇疯緭鍏ュ垎绫诲悕绉�" + /> + <Field + label="瑙勫垯绫诲瀷" + prop="type" + v-model="form.type" + type="select" + :enumData="dict.type" + placeholder="璇烽€夋嫨瑙勫垯绫诲瀷" + /> + <Field + label="澶囨敞" + prop="remark" + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ娉�" + /> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button + type="primary" + v-if="pageInfo.type !== 'view'" + @click="submitForm" + >纭� 瀹�</el-button + > + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> +</template> + +<script> +import form from "@/assets/mixins/formdialog"; +import dialogShow from "./dialogshow"; +export default { + mixins: [form], + components: { + dialogShow, + }, + data() { + return { + // 閬僵灞� + loading: true, + // 寮瑰嚭灞傛爣棰� + title: "缁╂晥瑙勫垯鍒嗙被淇℃伅", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + toString: ["type"], + // 琛ㄥ崟鏍¢獙 + rules: {}, + }; + }, + + methods: { + /** 缂栬緫 */ + edit(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/category/edit"; + this.getData(); + this.pageInfo.type = "edit"; + this.title = "淇敼缁╂晥瑙勫垯鍒嗙被淇℃伅"; + }, + /** 鏂板 */ + add(row) { + this.reset(); + this.urls.currUrl = "perform/rules/category/add"; + this.getData(); + this.pageInfo.type = "add"; + this.title = "鏂板缁╂晥瑙勫垯鍒嗙被淇℃伅"; + }, + /** 鏌ョ湅*/ + view(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/category/view"; + this.getData(); + this.pageInfo.type = "view"; + this.title = "缁╂晥瑙勫垯鍒嗙被淇℃伅璇︾粏"; + }, + /**鍙栨秷鎸夐挳 */ + cancel() { + this.open = false; + }, + /**鑾峰彇鏁版嵁鍚庡脊妗� */ + afterRender(data) { + this.open = true; + }, + + afterSubmit(data) { + this.open = false; + this.$emit("ok"); + }, + + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + ruleId: null, + ruleBrief: "", + name: "", + type: 1, + remark: "", + }; + this.resetForm("form"); + }, + resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } + }, + }, +}; +</script> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue index ef8ccaf2f0ba23c14443ecdd29e8da3a8bd3473d..4c2ca172e0fa2d2707aee6469355ecfde8f91ac2 100644 --- a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/drawershow.vue @@ -1,133 +1,181 @@ <template> - <!-- 寮瑰嚭妗嗚〃鍗� --> - <el-drawer - :title="title" - :visible.sync="open" - :direction="direction" - size="50%"> - <el-form ref="form" :model="form" :rules="rules" label-width="120px"> - <el-row> - <Field :span="20" label="鍒嗙被" prop="categoryId" v-model="form.categoryId" :enumData="dict.categoryId" type="select" placeholder="璇烽€夋嫨鍒嗙被"/> + <!-- 寮瑰嚭妗嗚〃鍗� --> + <el-drawer + :title="title" + :visible.sync="open" + :direction="direction" + size="50%" + > + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-row> + <Field + :span="20" + label="鍒嗙被" + prop="categoryId" + v-model="form.categoryId" + :enumData="dict.categoryId" + type="select" + placeholder="璇烽€夋嫨鍒嗙被" + /> - <Field :span="20" label="鑰冩牳鍐呭绠€绉�" prop="name" v-model="form.name" placeholder="璇疯緭鍏ヨ€冩牳鍐呭绠€绉�"/> - <Field :span="20" label="璇勫垎鏍囧噯" prop="content" v-model="form.content" type="textarea" placeholder="璇疯緭鍏ヨ瘎鍒嗘爣鍑�"/> - <Field :span="20" label="澧炲噺绫诲瀷" prop="subAddType" v-model="form.subAddType" type="select" :enumData="dict.subAddType" placeholder="璇烽€夋嫨澧炲噺绫诲瀷"/> - <Field :span="20" label="鎵e垎" prop="score" v-model="form.score" placeholder="璇疯緭鍏ユ墸鍒嗘垨澧炲姞鍒嗗€�"/> - <Field :span="20" label="鍏宠仈璐熻矗浜�" prop="assoOwner" v-model="form.assoOwner" type="radio" :enumData="dict.assoOwner" placeholder="璇烽€夋嫨鏄惁鍏宠仈璐熻矗浜�"/> - <Field :span="20" v-if="form.assoOwner==1" label="璐熻矗浜烘墸鍒�" prop="ownerScore" v-model="form.ownerScore" placeholder="璇疯緭鍏ヨ礋璐d汉鎵e垎鎴栧鍔犲垎鍊�"/> - <Field :span="20" label="澶囨敞" prop="remark" v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ娉�"/> + <Field + :span="20" + label="鑰冩牳鍐呭绠€绉�" + prop="name" + v-model="form.name" + placeholder="璇疯緭鍏ヨ€冩牳鍐呭绠€绉�" + /> + <Field + :span="20" + label="璇勫垎鏍囧噯" + prop="content" + v-model="form.content" + type="textarea" + placeholder="璇疯緭鍏ヨ瘎鍒嗘爣鍑�" + /> + <Field + :span="20" + label="澧炲噺绫诲瀷" + prop="subAddType" + v-model="form.subAddType" + type="select" + :enumData="dict.subAddType" + placeholder="璇烽€夋嫨澧炲噺绫诲瀷" + /> + <Field + :span="20" + label="鎵e垎" + prop="score" + v-model="form.score" + placeholder="璇疯緭鍏ユ墸鍒嗘垨澧炲姞鍒嗗€�" + /> + <Field + :span="20" + label="鍏宠仈璐熻矗浜�" + prop="assoOwner" + v-model="form.assoOwner" + type="radio" + :enumData="dict.assoOwner" + placeholder="璇烽€夋嫨鏄惁鍏宠仈璐熻矗浜�" + /> + <Field + :span="20" + v-if="form.assoOwner == 1" + label="璐熻矗浜烘墸鍒�" + prop="ownerScore" + v-model="form.ownerScore" + placeholder="璇疯緭鍏ヨ礋璐d汉鎵e垎鎴栧鍔犲垎鍊�" + /> + <Field + :span="20" + label="澶囨敞" + prop="remark" + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ娉�" + /> + </el-row> - - </el-row> - - <form-buttons v-if="pageInfo.type!='view'" @submit='submitForm' noCancelBtn /> - </el-form> - - </el-drawer> + <form-buttons + v-if="pageInfo.type != 'view'" + @submit="submitForm" + noCancelBtn + /> + </el-form> + </el-drawer> </template> <script> - import form from "@/assets/mixins/formdialog"; - export default { - name: "PerformRulesDetail", - mixins: [form], - components: { - - }, - created() { - - }, - data() { - return { - // 閬僵灞� - loading: true, - // 寮瑰嚭灞傛爣棰� - title: "缁╂晥瑙勫垯淇℃伅", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - direction:"rtl", - toString:[ - "subAddType", - "assoOwner", - "type", - "categoryId" - ], - toDate:[ - ], - // 琛ㄥ崟鏍¢獙 - rules: { - }, - urls: { - currUrl: "/perform/rules/list", - editUrl: "/perform/rules/edit", - saveUrl: "/perform/rules/save", - }, - }; - }, +import form from "@/assets/mixins/formdialog"; +export default { + name: "PerformRulesDetail", + mixins: [form], + components: {}, + created() {}, + data() { + return { + // 閬僵灞� + loading: true, + // 寮瑰嚭灞傛爣棰� + title: "瑙勫垯", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + direction: "rtl", + toString: ["subAddType", "assoOwner", "type", "categoryId"], + toDate: [], + // 琛ㄥ崟鏍¢獙 + rules: {}, + urls: { + currUrl: "/perform/rules/list", + editUrl: "/perform/rules/edit", + saveUrl: "/perform/rules/save", + }, + }; + }, - methods: { - /** 缂栬緫 */ - edit(row) { - this.reset() - this.query = { id: row.id }; - this.urls.currUrl ="perform/rules/edit"; - this.getData(); - this.pageInfo.type="edit" - this.title = "淇敼缁╂晥瑙勫垯淇℃伅"; - }, - /** 鏂板 */ - add(row) { - this.reset() - this.urls.currUrl = "perform/rules/add"; - this.getData(); - this.pageInfo.type="add" - this.title = "鏂板缁╂晥瑙勫垯淇℃伅"; - }, - /** 鏌ョ湅*/ - view(row) { - this.reset() - this.query = { id: row.id }; - this.urls.currUrl ="perform/rules/view"; - this.getData(); - this.pageInfo.type="view" - this.title = "缁╂晥瑙勫垯淇℃伅璇︾粏"; - }, - /**鍙栨秷鎸夐挳 */ - cancel() { - this.open = false; - }, - /**鑾峰彇鏁版嵁鍚庡脊妗� */ - afterRender(data) { - this.form.type=1 - this.open = true; - }, + methods: { + /** 缂栬緫 */ + edit(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/edit"; + this.getData(); + this.pageInfo.type = "edit"; + this.title = "淇敼瑙勫垯"; + }, + /** 鏂板 */ + add(row) { + this.reset(); + this.urls.currUrl = "perform/rules/add"; + this.getData(); + this.pageInfo.type = "add"; + this.title = "鏂板瑙勫垯"; + }, + /** 鏌ョ湅*/ + view(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/view"; + this.getData(); + this.pageInfo.type = "view"; + this.title = "瑙勫垯淇℃伅璇︾粏"; + }, + /**鍙栨秷鎸夐挳 */ + cancel() { + this.open = false; + }, + /**鑾峰彇鏁版嵁鍚庡脊妗� */ + afterRender(data) { + this.form.type = 1; + this.open = true; + }, - afterSubmit(data) { - this.open = false; - this.$emit("ok"); - }, + afterSubmit(data) { + this.open = false; + this.$emit("ok"); + }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - categoryId : null, - categoryName : "", - name : "", - content : "", - subAddType : 1, - score : 0.00, - assoOwner : 0, - ownerScore : 0.00, - remark : "", - type : 1, - }; - this.resetForm("form"); - }, - resetForm(refName) { - if (this.$refs[refName]) { - this.$refs[refName].resetFields(); - } - }, - }, - }; + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + categoryId: null, + categoryName: "", + name: "", + content: "", + subAddType: 1, + score: 0.0, + assoOwner: 0, + ownerScore: 0.0, + remark: "", + type: 1, + }; + this.resetForm("form"); + }, + resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } + }, + }, +}; </script> diff --git "a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list(\345\216\237\347\273\251\346\225\210\350\247\204\345\210\231).vue" "b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list(\345\216\237\347\273\251\346\225\210\350\247\204\345\210\231).vue" new file mode 100644 index 0000000000000000000000000000000000000000..8733216b00ca39b6758acd279cf73d128e5fd791 --- /dev/null +++ "b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list(\345\216\237\347\273\251\346\225\210\350\247\204\345\210\231).vue" @@ -0,0 +1,84 @@ +<template> + <div class="page"> + <LayoutTable :data="tableData" :config="tableConfig"> </LayoutTable> + + <drawer-show ref="drawerform" @ok="getData" /> + </div> +</template> + +<script> +/** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ +import drawerShow from "./drawershow"; +import table from "@/assets/mixins/table"; +export default { + name: "PerformRulesList", + components: { + drawerShow, + }, + mixins: [table], + created() { + console.log("route", this.$route); + this.changePath("/perform/rules"); + this.query = Object.assign({}, this.query, { type: 1 }); + }, + methods: { + /** 閲嶅啓鏂板鏂规硶 */ + toAdd(row) { + this.$refs.drawerform.add(row); + }, + /** 閲嶅啓缂栬緫鏂规硶 */ + toEdit(row) { + this.$refs.drawerform.edit(row); + }, + /** 閲嶅啓鏌ョ湅鏂规硶 */ + toView(row) { + this.$refs.drawerform.view(row); + }, + }, + data() { + return { + config: { + isshowTabPane: true, + search: [], + columns: [ + { type: "selection", width: 60 }, + { type: "index", label: "搴忓彿", width: 50 }, + + { label: "鍒嗙被", prop: "categoryId", formatter: this.formatter }, + { label: "鑰冩牳鍚嶇О", prop: "name" }, + + { label: "璇勫垎鏍囧噯", prop: "content" }, + + { label: "澧炲噺绫诲瀷", prop: "subAddType", formatter: this.formatter }, + + { label: "鍒嗗€�", prop: "score" }, + + { label: "璐熻矗浜哄垎鍊�", prop: "ownerScore" }, + + { + label: "鍒涘缓鐢ㄦ埛", + prop: "createUserId", + formatter: this.formatter, + }, + { + label: "鎿嶄綔", + width: 240, + formatter: (row) => { + return ( + <table-buttons + noAdd + noDel + row={row} + onEdit={this.toEdit} + onView={this.toView} + onDel={this.toDel} + /> + ); + }, + }, + ], + }, + }; + }, +}; +</script> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list.vue index c63ce963a6a257a65edf3d68e1f0db93ca0f2831..44bde8c2a4ea13eb1f0cdde2c7182857e2af9085 100644 --- a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list.vue +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/list.vue @@ -1,77 +1,52 @@ <template> - <div class="page"> - <LayoutTable :data="tableData" :config="tableConfig"> - </LayoutTable> - - - <drawer-show ref="drawerform" @ok="getData" /> - </div> + <div class="page"> + <el-tabs v-model="activeName" @tab-click="handleClick"> + <el-tab-pane label="鑰冨嫟缁╂晥鎸囨爣" name="1"> + <attend-index /> + </el-tab-pane> + <el-tab-pane label="璇勪环缁╂晥鎸囨爣" name="2"> + <attend-index /> + </el-tab-pane> + <el-tab-pane label="鍔炰欢缁╂晥鎸囨爣" name="3"> + <attend-index /> + </el-tab-pane> + <el-tab-pane label="鏁堣兘缁╂晥鎸囨爣" name="4"> + <attend-index /> + </el-tab-pane> + <el-tab-pane label="鍏朵粬缁╂晥鎸囨爣" name="5"> + <attend-index /> + </el-tab-pane> + </el-tabs> + </div> </template> <script> - /** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ - import drawerShow from "./drawershow"; - import table from "@/assets/mixins/table"; - export default { - name: "PerformRulesList", - components: { - drawerShow -}, - mixins: [table], - created() { - console.log("route",this.$route) - this.changePath("/perform/rules") - this.query = Object.assign({}, this.query, {type:1}); - }, - methods: { - /** 閲嶅啓鏂板鏂规硶 */ - toAdd(row) { - this.$refs.drawerform.add(row); - }, - /** 閲嶅啓缂栬緫鏂规硶 */ - toEdit(row) { - this.$refs.drawerform.edit(row); - }, - /** 閲嶅啓鏌ョ湅鏂规硶 */ - toView(row) { - this.$refs.drawerform.view(row); - }, - - }, - data() { - return { - config: { - isshowTabPane:true, - search: [ - ], - columns: [ - {type: "selection", width: 60}, - {type: "index",label: "搴忓彿",width: 50}, - - {label: "鍒嗙被", prop: "categoryId", formatter: this.formatter}, - {label: "鑰冩牳鍚嶇О", prop: "name"}, - - {label: "璇勫垎鏍囧噯", prop: "content"}, - - {label: "澧炲噺绫诲瀷", prop: "subAddType",formatter: this.formatter}, - - {label: "鍒嗗€�", prop: "score"}, - - {label: "璐熻矗浜哄垎鍊�", prop: "ownerScore"}, - - {label: "鍒涘缓鐢ㄦ埛", prop: "createUserId", formatter: this.formatter}, - { - label: "鎿嶄綔", - width: 240, - formatter: row => { - return ( - <table-buttons noAdd noDel row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> - ); - } - } - ] - } - }; - } +import AttendIndex from "./components/AttendIndex.vue"; +export default { + name: "PerformRulesList", + components: { AttendIndex }, + created() {}, + methods: { + handleClick(tab, event) { + console.log(tab, event); + }, + }, + data() { + return { + activeName: "1", }; + }, +}; </script> +<style lang="less" scoped> +.page { + width: 100%; + height: 100%; + overflow: hidden; + /deep/.el-tabs__item { + width: 180px; + font-size: 18px; + text-align: center; + } +} +</style> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/view.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/view.vue index 7015db2cbe76afa11e4c5274a416d27aacfdd04d..72a02de54af59b6baa1b30c5bd04a3f9feb4ed97 100644 --- a/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/view.vue +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/attend/view.vue @@ -1,87 +1,123 @@ <template> - <layout-view> - <el-descriptions :title="title" :column="column" :size="size" :colon="false" border> - <template slot="title"> - <i class="el-icon-tickets"></i> - 鍩烘湰璇︾粏淇℃伅 - </template> - <template slot="extra"> - <el-button type="primary" @click="$router.go(-1)" size="small">杩斿洖</el-button> - </template> - <el-descriptions-item label="鍒嗙被id" label-class-name="labelClass" content-class-name="contentClass"> - {{form.categoryId}} - </el-descriptions-item> - <el-descriptions-item label="鍒嗙被鍚嶇О" label-class-name="labelClass" content-class-name="contentClass"> - {{form.categoryName}} - </el-descriptions-item> - <el-descriptions-item label="鑰冩牳鍐呭绠€绉�" label-class-name="labelClass" content-class-name="contentClass"> - {{form.name}} - </el-descriptions-item> - <el-descriptions-item label="璇勫垎鏍囧噯" label-class-name="labelClass" content-class-name="contentClass"> - {{form.content}} - </el-descriptions-item> - <el-descriptions-item label="澧炲噺绫诲瀷" label-class-name="labelClass" content-class-name="contentClass"> - {{ util_formatters("subAddType", form.subAddType) }} - </el-descriptions-item> - <el-descriptions-item label="鎵e垎鎴栧鍔犲垎鍊�" label-class-name="labelClass" content-class-name="contentClass"> - {{form.score}} - </el-descriptions-item> - <el-descriptions-item label="鏄惁鍏宠仈璐熻矗浜�" label-class-name="labelClass" content-class-name="contentClass"> - {{ util_formatters("assoOwner", form.assoOwner) }} - </el-descriptions-item> - <el-descriptions-item label="璐熻矗浜烘墸鍒嗘垨澧炲姞鍒嗗€�" label-class-name="labelClass" content-class-name="contentClass"> - {{form.ownerScore}} - </el-descriptions-item> - <el-descriptions-item label="澶囨敞" label-class-name="labelClass" content-class-name="contentClass"> - {{form.remark}} - </el-descriptions-item> - <el-descriptions-item label="瑙勫垯绫诲瀷" label-class-name="labelClass" content-class-name="contentClass"> - {{ util_formatters("type", form.type) }} - </el-descriptions-item> - </el-descriptions> - - </layout-view> + <layout-view> + <el-descriptions + :title="title" + :column="column" + :size="size" + :colon="false" + border + > + <template slot="title"> + <i class="el-icon-tickets"></i> + 鍩烘湰璇︾粏淇℃伅 + </template> + <template slot="extra"> + <el-button type="primary" @click="$router.go(-1)" size="small" + >杩斿洖</el-button + > + </template> + <el-descriptions-item + label="鍒嗙被id" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.categoryId }} + </el-descriptions-item> + <el-descriptions-item + label="鍒嗙被鍚嶇О" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.categoryName }} + </el-descriptions-item> + <el-descriptions-item + label="鑰冩牳鍐呭绠€绉�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.name }} + </el-descriptions-item> + <el-descriptions-item + label="璇勫垎鏍囧噯" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.content }} + </el-descriptions-item> + <el-descriptions-item + label="澧炲噺绫诲瀷" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ util_formatters("subAddType", form.subAddType) }} + </el-descriptions-item> + <el-descriptions-item + label="鎵e垎鎴栧鍔犲垎鍊�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.score }} + </el-descriptions-item> + <el-descriptions-item + label="鏄惁鍏宠仈璐熻矗浜�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ util_formatters("assoOwner", form.assoOwner) }} + </el-descriptions-item> + <el-descriptions-item + label="璐熻矗浜烘墸鍒嗘垨澧炲姞鍒嗗€�" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.ownerScore }} + </el-descriptions-item> + <el-descriptions-item + label="澶囨敞" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ form.remark }} + </el-descriptions-item> + <el-descriptions-item + label="瑙勫垯绫诲瀷" + label-class-name="labelClass" + content-class-name="contentClass" + > + {{ util_formatters("type", form.type) }} + </el-descriptions-item> + </el-descriptions> + </layout-view> </template> <script> - import view from "@/assets/mixins/view"; - export default { - mixins: [view], - components: { - }, - methods: { - - }, - data() { - return { - size:"small", - column:2, - toString:[ - "subAddType", - "assoOwner", - "type", - ], - toArrays: [ - - ], - toDate: [ - - ] - } - } - } +import view from "@/assets/mixins/view"; +export default { + mixins: [view], + components: {}, + methods: {}, + data() { + return { + size: "small", + column: 2, + toString: ["subAddType", "assoOwner", "type"], + toArrays: [], + toDate: [], + }; + }, +}; </script> <style lang="less"> - .labelClass{ - width: 200px; - } - .el-descriptions__body{ - margin-left: 5px; - margin-right: 5px; - color: #606266; - background-color: #FFF; - } - .contentClass{ - width: 600px; - } -</style> \ No newline at end of file +.labelClass { + width: 200px; +} +.el-descriptions__body { + margin-left: 5px; + margin-right: 5px; + color: #606266; + background-color: #fff; +} +.contentClass { + width: 600px; +} +</style> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/category/dialogshow.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/category/dialogshow.vue index 22acf861dd8ea60ac744642c909aa067ef045194..80aba7d33db81a8e53280b1b1a1b7966cf517d8c 100644 --- a/attendance-performance-manager-ui/admin/src/views/perform/rules/category/dialogshow.vue +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/category/dialogshow.vue @@ -1,106 +1,134 @@ <template> - <!-- 寮瑰嚭妗嗚〃鍗� --> - <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="120px"> - <el-row> - <Field label="缁╂晥瑙勫垯id" prop="ruleId" v-model="form.ruleId" placeholder="璇疯緭鍏ョ哗鏁堣鍒檌d"/> - <Field label="瑙勫垯绠€绉�" prop="ruleBrief" v-model="form.ruleBrief" placeholder="璇疯緭鍏ヨ鍒欑畝绉�"/> - <Field label="鍒嗙被鍚嶇О" prop="name" v-model="form.name" placeholder="璇疯緭鍏ュ垎绫诲悕绉�"/> - <Field label="瑙勫垯绫诲瀷" prop="type" v-model="form.type" type="select" :enumData="dict.type" placeholder="璇烽€夋嫨瑙勫垯绫诲瀷"/> - <Field label="澶囨敞" prop="remark" v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ娉�"/> - - </el-row> - - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> + <!-- 寮瑰嚭妗嗚〃鍗� --> + <el-dialog :title="title" :visible.sync="open" width="90%" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> + <el-row> + <Field + label="缁╂晥瑙勫垯id" + prop="ruleId" + v-model="form.ruleId" + placeholder="璇疯緭鍏ョ哗鏁堣鍒檌d" + /> + <Field + label="瑙勫垯绠€绉�" + prop="ruleBrief" + v-model="form.ruleBrief" + placeholder="璇疯緭鍏ヨ鍒欑畝绉�" + /> + <Field + label="鍒嗙被鍚嶇О" + prop="name" + v-model="form.name" + placeholder="璇疯緭鍏ュ垎绫诲悕绉�" + /> + <Field + label="瑙勫垯绫诲瀷" + prop="type" + v-model="form.type" + type="select" + :enumData="dict.type" + placeholder="璇烽€夋嫨瑙勫垯绫诲瀷" + /> + <Field + label="澶囨敞" + prop="remark" + v-model="form.remark" + type="textarea" + placeholder="璇疯緭鍏ュ娉�" + /> + </el-row> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button + type="primary" + v-if="pageInfo.type !== 'view'" + @click="submitForm" + >纭� 瀹�</el-button + > + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> </template> <script> - import form from "@/assets/mixins/formdialog"; - import dialogShow from "./dialogshow"; - export default { - mixins: [form], - components: { - dialogShow , - }, - data() { - return { - // 閬僵灞� - loading: true, - // 寮瑰嚭灞傛爣棰� - title: "缁╂晥瑙勫垯鍒嗙被淇℃伅", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - toString:[ - "type", - ], - // 琛ㄥ崟鏍¢獙 - rules: { - } - }; - }, +import form from "@/assets/mixins/formdialog"; +import dialogShow from "./dialogshow"; +export default { + mixins: [form], + components: { + dialogShow, + }, + data() { + return { + // 閬僵灞� + loading: true, + // 寮瑰嚭灞傛爣棰� + title: "缁╂晥瑙勫垯鍒嗙被淇℃伅", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + toString: ["type"], + // 琛ㄥ崟鏍¢獙 + rules: {}, + }; + }, - methods: { - /** 缂栬緫 */ - edit(row) { - this.reset() - this.query = { id: row.id }; - this.urls.currUrl ="perform/rules/category/edit"; - this.getData(); - this.pageInfo.type="edit" - this.title = "淇敼缁╂晥瑙勫垯鍒嗙被淇℃伅"; - }, - /** 鏂板 */ - add(row) { - this.reset() - this.urls.currUrl = "perform/rules/category/add"; - this.getData(); - this.pageInfo.type="add" - this.title = "鏂板缁╂晥瑙勫垯鍒嗙被淇℃伅"; - }, - /** 鏌ョ湅*/ - view(row) { - this.reset() - this.query = { id: row.id }; - this.urls.currUrl ="perform/rules/category/view"; - this.getData(); - this.pageInfo.type="view" - this.title = "缁╂晥瑙勫垯鍒嗙被淇℃伅璇︾粏"; - }, - /**鍙栨秷鎸夐挳 */ - cancel() { - this.open = false; - }, - /**鑾峰彇鏁版嵁鍚庡脊妗� */ - afterRender(data) { - this.open = true; - }, + methods: { + /** 缂栬緫 */ + edit(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/category/edit"; + this.getData(); + this.pageInfo.type = "edit"; + this.title = "淇敼缁╂晥瑙勫垯鍒嗙被淇℃伅"; + }, + /** 鏂板 */ + add(row) { + this.reset(); + this.urls.currUrl = "perform/rules/category/add"; + this.getData(); + this.pageInfo.type = "add"; + this.title = "鏂板缁╂晥瑙勫垯鍒嗙被淇℃伅"; + }, + /** 鏌ョ湅*/ + view(row) { + this.reset(); + this.query = { id: row.id }; + this.urls.currUrl = "perform/rules/category/view"; + this.getData(); + this.pageInfo.type = "view"; + this.title = "缁╂晥瑙勫垯鍒嗙被淇℃伅璇︾粏"; + }, + /**鍙栨秷鎸夐挳 */ + cancel() { + this.open = false; + }, + /**鑾峰彇鏁版嵁鍚庡脊妗� */ + afterRender(data) { + this.open = true; + }, - afterSubmit(data) { - this.open = false; - this.$emit("ok"); - }, + afterSubmit(data) { + this.open = false; + this.$emit("ok"); + }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { - ruleId : null, - ruleBrief : "", - name : "", - type : 1, - remark : "", - }; - this.resetForm("form"); - }, - resetForm(refName) { - if (this.$refs[refName]) { - this.$refs[refName].resetFields(); - } - }, - }, - }; + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + ruleId: null, + ruleBrief: "", + name: "", + type: 1, + remark: "", + }; + this.resetForm("form"); + }, + resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields(); + } + }, + }, +}; </script> diff --git a/attendance-performance-manager-ui/admin/src/views/perform/rules/category/list.vue b/attendance-performance-manager-ui/admin/src/views/perform/rules/category/list.vue index 50ec5af8fa40945850b6a1bb5c67591e2ff36902..f02e02a0637098b95b3d4c1af443c0d8963c1867 100644 --- a/attendance-performance-manager-ui/admin/src/views/perform/rules/category/list.vue +++ b/attendance-performance-manager-ui/admin/src/views/perform/rules/category/list.vue @@ -1,66 +1,71 @@ <template> - <div class="page"> - <LayoutTable :data="tableData" :config="tableConfig"> - </LayoutTable> + <div class="page"> + <LayoutTable :data="tableData" :config="tableConfig"> </LayoutTable> - - <dialog-show ref="dialogform" @ok="getData" /> - </div> + <dialog-show ref="dialogform" @ok="getData" /> + </div> </template> <script> - /** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ - import dialogShow from "./dialogshow"; - import table from "@/assets/mixins/table"; - export default { - name: "PerformRulesCategoryList", - components: { - dialogShow -}, - mixins: [table], - created() { - }, - methods: { - /** 閲嶅啓鏂板鏂规硶 */ - toAdd(row) { - this.$refs.dialogform.add(row); - }, - /** 閲嶅啓缂栬緫鏂规硶 */ - toEdit(row) { - this.$refs.dialogform.edit(row); - }, - /** 閲嶅啓鏌ョ湅鏂规硶 */ - toView(row) { - this.$refs.dialogform.view(row); - }, - - }, - data() { - return { - config: { - isshowTabPane:true, - search: [ - ], - columns: [ - {type: "selection", width: 60}, - {type: "index",label: "搴忓彿",width: 50}, - {label: "鍒嗙被鍚嶇О", prop: "name"}, +/** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ +import dialogShow from "./dialogshow"; +import table from "@/assets/mixins/table"; +export default { + name: "PerformRulesCategoryList", + components: { + dialogShow, + }, + mixins: [table], + created() {}, + methods: { + /** 閲嶅啓鏂板鏂规硶 */ + toAdd(row) { + this.$refs.dialogform.add(row); + }, + /** 閲嶅啓缂栬緫鏂规硶 */ + toEdit(row) { + this.$refs.dialogform.edit(row); + }, + /** 閲嶅啓鏌ョ湅鏂规硶 */ + toView(row) { + this.$refs.dialogform.view(row); + }, + }, + data() { + return { + config: { + isshowTabPane: true, + search: [], + columns: [ + { type: "selection", width: 60 }, + { type: "index", label: "搴忓彿", width: 50 }, + { label: "鍒嗙被鍚嶇О", prop: "name" }, - {label: "瑙勫垯绫诲瀷", prop: "type",formatter: this.formatter}, + { label: "瑙勫垯绫诲瀷", prop: "type", formatter: this.formatter }, - {label: "鍒涘缓鐢ㄦ埛", prop: "createUserId", formatter: this.formatter}, - { - label: "鎿嶄綔", - width: 240, - formatter: row => { - return ( - <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> - ); - } - } - ] - } - }; - } + { + label: "鍒涘缓鐢ㄦ埛", + prop: "createUserId", + formatter: this.formatter, + }, + { + label: "鎿嶄綔", + width: 240, + formatter: (row) => { + return ( + <table-buttons + noAdd + row={row} + onEdit={this.toEdit} + onView={this.toView} + onDel={this.toDel} + /> + ); + }, + }, + ], + }, }; + }, +}; </script> diff --git a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/BarCharts.vue b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/BarCharts.vue new file mode 100644 index 0000000000000000000000000000000000000000..e0079a74a5e88c1a8f4cc16e3acc683e114a8f09 --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/BarCharts.vue @@ -0,0 +1,93 @@ +<template> + <div> + <div :id="id" :style="styleObj"></div> + </div> +</template> + +<script> +export default { + props: { + title: { + type: String, + default: "", + }, + id: { + type: String, + default: "", + }, + legendName: { + type: String, + default: "", + }, + styleObj: { + type: Object, + default: () => {}, + }, + }, + data() { + return {}; + }, + watch: { + title(val) { + console.log(val); + }, + }, + mounted() { + this.drawLine(); + }, + + methods: { + drawLine() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById(this.id)); + // 缁樺埗鍥捐〃 + myChart.setOption({ + title: { + text: this.title, + left: this.legendName == "鏃峰伐鐜�" ? "center" : "left", + textStyle: { + fontSize: this.legendName == "鏃峰伐鐜�" ? 24 : 18, + }, + }, + // legend: { + // orient: "horizontal", + // right: "10px", + // top: "0", + // itemWidth: 20, + // itemHeight: 10, + // icon: "roundRect", + // textStyle: { + // fontSize: "14px", + // color: "#000", + // }, + // }, + tooltip: {}, + xAxis: { + data: ["閮ㄩ棬1", "閮ㄩ棬2", "閮ㄩ棬3", "閮ㄩ棬4", "閮ㄩ棬5", "閮ㄩ棬6"], + }, + grid: { + left: "5%", + right: "4%", + bottom: "2%", + containLabel: true, + }, + yAxis: {}, + series: [ + { + name: this.legendName, + type: "bar", + data: [5, 20, 36, 10, 10, 20], + itemStyle: { + lineStyle: { + type: "dotted", //'dotted'铏氱嚎 'solid'瀹炵嚎 + }, + }, + }, + ], + }); + }, + }, +}; +</script> + +<style lang="less" scoped></style> diff --git a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/LineCharts.vue b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/LineCharts.vue new file mode 100644 index 0000000000000000000000000000000000000000..93909b5abfca18214c7bc1335f086aeac4a275dd --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/LineCharts.vue @@ -0,0 +1,89 @@ +<template> + <div> + <div :id="id" :style="styleObj"></div> + </div> +</template> + +<script> +export default { + props: { + title: { + type: String, + default: "", + }, + id: { + type: String, + default: "", + }, + legendName: { + type: String, + default: "", + }, + styleObj: { + type: Object, + default: () => {}, + }, + }, + data() { + return {}; + }, + watch: { + title(val) { + console.log(val); + }, + }, + mounted() { + this.drawLine(); + }, + + methods: { + drawLine() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById(this.id)); + // 缁樺埗鍥捐〃 + myChart.setOption({ + title: { text: this.title }, + legend: { + orient: "horizontal", + left: "center", + top: "0", + itemWidth: 20, + itemHeight: 10, + icon: "roundRect", + textStyle: { + fontSize: "14px", + color: "#000", + }, + }, + tooltip: {}, + xAxis: { + type: "category", + data: ["閮ㄩ棬1", "閮ㄩ棬2", "閮ㄩ棬3", "閮ㄩ棬4", "閮ㄩ棬5", "閮ㄩ棬6"], + }, + grid: { + left: "3%", + right: "4%", + bottom: "2%", + containLabel: true, + }, + yAxis: {}, + series: [ + { + name: this.legendName, + type: "line", + data: [10, 20, 30, 90, 100, 100, 120], + smooth: true, + // itemStyle: { + // lineStyle: { + // type: "dotted", //'dotted'铏氱嚎 'solid'瀹炵嚎 + // }, + // }, + }, + ], + }); + }, + }, +}; +</script> + +<style lang="less" scoped></style> diff --git a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/PieCharts.vue b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/PieCharts.vue new file mode 100644 index 0000000000000000000000000000000000000000..b31d9a9836cf85ea8d5e9e3e330ed85e0bd08115 --- /dev/null +++ b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/components/PieCharts.vue @@ -0,0 +1,94 @@ +<template> + <div> + <div :id="id" :style="styleObj"></div> + </div> +</template> + +<script> +export default { + props: { + title: { + type: String, + default: "", + }, + id: { + type: String, + default: "", + }, + legendName: { + type: String, + default: "", + }, + styleObj: { + type: Object, + default: () => {}, + }, + }, + data() { + return {}; + }, + watch: { + title(val) { + console.log(val); + }, + }, + mounted() { + this.drawLine(); + }, + + methods: { + drawLine() { + // 鍩轰簬dom锛屽垵濮嬪寲echarts瀹炰緥 + let myChart = this.$echarts.init(document.getElementById(this.id)); + // 缁樺埗鍥捐〃 + myChart.setOption({ + title: { text: this.title }, + legend: { + orient: "vertical", + left: "right", + bottom: "0", + itemWidth: 20, + itemHeight: 10, + icon: "roundRect", + textStyle: { + fontSize: "14px", + color: "#000", + }, + }, + tooltip: { + trigger: "item", + }, + + grid: { + left: "3%", + right: "4%", + containLabel: true, + }, + series: [ + { + name: this.legendName, + type: "pie", + radius: "65%", + data: [ + { value: 1048, name: "閮ㄩ棬1" }, + { value: 735, name: "閮ㄩ棬2" }, + { value: 580, name: "閮ㄩ棬3" }, + { value: 484, name: "閮ㄩ棬4" }, + { value: 300, name: "閮ㄩ棬5" }, + ], + emphasis: { + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: "rgba(0, 0, 0, 0.5)", + }, + }, + }, + ], + }); + }, + }, +}; +</script> + +<style lang="less" scoped></style> diff --git "a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list(\345\216\237\347\273\251\346\225\210\347\233\256\346\240\207).vue" "b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list(\345\216\237\347\273\251\346\225\210\347\233\256\346\240\207).vue" new file mode 100644 index 0000000000000000000000000000000000000000..095ca0e90751900190c8999e7f5d4091e50bdd11 --- /dev/null +++ "b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list(\345\216\237\347\273\251\346\225\210\347\233\256\346\240\207).vue" @@ -0,0 +1,83 @@ +<template> + <div class="page"> + <LayoutTable :data="tableData" :config="tableConfig"> + </LayoutTable> + + + <drawer-show ref="drawerform" @ok="getData" /> + </div> +</template> + +<script> + /** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ + import drawerShow from "./drawershow"; + import table from "@/assets/mixins/table"; + export default { + name: "StaffPerformStatList", + components: { + drawerShow +}, + mixins: [table], + created() { + }, + methods: { + /** 閲嶅啓鏂板鏂规硶 */ + toAdd(row) { + this.$refs.drawerform.add(row); + }, + /** 閲嶅啓缂栬緫鏂规硶 */ + toEdit(row) { + this.$refs.drawerform.edit(row); + }, + /** 閲嶅啓鏌ョ湅鏂规硶 */ + toView(row) { + this.$refs.drawerform.view(row); + }, + + }, + data() { + return { + config: { + isshowTabPane:true, + search: [ + ], + columns: [ + {type: "selection", width: 60}, + {type: "index",label: "搴忓彿",width: 50}, + + {label: "閮ㄩ棬鍚嶇О", prop: "deptName"}, + + {label: "鑰冨嫟缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "attendScoreAdd", formatter: this.formatter}, + + {label: "鑰冨嫟缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "attendScoreSub", formatter: this.formatter}, + + {label: "璇勪环缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "assessScoreAdd", formatter: this.formatter}, + + {label: "璇勪环缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "assessScoreSub", formatter: this.formatter}, + + {label: "鍔炰欢缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "workScoreAdd", formatter: this.formatter}, + + {label: "鍔炰欢缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "workScoreSub", formatter: this.formatter}, + + {label: "鏁堣兘缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "effectScoreAdd", formatter: this.formatter}, + + {label: "鏁堣兘缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "effectScoreSub", formatter: this.formatter}, + + {label: "鍏跺畠缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "otherScoreAdd", formatter: this.formatter}, + + {label: "鍏跺畠缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "otherScoreSub", formatter: this.formatter}, + { + label: "鎿嶄綔", + width: 240, + formatter: row => { + return ( + <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> + ); + } + } + ] + } + }; + } + }; +</script> diff --git a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue index 095ca0e90751900190c8999e7f5d4091e50bdd11..f9fce00600c567c804ae4d4aac170b01f339afd9 100644 --- a/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue +++ b/attendance-performance-manager-ui/admin/src/views/staff/perform/stat/list.vue @@ -1,83 +1,392 @@ <template> - <div class="page"> - <LayoutTable :data="tableData" :config="tableConfig"> - </LayoutTable> - - - <drawer-show ref="drawerform" @ok="getData" /> - </div> + <div class="page"> + <el-tabs v-model="activeName" @tab-click="handleClick"> + <el-tab-pane label="鐩爣鐪嬫澘" name="1"> + <div class="content"> + <div class="top"> + <el-radio-group v-model="type"> + <el-radio-button label="1">鎸夐儴闂�</el-radio-button> + <el-radio-button label="2">鎸変釜浜�</el-radio-button> + </el-radio-group> + </div> + <div class="mid"> + <div class="mid_top"> + <div class="jixiaozongfen"> + <bar-charts + :title="'缁╂晥鎬诲垎鎺掑悕'" + :id="'jixiaozongfen'" + :legendName="'缁╂晥鎬诲垎'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + <div class="jixiaopingjunfen"> + <line-charts + :title="'缁╂晥骞冲潎鍒嗘帓鍚�'" + :id="'jixiaopingjunfen'" + :legendName="'缁╂晥骞冲潎鍒�'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + </div> + <div class="mid_down"> + <div class="top_10 box"> + <bar-charts + :title="'閮ㄩ棬鍔犲垎鎺掑悕TOP10'" + :id="'top_10'" + :legendName="'閮ㄩ棬鍔犲垎鍒嗗€�'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + <div class="jiafen box"> + <pie-charts + :title="'閮ㄩ棬鍔犲垎鏁翠綋鍒嗗竷'" + :id="'jiafen'" + :legendName="'閮ㄩ棬鍔犲垎'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + <div class="koufen_10 box"> + <bar-charts + :title="'閮ㄩ棬鎵e垎鎺掑悕TOP10'" + :id="'koufen_10'" + :legendName="'閮ㄩ棬鎵e垎鍒嗗€�'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + <div class="koufen box"> + <pie-charts + :title="'閮ㄩ棬鎵e垎鏁翠綋鍒嗗竷'" + :id="'koufen'" + :legendName="'閮ㄩ棬鎵e垎'" + :styleObj="{ width: '100%', height: '300px' }" + /> + </div> + </div> + </div> + </div> + </el-tab-pane> + <el-tab-pane label="鐩爣瀵归綈" name="2"> + <div class="content"> + <div class="top search_top"> + <el-radio-group v-model="type"> + <el-radio-button label="1">鎸夐儴闂�</el-radio-button> + <el-radio-button label="2">鎸変釜浜�</el-radio-button> + </el-radio-group> + <div class="search_box"> + <el-select v-model="value" placeholder="璇烽€夋嫨"> + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + <el-select + v-model="value" + placeholder="璇烽€夋嫨" + style="margin: 0 10px;" + > + <el-option + v-for="item in optionsMonths" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + <el-button type="primary">鎼滅储</el-button> + </div> + </div> + <div class="bar_content"> + <bar-charts + :title="'鍚勯儴闂�1鏈堟椃宸ョ巼瀵归綈鎯呭喌'" + :id="'bar_content'" + :legendName="'鏃峰伐鐜�'" + :styleObj="{ width: '1800px', height: '650px' }" + /> + </div> + </div> + </el-tab-pane> + <el-tab-pane label="鐩爣绠$悊" name="3"> + <div class="content"> + <div class="top"> + <el-radio-group v-model="type"> + <el-radio-button label="1">鎸夐儴闂�</el-radio-button> + <el-radio-button label="2">鎸変釜浜�</el-radio-button> + </el-radio-group> + <el-button type="primary" style="margin: 0 20px;"> + + 鍒涘缓鐩爣</el-button + > + </div> + <div class="mid_content"> + <div class="goal_box"> + <div class="goal_title"> + <img src="../../../../assets/images/u17641.svg" alt="" /> + <span> + 鏃峰伐鐜囦笉楂樹簬10% + </span> + </div> + <p class="goal_txt"> + <span>鐩爣閮ㄩ棬锛�</span><span>鍏ㄩ儴閮ㄩ棬</span> + </p> + <p class="goal_txt"><span>鍛ㄦ湡锛�</span><span>鍏ㄩ儴閮ㄩ棬</span></p> + <p class="goal_txt"><span>璐熻矗浜猴細</span><span>鍏ㄩ儴閮ㄩ棬</span></p> + <p class="goal_txt"> + <span>鏈€杩戞洿鏂帮細</span><span>鍏ㄩ儴閮ㄩ棬</span> + </p> + <p class="goal_txt"> + <span>鏇存柊浜哄憳锛�</span><span>鍏ㄩ儴閮ㄩ棬</span> + </p> + <div class="button_box"> + <el-button type="primary" style="width: 150px;" plain + >缂栬緫</el-button + > + <el-button type="danger" style="width: 150px;" plain + >鍒犻櫎</el-button + > + </div> + </div> + </div> + </div> + </el-tab-pane> + </el-tabs> + </div> </template> <script> - /** 琛ㄥ崟寮瑰嚭妗嗘ā寮忛渶寮曞叆 */ - import drawerShow from "./drawershow"; - import table from "@/assets/mixins/table"; - export default { - name: "StaffPerformStatList", - components: { - drawerShow -}, - mixins: [table], - created() { - }, - methods: { - /** 閲嶅啓鏂板鏂规硶 */ - toAdd(row) { - this.$refs.drawerform.add(row); - }, - /** 閲嶅啓缂栬緫鏂规硶 */ - toEdit(row) { - this.$refs.drawerform.edit(row); - }, - /** 閲嶅啓鏌ョ湅鏂规硶 */ - toView(row) { - this.$refs.drawerform.view(row); - }, +import BarCharts from "./components/BarCharts.vue"; +import LineCharts from "./components/LineCharts.vue"; +import PieCharts from "./components/PieCharts.vue"; +export default { + components: { + BarCharts, + PieCharts, + LineCharts, + }, + name: "StaffPerformStatList", + created() {}, + methods: { + handleClick(tab, event) { + console.log(tab, event); + }, + }, + data() { + return { + activeName: "1", + type: "1", + options: [ + { + value: "1", + label: "鏃峰伐鐜�", }, - data() { - return { - config: { - isshowTabPane:true, - search: [ - ], - columns: [ - {type: "selection", width: 60}, - {type: "index",label: "搴忓彿",width: 50}, - - {label: "閮ㄩ棬鍚嶇О", prop: "deptName"}, - - {label: "鑰冨嫟缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "attendScoreAdd", formatter: this.formatter}, - - {label: "鑰冨嫟缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "attendScoreSub", formatter: this.formatter}, - - {label: "璇勪环缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "assessScoreAdd", formatter: this.formatter}, - - {label: "璇勪环缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "assessScoreSub", formatter: this.formatter}, - - {label: "鍔炰欢缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "workScoreAdd", formatter: this.formatter}, - - {label: "鍔炰欢缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "workScoreSub", formatter: this.formatter}, - - {label: "鏁堣兘缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "effectScoreAdd", formatter: this.formatter}, - - {label: "鏁堣兘缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "effectScoreSub", formatter: this.formatter}, - - {label: "鍏跺畠缁╂晥鎸囨爣澧炲姞鍒嗘暟", prop: "otherScoreAdd", formatter: this.formatter}, - - {label: "鍏跺畠缁╂晥鎸囨爣鎵e噺鍒嗘暟", prop: "otherScoreSub", formatter: this.formatter}, - { - label: "鎿嶄綔", - width: 240, - formatter: row => { - return ( - <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} /> - ); - } - } - ] - } - }; - } + { + value: "2", + label: "缂哄崱鐜�", + }, + { + value: "3", + label: "杩熷埌鐜�", + }, + { + value: "4", + label: "鏃╅€€鐜�", + }, + { + value: "5", + label: "璇峰亣鐜�", + }, + { + value: "6", + label: "绂诲矖鐜�", + }, + { + value: "7", + label: "鐫¤鐜�", + }, + { + value: "8", + label: "鐜╂墜鏈虹巼", + }, + { + value: "9", + label: "鍔炰欢瓒呮湡鐜�", + }, + { + value: "10", + label: "宸瘎鐜�", + }, + ], + optionsMonths: [ + { + value: "1", + label: "1鏈�", + }, + { + value: "2", + label: "2鏈�", + }, + { + value: "3", + label: "3鏈�", + }, + { + value: "4", + label: "4鏈�", + }, + { + value: "5", + label: "5鏈�", + }, + { + value: "6", + label: "6鏈�", + }, + { + value: "7", + label: "7鏈�", + }, + { + value: "8", + label: "8鏈�", + }, + { + value: "9", + label: "9鏈�", + }, + { + value: "10", + label: "10鏈�", + }, + { + value: "11", + label: "11鏈�", + }, + { + value: "12", + label: "12鏈�", + }, + ], + value: "", }; + }, +}; </script> +<style lang="less" scoped> +.page { + width: 100%; + height: 100%; + overflow: hidden; + /deep/.el-tabs__item { + width: 120px; + font-size: 18px; + text-align: center; + } + .content { + width: 100%; + height: 100%; + .search_top { + width: 100%; + height: 1000%; + display: flex; + justify-content: space-between; + } + /deep/.el-radio-button { + width: 150px; + text-align: center; + border: 1px solid #eee; + } + /deep/.el-radio-button__inner { + width: 150px; + } + /deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner { + width: 150px; + border: none; + background: #1890ff; + color: #fff; + border: 1px solid #eee; + } + .top { + width: 100%; + height: 60px; + } + .mid { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + .mid_top { + width: 100%; + height: 300px; + display: flex; + justify-content: space-between; + .jixiaozongfen, + .jixiaopingjunfen { + width: 48%; + height: 100%; + } + } + .mid_down { + width: 100%; + height: 380px; + display: flex; + justify-content: space-evenly; + padding-top: 50px; + + .box { + width: 25%; + height: 100%; + } + } + } + .mid_content, + .bar_content { + width: 100%; + height: 700px; + overflow: hidden; + } + .mid_content { + overflow-y: auto; + display: flex; + flex-wrap: wrap; + .goal_box { + width: 435px; + height: 238px; + background: inherit; + background-color: rgba(255, 255, 255, 1); + border: none; + border-radius: 8px; + box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); + -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); + -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.117647058823529); + margin: 0 20px 20px 0; + padding: 20px; + .goal_title { + width: 100%; + display: flex; + align-items: center; + img { + margin-right: 10px; + } + } + .goal_txt { + font-family: "寰蒋闆呴粦", sans-serif; + font-weight: 400; + font-style: normal; + font-size: 12px; + color: #666666; + width: 100%; + margin: 10px 0; + } + .button_box { + width: 100%; + display: flex; + justify-content: space-evenly; + align-items: center; + } + } + } + } +} +</style> diff --git a/attendance-performance-manager-ui/admin/yarn.lock b/attendance-performance-manager-ui/admin/yarn.lock index 6d474927e12fb896c7c3de4b6b0b0761655b284f..c2f3a107c7a797d5ecff906fcf9c134c5d427e34 100644 --- a/attendance-performance-manager-ui/admin/yarn.lock +++ b/attendance-performance-manager-ui/admin/yarn.lock @@ -3665,8 +3665,8 @@ "version" "1.1.3" "echarts@^4.8.0", "echarts@^4.9.0", "echarts@>3.0.0": - "integrity" "sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0=" - "resolved" "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz" + "integrity" "sha512-+ugizgtJ+KmsJyyDPxaw2Br5FqzuBnyOWwcxPKO6y0gc5caYcfnEUIlNStx02necw8jmKmTafmpHhGo4XDtEIA==" + "resolved" "https://registry.npmjs.org/echarts/-/echarts-4.9.0.tgz" "version" "4.9.0" dependencies: "zrender" "4.3.2"