| | |
| | | export default { |
| | | serverUrl: "127.0.0.1:88/api", |
| | | //serverUrl: "localhost:88/api/", |
| | | serverUrl: "127.0.0.1:88/api", |
| | | |
| | | serverUrl2: "10.153.19.150:88" |
| | | //serverUrl:"res.abeim.cn" |
| | | } |
| | |
| | | import {createRouter, createWebHashHistory} from 'vue-router' |
| | | |
| | | import User from '../views/sys/User.vue' |
| | | import Role from '../views/sys/Role.vue' |
| | | import Menu from '../views/sys/Menu.vue' |
| | | // import User from '../views/sys/User.vue' |
| | | // import Role from '../views/sys/Role.vue' |
| | | // import Menu from '../views/sys/Menu.vue' |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHashHistory(), |
| | |
| | | name: 'screen', |
| | | component: () => import('../views/Visualization/screen.vue'), |
| | | children: [ |
| | | { |
| | | path: '/sys/users', |
| | | name: 'SysUser', |
| | | component: User |
| | | }, |
| | | { |
| | | path: '/sys/roles', |
| | | name: 'SysRole', |
| | | component: Role |
| | | }, |
| | | { |
| | | path: '/sys/menus', |
| | | name: 'SysMenu', |
| | | component: Menu |
| | | }, |
| | | // { |
| | | // path: '/sys/users', |
| | | // name: 'SysUser', |
| | | // component: User |
| | | // }, |
| | | // { |
| | | // path: '/sys/roles', |
| | | // name: 'SysRole', |
| | | // component: Role |
| | | // }, |
| | | // { |
| | | // path: '/sys/menus', |
| | | // name: 'SysMenu', |
| | | // component: Menu |
| | | // }, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | // 查询任务 |
| | | |
| | | |
| | | PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | // PlcParameterObject plcmes = PLCAutoMes.PlcMesObject; |
| | | |
| | | List<DownStorageCageDetails> list = downStorageCageDetailsService.CacheOut(1, 5); |
| | | List<DownStorageCageDetails> list2 = downStorageCageDetailsService.CacheOut(6, 10); |
| | |
| | | public class ExcelToJsonConverter { |
| | | |
| | | public static void main(String[] args) { |
| | | String excelFilePath = "src/main/resources/JsonFile/alarm.xlsx"; |
| | | String excelFilePath = "src/main/resources/JsonFile/PlcdownGlass.xlsx"; |
| | | String sheetName = "Sheet1"; |
| | | int addressColumnIndex = 0; |
| | | int nameColumnIndex = 1; |
| | | |
| | | //int unitColumnIndex = 2; |
| | | String outputFilePath = "src/main/resources/JsonFile/PlcAlarm.json"; |
| | | String outputFilePath = "src/main/resources/JsonFile/PlcdownGlass.json"; |
| | | |
| | | try (Workbook workbook = new XSSFWorkbook(new FileInputStream(excelFilePath))) { |
| | | Sheet sheet = workbook.getSheet(sheetName); |
| | |
| | | LinkedHashMap<String, Object> resultObject = new LinkedHashMap<>(); |
| | | resultObject.put("plcAddressBegin", "DB100.0"); |
| | | resultObject.put("plcAddressLenght", String.valueOf(plcAddressLength)); |
| | | // resultObject.put("dataType", "word"); |
| | | resultObject.put("dataType", "bit"); |
| | | resultObject.put("dataType", "word"); |
| | | // resultObject.put("dataType", "bit"); |
| | | resultObject.put("parameteInfor", jsonList); |
| | | |
| | | Gson gson = new Gson(); |
New file |
| | |
| | | {
|
| | | "plcAddressBegin": "DB100.0",
|
| | | "plcAddressLenght": "142",
|
| | | "dataType": "word",
|
| | | "parameteInfor": [
|
| | | {
|
| | | "codeId": "PLC卧式理片任务请求字",
|
| | | "addressIndex": "0",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G04ID",
|
| | | "addressIndex": "2",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "4",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "6",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "8",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "10",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "12",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "14",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "16",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "18",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "MES任务发送字",
|
| | | "addressIndex": "20",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "进片格子",
|
| | | "addressIndex": "22",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "出片格子",
|
| | | "addressIndex": "24",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "出片ID",
|
| | | "addressIndex": "26",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "前端后端下片",
|
| | | "addressIndex": "28",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "30",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "32",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "34",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "36",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "38",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "40",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "42",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "44",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "46",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "48",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "50",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "52",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "54",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "MES任务状态",
|
| | | "addressIndex": "56",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "58",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警状态",
|
| | | "addressIndex": "60",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字1",
|
| | | "addressIndex": "62",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字2",
|
| | | "addressIndex": "64",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字3",
|
| | | "addressIndex": "66",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "报警字4",
|
| | | "addressIndex": "68",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "内容",
|
| | | "addressIndex": "70",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "设备状态字",
|
| | | "addressIndex": "72",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "74",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "76",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出1",
|
| | | "addressIndex": "78",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出2",
|
| | | "addressIndex": "80",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出3",
|
| | | "addressIndex": "82",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出4",
|
| | | "addressIndex": "84",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出5",
|
| | | "addressIndex": "86",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出6",
|
| | | "addressIndex": "88",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "输入输出7",
|
| | | "addressIndex": "90",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "92",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "94",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "96",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "98",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "备用",
|
| | | "addressIndex": "100",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G04动作状态",
|
| | | "addressIndex": "102",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G05动作状态",
|
| | | "addressIndex": "104",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G06动作状态",
|
| | | "addressIndex": "106",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G07动作状态",
|
| | | "addressIndex": "108",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G08动作状态",
|
| | | "addressIndex": "110",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G09动作状态",
|
| | | "addressIndex": "112",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G10动作状态",
|
| | | "addressIndex": "114",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G11动作状态",
|
| | | "addressIndex": "116",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G12动作状态",
|
| | | "addressIndex": "118",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G13动作状态",
|
| | | "addressIndex": "120",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G04ID",
|
| | | "addressIndex": "122",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G05ID",
|
| | | "addressIndex": "124",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G06ID",
|
| | | "addressIndex": "126",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G07ID",
|
| | | "addressIndex": "128",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G08ID",
|
| | | "addressIndex": "130",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G09ID",
|
| | | "addressIndex": "132",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G10ID",
|
| | | "addressIndex": "134",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G11ID",
|
| | | "addressIndex": "136",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G12ID",
|
| | | "addressIndex": "138",
|
| | | "addressLenght": "2"
|
| | | },
|
| | | {
|
| | | "codeId": "G13ID",
|
| | | "addressIndex": "140",
|
| | | "addressLenght": "2"
|
| | | }
|
| | | ]
|
| | | } |