From 61e729f299bb94d8359cb3c4b9583f6490851953 Mon Sep 17 00:00:00 2001 From: xxyy <cathay_xy@163.com> Date: 星期四, 06 三月 2025 09:19:57 +0800 Subject: [PATCH] 更新项目配置与功能扩展 --- Code Management/WMS/WIDESEA_WMSClient/src/views/charts/bigdata/chart-options.js | 551 ++++++++++++++++++++++ .gitignore | 6 Code Management/WMS/WIDESEA_WMSClient/src/views/builder/builderData.js | 195 ++++++++ Code Management/WMS/WIDESEA_WMSClient/src/router/charts.js | 17 Code Management/WMS/WIDESEA_WMSClient/src/uitils/signalr.js | 103 ++++ Code Management/WMS/WIDESEA_WMSClient/src/views/charts/formOptions.js | 148 ++++++ Code Management/WMS/WIDESEA_WMSClient/src/views/charts/chartOptions.js | 212 ++++++++ Code Management/WMS/WIDESEA_WMSClient/src/extension/system/system/Sys_Department.js | 152 ++++++ Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js | 5 9 files changed, 1,389 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 156aa67..8fb46bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1681,3 +1681,9 @@ /Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/copilot-chat/bef6627e/sessions/e6132757-6fba-4638-b3d2-dfa6125d4331 /Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/copilot-chat/bef6627e/sessions/5f82e1ad-d4db-43ed-9379-9ed44357aea4 /Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/copilot-chat/bef6627e/sessions/20691605-d649-4ddc-93d5-94d62cef517b +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/CodeChunks.db +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/CodeChunks.db-shm +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/CodeChunks.db-wal +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/SemanticSymbols.db +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/SemanticSymbols.db-shm +/Code Management/.vs/Code Management/CopilotIndices/17.13.433.20974/SemanticSymbols.db-wal diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/system/system/Sys_Department.js b/Code Management/WMS/WIDESEA_WMSClient/src/extension/system/system/Sys_Department.js new file mode 100644 index 0000000..5c19061 --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/system/system/Sys_Department.js @@ -0,0 +1,152 @@ +/***************************************************************************************** +** Author:jxx 2022 +** QQ:283591387 +**瀹屾暣鏂囨。瑙侊細http://v2.volcore.xyz/document/api 銆愪唬鐮佺敓鎴愰〉闈iewGrid銆� +**甯哥敤绀轰緥瑙侊細http://v2.volcore.xyz/document/vueDev +**鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev +*****************************************************************************************/ +//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 + +let extension = { + components: { + //鏌ヨ鐣岄潰鎵╁睍缁勪欢 + gridHeader: '', + gridBody: '', + gridFooter: '', + //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 + modelHeader: '', + modelBody: '', + modelFooter: '' + }, + tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓) + buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽� + methods: { + //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� + onInit() { //妗嗘灦鍒濆鍖栭厤缃墠锛� + this.rowKey = "DepartmentId"; + }, + loadTreeChildren(tree, treeNode, resolve) { //鍔犺浇瀛愯妭鐐� + let url = `api/Sys_Department/getTreeTableChildrenData?departmentId=${tree.DepartmentId}`; + this.http.post(url, {}).then(result => { + resolve(result.rows) + }) + }, + /***鍔犺浇鍚庡彴鏁版嵁瑙丼ys_RoleController.cs鏂囦欢***/ + searchBefore(params) {//鍒ゆ柇鍔犺浇鏍硅妭鐐规垨瀛愯妭鐐� + //娌℃湁鏌ヨ鏉′欢锛岄粯璁ゆ煡璇㈣繑鍥炴墍鏈夋牴鑺傜偣鏁版嵁 + if (!params.wheres.length) { + params.value = 1; + } + return true; + }, + onInited() { + let hasUpdate, hasDel, hasAdd; + this.buttons.forEach((x) => { + if (x.value == 'Update') { + x.hidden = true; + hasUpdate = true; + } else if (x.value == 'Delete') { + hasDel = true; + x.hidden = true;//闅愯棌鎸夐挳 + } + else if (x.value == 'Add') { + x.type="primary"; + hasAdd = true; + } + }); + if (!(hasUpdate || hasDel || hasAdd)) { + return; + } + this.columns.push({ + title: '鎿嶄綔', + field: '鎿嶄綔', + width: 80, + fixed: 'right', + align: 'center', + render: (h, { row, column, index }) => { + return ( + <div> + <el-button + onClick={($e) => { + this.addBtnClick(row) + }} + type="primary" + link + v-show={hasAdd} + icon="Plus" + > + </el-button> + <el-button + onClick={($e) => { + this.edit(row); + }} + type="success" + link + v-show={hasUpdate} + icon="Edit" + > + </el-button> + <el-tooltip + class="box-item" + effect="dark" + content="鍒犻櫎" + placement="top" + > + <el-button + link + onClick={($e) => { + this.del(row); + }} + v-show={hasDel} + type="danger" + icon="Delete" + > + </el-button> + </el-tooltip> + </div> + ); + } + }); + }, + addBtnClick(row) { + //杩欓噷鏄姩鎬乤ddCurrnetRow灞炴�ц褰曞綋鍓嶇偣鍑荤殑琛屾暟鎹�,涓嬮潰modelOpenAfter璁剧疆榛樿鍊� + this.addCurrnetRow = row; + this.add(); + }, + addAfter() {//娣诲姞鍚庡埛鏂板瓧鍏� + this.initDicKeys(); + return true; + }, + updateAfter() { + this.initDicKeys(); + return true; + }, + delAfter(result) {//鏌ヨ鐣岄潰鐨勮〃鍒犻櫎鍚� + this.initDicKeys(); + return true; + }, + modelOpenAfter(row) { + //鐐瑰嚮琛屼笂鐨勬坊鍔犳寜閽簨浠� + if (this.addCurrnetRow) { + + //鑾峰彇褰撳墠缁勭粐鏋勬灦鐨勬墍鏈夌埗绾d,鐢ㄤ簬璁剧疆鏂板缓鏃剁埗绾d鐨勯粯璁ゅ�� + + //鑾峰彇鏁版嵁鏁版嵁婧� + let data = []; + this.editFormOptions.forEach(options => { + options.forEach(option => { + if (option.field == 'ParentId') { + data = option.orginData; + } + }) + }) + let parentIds = this.base.getTreeAllParent(this.addCurrnetRow.DepartmentId, data).map(x => { return x.id }); + //璁剧疆缂栬緫琛ㄥ崟涓婄骇缁勭粐鐨勯粯璁ゅ�� + this.editFormFields.ParentId = parentIds; + this.addCurrnetRow = null; + + } + } + } +}; +export default extension; diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/router/charts.js b/Code Management/WMS/WIDESEA_WMSClient/src/router/charts.js new file mode 100644 index 0000000..55cac54 --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/router/charts.js @@ -0,0 +1,17 @@ +let charts=[ + { + path: '/chart', + name: 'chart', + component: () => import('@/views/charts/chart.vue') + }, + { + path: '/formChart', + name: 'formChart', + component: () => import('@/views/charts/formChart.vue') + }, + { + path: '/flex', + name: 'flex', + component: () => import('@/views/charts/flex.vue') + }] +export default charts diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js new file mode 100644 index 0000000..3f6a58d --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js @@ -0,0 +1,5 @@ +import mitt from 'mitt'; + +const eventBus = mitt(); + +export default eventBus; diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/uitils/signalr.js b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/signalr.js new file mode 100644 index 0000000..5534440 --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/signalr.js @@ -0,0 +1,103 @@ +// import sysConfig from '@/config/index' +// import tool from '@/utils/tool' +import store from "../store/index"; +import http from "@/../src/api/http.js"; +import * as signalR from "@microsoft/signalr"; +import { ElNotification } from "element-plus"; + +import eventBus from "./eventBus"; + +// import * as signalrMessage from './mqtt/message' +//浣跨敤signalr +export default function useSignalr() { + // const userInfo = tool.data.get('USER_INFO') //鐢ㄦ埛淇℃伅 + let openedNotification = null; // 淇濆瓨褰撳墠鎵撳紑鐨凬otification瀹炰緥 + let socketUrl = "hubs/simple"; //socket鍦板潃 + // if (sysConfig.VITE_PROXY === 'false') { + socketUrl = http.ipAddress + socketUrl; //鍒ゆ柇鏄惁瑕佽蛋浠g悊妯″紡锛岃蛋浜嗙殑璇濆彂甯冧箣鍚庣洿鎺ginx浠g悊 + // } + //寮�濮� + const startSignalr = () => { + //鍒濆鍖栬繛鎺� + const connection = init(); + // 鍚姩杩炴帴 + connection + .start() + .then(() => { + console.log("鍚姩杩炴帴"); + }) + .catch((err) => { + console.log("杩炴帴澶辫触", err); + }); + }; + + //鍒濆鍖� + const init = () => { + console.log("鍒濆鍖朣ignalR瀵硅薄"); + // SignalR瀵硅薄 + const connection = new signalR.HubConnectionBuilder() + .withUrl(socketUrl, { + accessTokenFactory: () => store.getters.getToken(), + skipNegotiation: true, + transport: signalR.HttpTransportType.WebSockets, + }) + .withAutomaticReconnect({ + nextRetryDelayInMilliseconds: () => { + return 5000; // 姣�5绉掗噸杩炰竴娆� + }, + }) //鑷姩閲嶆柊杩炴帴 + .configureLogging(signalR.LogLevel.Information) + .build(); + connection.keepAliveIntervalInMilliseconds = 15 * 1000; // 蹇冭烦妫�娴�15s + // connection.serverTimeoutInMilliseconds = 30 * 60 * 1000 // 瓒呮椂鏃堕棿30m + // 鏂紑杩炴帴 + connection.onclose(async () => { + console.log("鏂紑杩炴帴"); + }); + + //鏂嚎閲嶆柊 + connection.onreconnected(() => { + console.log("鏂嚎閲嶆柊杩炴帴鎴愬姛"); + }); + //娑堟伅澶勭悊 + receiveMsg(connection); + return connection; + }; + + //鎺ユ敹娑堟伅澶勭悊 + const receiveMsg = (connection) => { + //鎺ユ敹鐧诲嚭 + connection.on("LoginOut", (data) => { + // signalrMessage.loginOut(data) + }); + + connection.on("NewMessage", (data) => { + eventBus.emit("stackerDataError", data); + if (openedNotification === null || openedNotification.closed) { + // 涓婁竴涓狽otification宸插叧闂垨灏氭湭鎵撳紑 + openedNotification = ElNotification({ + title: "鎴愬姛", + message: data, + type: "success", + onClose: () => { + // Notification宸插叧闂� + openedNotification = null; // 娓呯┖褰撳墠鎵撳紑鐨凬otification瀹炰緥 + console.log("Notification宸插叧闂�"); + }, + }); + } + }); + + connection.on("StackerData", (data) => { + // console.log(data); + eventBus.emit("stackerData", data); + }); + connection.on("LineData", (data) => { + eventBus.emit("locationData", data); + }); + }; + + //椤甸潰閿�姣� + // onUnmounted(() => {}) + return { startSignalr }; +} diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/builder/builderData.js b/Code Management/WMS/WIDESEA_WMSClient/src/views/builder/builderData.js new file mode 100644 index 0000000..78f6b37 --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/builder/builderData.js @@ -0,0 +1,195 @@ +let columnType = [{ "key": 1, "value": "img" }, +{ "key": 2, "value": "excel" }, +{ "key": 3, "value": "file" }, +//2021.07.27澧炲姞table鍒楁樉绀虹被鍨媎ate(鑷姩鏍煎紡鍖�) +{ "key": 4, "value": "date" } +] + +let dataType = [ + { "key": "text", "value": "input" }, + { "key": "textarea", "value": "textarea" }, + { "key": "switch", "value": "switch" }, + // { "key": "dropList", "value": "dropList" }, + { "key": "select", "value": "select" }, + { "key": "selectList", "value": "select澶氶��" }, + { "key": "date", "value": "date" }, + { "key": "datetime", "value": "datetime" }, + { "key": "month", "value": "骞存湀鏃�" }, + { "key": "rate", "value": "rate璇勫垎" }, + { "key": "time", "value": "time" }, + { "key": "checkbox", "value": "checkbox" }, + // 2021.05.16闆嗘垚iview radio缁勪欢 + { "key": "radio", "value": "radio" }, + { "key": "cascader", "value": "绾ц仈" },//2020.11.01澧炲姞绾ц仈閫夋嫨 + { "key": "treeSelect", "value": "鏍戝舰绾ц仈tree-select" },//2020.11.01澧炲姞绾ц仈閫夋嫨 + { "key": "editor", "value": "瀵屾枃鏈紪杈戝櫒" }, + { "key": "mail", "value": "mail" }, + { "key": "number", "value": "number" }, + { "key": "decimal", "value": "decimal" }, + { "key": "phone", "value": "phone" }, + { "key": "img", "value": "img" }, + { "key": "excel", "value": "excel" }, + { "key": "file", "value": "file" } +]; + +let searchDataType = [ + { "key": "text", "value": "input" }, + { "key": "like", "value": "妯$硦鏌ヨ" }, + { "key": "textarea", "value": "textarea" }, + { "key": "switch", "value": "switch" }, + { "key": "select", "value": "select" }, + { "key": "selectList", "value": "select澶氶��" }, + { "key": "date", "value": "date" }, + { "key": "datetime", "value": "datetime" }, + { "key": "month", "value": "year_month" }, + { "key": "time", "value": "time" }, + { "key": "cascader", "value": "绾ц仈" },//2020.11.01澧炲姞绾ц仈閫夋嫨 + { "key": "checkbox", "value": "checkbox" }, + // 2021.05.16闆嗘垚iview radio缁勪欢 + { "key": "radio", "value": "radio" }, + { "key": "range", "value": "鍖洪棿鏌ヨ" }, + { "key": "mail", "value": "mail" }, + { "key": "number", "value": "number" }, + { "key": "decimal", "value": "decimal" }, + { "key": "phone", "value": "phone" } +]; +let data = { + form: { + fields: { + table_Id: '', + parentId: null, + namespace: '', + columnCNName: '', + tableName: '', + tableTrueName: '', + folderName: '', + detailCnName: '', + detailName: '', + expressField: '', + sortName: '', + richtitle: '', + uploadField: '', + uploadMaxCount: '', + enable: 0, + vuePath: '', + appPath: "", + userPermissionDesc: '寮�鍚悗褰撳墠鐢ㄦ埛鍙兘鎿嶄綔鑷繁(涓庝笅绾ц鑹�)鍒涘缓鐨勬暟鎹�,濡�:鏌ヨ銆佸垹闄ゃ�佷慨鏀圭瓑鎿嶄綔' + }, + addOptions: [ + [{ "title": "鐖� 绾� ID", min: 0, "field": "parentId", "required": true, type: 'number', placeholder: '鏀惧湪銆愪唬鐮佺敓鎴愰厤缃�戝垪琛ㄧ殑鏂囦欢澶笽D涓�,濡傛灉濉叆銆�0銆戝氨鏄竴绾х洰褰�' }], + [{ + "title": "椤圭洰绫诲簱", + "field": "namespace", + "placeholder": "浠g爜鐢熸垚鍚庣殑鎵�鍦ㄧ被搴�(鍙互鑷繁鎻愬墠鍦ㄥ悗鍙伴」鐩腑鍒涘缓涓�涓�.netcore绫诲簱)", + "type": "select", + "required": true, + data: [] + }], + [{ "title": "琛ㄤ腑鏂囧悕", "field": "columnCNName", "required": true, placeholder: "琛ㄥ搴旂殑涓枃鍚嶅瓧,鐣岄潰涓婃樉绀轰細鐢ㄥ埌" }], + [{ "title": "瀹為檯琛ㄥ悕", "field": "tableName", "required": true, placeholder: "鏁版嵁搴撳疄闄呰〃鍚嶆垨鑰呰鍥惧悕(澶氳〃鍏宠仈璇峰垱寤鸿鍥惧啀鐢熸垚浠g爜)" }], + [{ "title": "鏂囦欢澶瑰悕", placeholder: "鐢熸垚鏂囦欢鎵�鍦ㄧ被搴撲腑鐨勬枃浠跺す鍚�(鏂囦欢澶瑰彲浠ヤ笉瀛樺湪);娉ㄦ剰鍙渶瑕佸~鍐欐枃浠跺す鍚嶏紝涓嶆槸璺緞", "field": "folderName", "required": true }] + ], + options: [ + [ + { "title": "涓� 閿� ID", "field": "table_Id", "dataSource": [], readonly: true, disabled: true, columnType: 'int' }, + { "title": "鐖� 绾� ID", "field": "parentId", min: 0, "required": true, type: 'number' }, + { + "title": "椤圭洰绫诲簱", + "placeholder": "浠g爜鐢熸垚瀛樻斁鐨勪綅缃�", + "field": "namespace", + "type": "select", + "required": true, + data: [] + } + ], + [ + { "title": "琛ㄤ腑鏂囧悕", "field": "columnCNName", "dataSource": [], "required": true }, + { "title": "琛� 鍒� 鍚�", placeholder: "榛樿涓庡疄闄呰〃鍚嶇浉鍚�", "field": "tableName", "required": true }, + { "title": "瀹為檯琛ㄥ悕", "field": "tableTrueName" }, + + ], + [ + { "title": "鏂囦欢澶瑰悕", placeholder: "鐢熸垚鏂囦欢鎵�鍦ㄧ被搴撲腑鐨勬枃浠跺す鍚�(鏂囦欢澶瑰彲浠ヤ笉瀛樺湪)", "field": "folderName", "required": true }, + { "title": "鏄庣粏琛ㄥ悕", "field": "detailCnName", placeholder: "鏄庣粏琛ㄤ腑鏂囧悕瀛�" }, + { "title": "鏄� 缁� 琛�", "field": "detailName", placeholder: "鏁版嵁搴撶殑琛ㄥ悕" }, + + ], + [ + { "title": "蹇嵎缂栬緫", "field": "expressField", placeholder: "蹇嵎缂栬緫瀛楁" }, + { "title": "鎺掑簭瀛楁", "field": "sortName", "placeholder": "澶氫釜鎺掑簭瀛楁閫楀彿闅斿紑(榛樿闄嶅簭鎺掑簭),濡傦細Name,Age", colSize: 8 }, + + // { "title": "杩樻病鎯冲ソ", "field": "richtitle" } + ], + [{ "title": "Vue璺緞", "field": "vuePath", type: "text", placeholder: 'Vue椤圭洰鎵�鍦ㄧ粷瀵硅矾寰�,鍒皏iews鏂囦欢澶�,濡傦細E:/app/src/views', colSize: 12 }, + // { "title": "app璺緞", "field": "appPath", type: "text", placeholder: 'uniapp椤圭洰鎵�鍦ㄧ粷瀵硅矾寰�,鍒皃ages鏂囦欢澶�,濡傦細E:/uniapp/pages', colSize: 6 } + ] + // [ //寰呭畬 + // { "title": "寮�鍚敤鎴锋潈闄愭暟鎹�", "field": "enable", bind: { data: [{ key: 1, value: '鏄�', key: 0, value: '鍚�' }] }, type: 'switch', colSize: 2 }, + // { "title": "鎻愮ず", "required": true, "field": "userPermissionDesc", colSize: 10, "placeholder": "闈炶嚜澧炰富閿渶瑕佽緭鍏ユ帓搴忓瓧娈�",readonly:true } + // ], + // [ + + // ], + // [ + // { "title": "瀵屾枃鏈紪杈戝瓧娈�", "field": "richtitle", "displayType": "title" }, + // { "title": "鏂囦欢涓婁紶瀛楁", "field": "uploadField", "displayType": "title" }, + // { "title": "鏂囦欢涓婁紶鏁伴噺闄愬埗", "field": "uploadMaxCount", "displayType": "title", columnType: 'int' } + // ], + // [ + // { "title": "Vue瑙嗗浘缁濆璺緞", "field": "vuePath", "displayType": "title", colSize: 12, placeholder: 'Vue椤圭洰鎵�鍦ㄧ粷瀵硅矾寰�,鍒皏iews鏂囦欢澶�,濡傦細E:/app/src/views' }, + // ] + ] + }, + //2021.01.09澧炲姞浠g爜鐢熸垚鍣ㄨ缃畉able鎺掑簭鍔熻兘 + columns: [ + { field: 'columnId', title: 'ColumnId', width: 120, align: 'left', edit: { type: "text" }, hidden: true }, + { field: 'table_Id', title: 'Table_Id', width: 120, align: 'left', editor: 'text', hidden: true }, + { field: 'columnCnName', title: '鍒楁樉绀哄悕绉�', fixed: true, width: 120, align: 'left', edit: { type: "text" } }, + { field: 'columnName', title: '鍒楀悕', fixed: true, width: 120, align: 'left', edit: { type: "text" } }, + { field: 'isKey', title: '涓婚敭', width: 90, align: 'left', edit: { type: "switch" } }, + { field: 'sortable', title: '鏄惁鎺掑簭', width: 90, align: 'left', edit: { type: "switch", keep: true } }, + { + field: 'enable', title: 'app鍒�', width: 140, align: 'left', edit: { type: "select" }, + bind: { + data: [ + { key: 1, value: "鏄剧ず/鏌ヨ/缂栬緫" }, + { key: 2, value: "鏄剧ず/缂栬緫" }, + { key: 3, value: "鏄剧ず/鏌ヨ" }, + { key: 4, value: "鏄剧ず" }, + { key: 5, value: "鏌ヨ/缂栬緫" }, + { key: 6, value: "鏌ヨ" }, + { key: 7, value: "缂栬緫" }, + ] + } + }, + { field: 'searchRowNo', title: '鏌ヨ琛�', width: 90, align: 'left', edit: { type: "text" } }, + { field: 'searchColNo', title: '鏌ヨ鍒�', width: 90, align: 'left', edit: { type: "text" } }, + { field: 'searchType', title: '鏌ヨ绫诲瀷', width: 150, align: 'left', edit: { type: "select" }, bind: { data: searchDataType } }, + { field: 'editRowNo', title: '缂栬緫琛�', width: 90, align: 'numberbox', edit: { type: "text" } }, + { field: 'editColNo', title: '缂栬緫鍒�', width: 90, align: 'numberbox', edit: { type: "text" } }, + { field: 'editType', title: '缂栬緫绫诲瀷', width: 150, align: 'left', edit: { type: "select" }, bind: { data: dataType } }, + { field: 'dropNo', title: '鏁版嵁婧�', width: 120, align: 'left', bind: { data: [] }, edit: { type: "select", data: [] } }, + { field: 'isImage', title: 'table鍒楁樉绀虹被鍨�', hidden: false, width: 130, align: 'left', edit: { type: "select" }, bind: { data: columnType } }, + { field: 'orderNo', title: '鍒楁樉绀洪『搴�', width: 120, align: 'left', edit: { type: "text" } }, + { field: 'maxlength', title: '瀛楁鏈�澶ч暱搴�', width: 130, align: 'left', edit: { type: "text" } }, + { field: 'columnType', title: '鏁版嵁绫诲瀷', width: 120, align: 'left', edit: { type: "text" } }, + { field: 'isNull', title: '鍙负绌�', width: 120, align: 'left', edit: { type: "switch", keep: true } }, + { field: 'isReadDataset', title: '鏄惁鍙', width: 120, align: 'left', edit: { type: "switch", keep: true } }, + { field: 'isColumnData', title: '鏁版嵁鍒�', width: 120, align: 'left', edit: { type: "switch", keep: true } }, + { field: 'isDisplay', title: '鏄惁鏄剧ず', width: 120, align: 'left', edit: { type: "switch", keep: true } }, + { field: 'columnWidth', title: 'table鍒楀搴�', width: 120, align: 'left', edit: { type: "text" } }, + { field: 'colSize', title: '缂栬緫鍒楁爣绛惧搴olSize', width: 180, align: 'left', edit: { type: "text" } }, + // { field: 'import', title: '瀵煎叆鍒�', hidden: true, width: 100, align: 'left', edit: { type: "switch" } }, + // { field: 'apiInPut', title: 'Api杈撳叆鍒�(寰呭疄鐜�)', width: 100, align: 'left', edit: { type: "switch" } }, + // { field: 'apiIsNull', title: 'Api杈撳叆鍒楀彲涓虹┖(寰呭疄鐜�)', width: 130, align: 'left', edit: { type: "switch" } }, + // { field: 'apiOutPut', title: 'Api杈撳嚭鍒�(寰呭疄鐜�)', width: 100, align: 'left', edit: { type: "switch" } }, + // { field: 'columnformat', title: '鏄剧ず鏍煎紡', width: 120, align: 'left', editor: 'text', editor: 'textarea' }, + // { field: 'script', title: '鑴氭湰', width: 120, align: 'left', editor: 'textarea' }, + // { field: 'creator', title: '鍒涘缓浜�', width: 120, align: 'left' }, + { field: 'createDate', title: '鍒涘缓鏃堕棿', width: 120, align: 'left' }, + // { field: 'modifier', title: '淇敼浜�', width: 120, align: 'left' }, + // { field: 'modifyDate', title: '淇敼鏃堕棿', width: 120, align: 'left' } + ] +} + +export default data \ No newline at end of file diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/bigdata/chart-options.js b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/bigdata/chart-options.js new file mode 100644 index 0000000..fe30d3e --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/bigdata/chart-options.js @@ -0,0 +1,551 @@ +var echarts = require("echarts"); +let chartLeft1 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow" + } + }, + grid: { + left: "0%", + top: "10px", + right: "0%", + bottom: "4%", + containLabel: true + }, + xAxis: [ + { + type: "category", + data: [ + "鍟嗚秴闂ㄥ簵", + "鏁欒偛鍩硅", + "鎴垮湴浜�", + "鐢熸椿鏈嶅姟", + "姹借溅閿�鍞�", + "鏃呮父閰掑簵", + "浜旈噾寤烘潗" + ], + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1)", + width: 1, + type: "solid" + } + }, + + axisTick: { + show: false + }, + axisLabel: { + interval: 0, + show: true, + splitNumber: 15, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + } + } + ], + yAxis: [ + { + type: "value", + axisLabel: { + show: true, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + }, + axisTick: { + show: false + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1 )", + width: 1, + type: "solid" + } + }, + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + } + } + ], + series: [ + { + type: "bar", + data: [200, 600, 300, 900, 1500, 1200, 600], + barWidth: "35%", + itemStyle: { + normal: { + color: "#2f89cf", + opacity: 1, + barBorderRadius: 5 + } + } + } + ] +}; + + +let chartLeft2 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow" + } + }, + grid: { + left: "0%", + top: "10px", + right: "0%", + bottom: "4%", + containLabel: true + }, + xAxis: [ + { + type: "category", + data: [ + "07.01", + "07.02", + "07.03", + "07.04", + "07.05", + "07.06", + ], + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1)", + width: 1, + type: "solid" + } + }, + axisTick: { + show: false + }, + axisLabel: { + interval: 0, + // rotate:50, + show: true, + splitNumber: 15, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + } + } + ], + yAxis: [ + { + type: "value", + axisLabel: { + show: true, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + }, + axisTick: { + show: false + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1 )", + width: 1, + type: "solid" + } + }, + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + } + }, + { + type: "value", + axisLabel: { + show: true, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + }, + axisTick: { + show: false + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1 )", + width: 1, + type: "solid" + } + }, + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + } + } + ], series: [ + { + type: "bar", + name: "閿�閲�", + data: [1200, 800, 300, 500, 560, 220], + barWidth: "25%", + itemStyle: { + normal: { + color: "#2f89cf", + opacity: 1, + barBorderRadius: 5 + } + } + }, { + type: "bar", + name: "璁㈠崟", + data: [1000, 750, 380, 450, 450, 120], + barWidth: "25%", + itemStyle: { + normal: { + color: "#46d000", + opacity: 1, + barBorderRadius: 5 + } + } + } + ] +}; + +let chartLeft3 = { + tooltip: { + trigger: 'axis', + axisPointer: { // 鍧愭爣杞存寚绀哄櫒锛屽潗鏍囪酱瑙﹀彂鏈夋晥 + type: 'shadow' // 榛樿涓虹洿绾匡紝鍙�変负锛�'line' | 'shadow' + } + }, + grid: { + left: "0%", + top: "-5px", + right: "3%", + bottom: "4%", + containLabel: true + }, + xAxis: { + type: 'value', + axisLabel: { + show: true, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + }, + axisTick: { + show: false + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1 )", + width: 1, + type: "solid" + } + }, + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + } + }, + yAxis: { + type: 'category', + axisLabel: { + show: true, + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: "12" + } + }, + axisTick: { + show: false + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(255,255,255,.1 )", + width: 1, + type: "solid" + } + }, + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + }, + data: ['鍛ㄤ竴', '鍛ㄤ簩', '鍛ㄤ笁', '鍛ㄥ洓', '鍛ㄤ簲'] + }, + series: [ + { + name: '鐩存帴璁块棶', + type: 'bar', + stack: '鎬婚噺', + label: { + show: true, + position: 'insideRight' + }, + barWidth: "55%", + itemStyle: { + normal: { + color: "#2f89cf", + opacity: 1, + barBorderRadius: 5 + } + }, + data: [120, 302, 400, 200, 700] + } + ] +}; + +let chartRight1 = { + title: {}, + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + label: { + backgroundColor: "#6a7985" + } + } + }, + + color: ["#ffab6f", "#09b916", "#83cddc"], //鍥句緥棰滆壊 + legend: { + top: "0%", + icon: "roundRect", + data: ["閿�鍞鍗�", "閫�璐ц鍗�", "鎶樻墸璁㈠崟"], + textStyle: { + color: "rgba(255,255,255,.5)", + fontSize: "12" + } + }, + toolbox: { + feature: {} + }, + grid: { + left: "10", + top: "20", + right: "10", + bottom: "10", + containLabel: true + }, + xAxis: [ + { + type: "category", + boundaryGap: false, + axisLabel: { + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: 12 + } + }, + axisLine: { + lineStyle: { + color: "rgba(255,255,255,.2)" + } + }, + data: [ + "2020.06.15", + "2020.06.16", + "2020.06.17", + "2020.06.18", + "2020.06.19", + "2020.06.20", + "2020.06.21", + "2020.06.22" + ] + } + ], + yAxis: [ + { + type: "value", + axisTick: { show: false }, + minInterval: 60, + axisLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + }, + axisLabel: { + textStyle: { + color: "rgba(255,255,255,.6)", + fontSize: 12 + } + }, + + splitLine: { + lineStyle: { + color: "rgba(255,255,255,.1)" + } + } + } + ], + series: [ + { + name: "閿�鍞鍗�", + type: "line", + smooth: true, + lineStyle: { + color: "#45d4ba", + width: 1 + }, //绾挎潯鐨勬牱寮� + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: "#83cddc" + }, + { + offset: 1, + color: "#bfdffbb5" + } + ]) + }, + data: [5, 22, 150, 54, 1, 230, 4, 1] + }, + { + name: "閫�璐ц鍗�", + type: "line", + + smooth: true, + lineStyle: { + color: "#04a710", + width: 1 + }, // + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: "#0cbf22" + }, + { + offset: 1, + color: "#b8f7d1b5" + } + ]) + }, + data: [10, 150, 1, 250, 20, 100, 10, 150] + }, + { + name: "鎶樻墸璁㈠崟", + type: "line", + + lineStyle: { + color: "#0864c3", + width: 1 + }, //绾挎潯鐨勬牱寮� + smooth: true, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: "#29d7ff" + }, + { + offset: 1, + color: "#34ccef85" + } + ]) + }, + data: [100, 2, 260, 1, 200, 30, 101, 40] + } + ] +}; + +var gauge = { + series: [{ + radius: '90%', + type: 'gauge', + startAngle: 180, + endAngle: 0, + min: 0, + max: 1, + splitNumber: 8, + axisLine: { + lineStyle: { + width: 3, + color: [ + [0.25, '#FF6E76'], + [0.5, '#FDDD60'], + [0.75, '#58D9F9'], + [1, '#7CFFB2'] + ] + } + }, + pointer: { + icon: 'path://M12.8,0.7l12,40.1H0.7L12.8,0.7z', + length: '12%', + width: 20, + offsetCenter: [0, '-60%'], + itemStyle: { + color: 'auto' + } + }, + axisTick: { + length: 12, + lineStyle: { + color: 'auto', + width: 2 + } + }, + splitLine: { + length: 20, + lineStyle: { + color: 'auto', + width: 5 + } + }, + axisLabel: { + color: '#464646', + fontSize: 20, + distance: -60, + formatter: function (value) { + if (value === 0.875) { + return '浼�'; + } + else if (value === 0.625) { + return '涓�'; + } + else if (value === 0.375) { + return '鑹�'; + } + else if (value === 0.125) { + return '宸�'; + } + } + }, + title: { + offsetCenter: [0, '-20%'], + fontSize: 20 + }, + detail: { + fontSize: 30, + offsetCenter: [0, '0%'], + valueAnimation: true, + formatter: function (value) { + return Math.round(value * 100) + '鍒�'; + }, + color: 'auto' + }, + data: [{ + value: 0.70, + name: '鎴愮哗璇勫畾' + }] + }] +} +export { chartLeft1, chartLeft2, chartLeft3, chartRight1, gauge } diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/chartOptions.js b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/chartOptions.js new file mode 100644 index 0000000..2ec6bda --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/chartOptions.js @@ -0,0 +1,212 @@ +let options= { + bar:{ + // title: { + // text: 'World Population' + // }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + // legend: {}, + grid: { + top:10, + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + xAxis: { + type: 'value', + boundaryGap: [0, 0.01] + }, + yAxis: { + type: 'category', + data: ['Brazil', 'Indonesia', 'USA', 'India', 'China', 'World'] + }, + series: [ + { + name: '2011', + type: 'bar', + data: [18203, 23489, 29034, 14970, 31744, 60230] + }, + { + name: '2012', + type: 'bar', + data: [19325, 23438, 31000, 11594, 24141, 6807] + } + ] + }, + pie: { + tooltip: { + trigger: "item", + formatter: "{a} <br/>{b} : {c} ({d}%)" + }, + legend: { + top: 20, + // orient: "vertical", + // right: 300, + // top: 200, + // bottom: 20, + data: [ + "鍥句緥1", + "鍥句緥2", + "鍥句緥3", + "鍥句緥4", + "鍥句緥5", + "鍥句緥6", + "鍥句緥7" + ] + }, + series: [ + { + name: "鍥句緥1", + type: "pie", + radius: ['40%', '70%'], + selectedMode: "single", + itemStyle: { + borderRadius: 6, + borderColor: '#fff', + borderWidth: 2 + }, + data: [ + { + value: 2563, + name: "鍥句緥1", + itemStyle: { + color: "rgb(45, 140, 240)" + } + }, + { + value: 727, + name: "鍥句緥2", + itemStyle: { + color: "rgb(92, 173, 255)" + } + }, + { + value: 2182, + name: "鍥句緥3", + itemStyle: { + color: "rgb(25, 190, 107)" + } + }, + { + value: 1419, + name: "鍥句緥4", + itemStyle: { + color: "#00e5ff" + } + }, + { + value: 984, + name: "鍥句緥5", + itemStyle: { + color: "#ff80ab" + } + }, + { + value: 870, + name: "鍥句緥6", + itemStyle: { + color: "rgb(237, 64, 20)" + } + }, + { + value: 1670, + name: "鍥句緥7", + itemStyle: { + color: "#ffb445" + } + } + ] + } + ] + }, + line: { + legend: { + data: ["閭欢钀ラ攢", "鑱旂洘骞垮憡"] + }, + grid: { + left: "3%", + right: "4%", + bottom: "3%", + containLabel: true + }, + toolbox: { + feature: { + saveAsImage: {} + } + }, + xAxis: { + type: "category", + boundaryGap: false, + data: [ + "1鏈�", + "2鏈�", + "3鏈�", + "4鏈�", + "5鏈�", + "6鏈�", + "7鏈�", + "8鏈�", + "9鏈�", + "10鏈�", + "11鏈�", + "12鏈�" + ] + }, + yAxis: { + type: "value" + }, + series: [ + { + name: "閭欢钀ラ攢", + type: "line", + stack: "鎬婚噺", + itemStyle: { + color: "rgb(25, 190, 107)" + }, + smooth: true, + data: [ + 7.0, + 6.9, + 9.5, + 12.5, + 18.2, + 21.5, + 22.5, + 23.3, + 18.3, + 13.9, + 9.6 + ] + }, + { + name: "鑱旂洘骞垮憡", + type: "line", + stack: "鎬婚噺", + smooth: true, + itemStyle: { + color: "rgb(92, 173, 255)" + }, + data: [ + 7.0, + 6.9, + 9.5, + 14.5, + 18.2, + 21.5, + 22.5, + 21.3, + 18.3, + 13.9, + 9.6 + ] + } + ] + } + } + + export default options; \ No newline at end of file diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/formOptions.js b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/formOptions.js new file mode 100644 index 0000000..8e17aa9 --- /dev/null +++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/charts/formOptions.js @@ -0,0 +1,148 @@ +let formFields1 = { + Variety: "", + AgeRange: "", + DateRange: [], + City: "", + AvgPrice: 8.88, + Date: "", + IsTop: "杩樻病鎯冲ソ..." +} +let formRules1 = [ + //涓ゅ垪鐨勮〃鍗曪紝formRules鏁版嵁鏍煎紡涓�:[[{},{}]] + [ + { + link:true, + dataKey: "city", + title: "鍩庡競", + required: true, + field: "City", + data: [], + type: "select" + }, + { + title: "澶氶�夋棩鏈�", + range: true, //璁剧疆涓簍rue鍙互閫夋嫨寮�濮嬩笌缁撴潫鏃ユ湡 + required: false, + field: "DateRange", + // colSize: 4,//璁剧疆瀹藉害涓�1/3 + type: "date" + } + ], + [ + { + dataKey: "age", //鍚庡彴涓嬫媺妗嗗搴旂殑鏁版嵁瀛楀吀缂栧彿 + data: [], //loadKey璁剧疆涓簍rue,浼氭牴鎹甦ataKey浠庡悗鍙扮殑涓嬫媺妗嗘暟鎹簮涓嚜鍔ㄥ姞杞芥暟鎹� + title: "涓嬫媺", + required: true, //璁剧疆涓哄繀閫夐」 + field: "AgeRange", + type: "select" + }, + { + title: "鏃ユ湡", + required: true, + field: "Date", + placeholder: "浣犲彲浠ヨ缃甤olSize灞炴�у喅瀹氭爣绛剧殑闀垮害锛屽彲閫夊��12/8/6/4", + // colSize: 8,//璁剧疆瀹藉害涓�2/3 + type: "datetime" + } + ], + [ + { + title: "娴嬭瘯", + dataKey: "age", + placeholder: "姝ゅ鏁版嵁婧愪负鎵嬪姩缁戝畾", + //濡傛灉杩欓噷缁戝畾浜哾ata鏁版嵁锛屽悗鍙颁笉浼氬姞杞芥鏁版嵁婧� + data: [{ key: "1", value: "娴嬭瘯1" }, { key: "2", value: "娴嬭瘯2" }], + required: false, + field: "Variety", + type: "select" + }, + { + type: "decimal", + title: "浠锋牸", + required: true, + placeholder: "浣犲彲浠ヨ嚜宸卞畾涔塸laceholder鏄剧ず鐨勬枃瀛�", + field: "AvgPrice" + } + ], + [ + { + title: "澶囨敞", + required: true, + field: "IsTop", + colSize: 12, //璁剧疆12锛屾鍒楀崰100%瀹藉害 + type: "textarea" + } + ] +] + +let formFields2 = { + Variety: "涓�娆℃�х敤鍝�", + City: "鍖椾含甯�", + DateRange: "2019-09-01", + AvgPrice: 8.88, + Variety1: "", + DateRange1: "2019-09-02", + AvgPrice1: 7.72, + Address:"鍖椾含甯傛捣娣�鍖�001鍙�", + IsChange: 1 +} +let formRules2 = [ + //涓ゅ垪鐨勮〃鍗曪紝formRules鏁版嵁鏍煎紡涓�:[[{},{}]] + [ + { + title: "鍟嗗搧绫诲瀷", + dataKey: "age", + //濡傛灉杩欓噷缁戝畾浜哾ata鏁版嵁锛屽悗鍙颁笉浼氬姞杞芥鏁版嵁婧� + data: [{ key: "1", value: "1" }, { key: "2", value: "2" }], + field: "Variety", + disabled: true, + type: "select" + }, + { + dataKey: "city", + title: "鎵�鍦ㄥ煄甯�", + field: "City", + disabled: true, + type: "select", + data: [] + }], + [ + { + title: "閿�鍞棩鏈�", + field: "DateRange", + disabled: true, + }, + { + title: "閿�鍞环鏍�", + field: "AvgPrice", + disabled: true + }], + [ + { + title: "鐢熶骇鏃ユ湡", + field: "DateRange1", + disabled: true, + }, + { + title: "涓棿浠锋牸", + field: "AvgPrice1", + disabled: true + }], + [ + { + title: "閿�鍞湴鍧�", + field: "Address", + disabled: true, + }, + { + title: "鏄惁鎴愪氦", + field: "IsChange", + dataKey: "enable",//杩欓噷璁剧疆浜嗘暟鎹瓧鍏告簮鐨勭紪鍙蜂細鑷姩浠庡悗鍙板姞杞芥暟鎹簮鐨刱ey/value + data: [], + disabled: true + }] +] + + +export { formFields1, formRules1, formFields2, formRules2 } \ No newline at end of file -- Gitblit v1.9.3