Commit 50eba2cce880819b6745dd0754dd3f08401935f7
1 parent
900b162c
设备任务模块测试
Showing
5 changed files
with
98 additions
and
62 deletions
HHECS.Web/src/main.js
... | ... | @@ -4,7 +4,7 @@ import Vue from 'vue' |
4 | 4 | Vue.prototype.$gl = window.$gl |
5 | 5 | |
6 | 6 | import ElementUI from 'element-ui' |
7 | -import locale from 'element-ui/lib/locale/lang/en'; // lang i18n | |
7 | +import locale from 'element-ui/lib/locale/lang/zh-CN'; // lang i18n | |
8 | 8 | // import locale from 'element-ui/lib/locale/lang/zh-CN'; // lang i18n |
9 | 9 | import 'element-ui/lib/theme-chalk/index.css' |
10 | 10 | |
... | ... | @@ -29,8 +29,8 @@ Vue.prototype.$moment = moment |
29 | 29 | * please remove it before going online ! ! ! |
30 | 30 | */ |
31 | 31 | if (process.env.NODE_ENV === 'production') { |
32 | - const { mockXHR } = require('../mock') | |
33 | - mockXHR() | |
32 | + const { mockXHR } = require('../mock') | |
33 | + mockXHR() | |
34 | 34 | } |
35 | 35 | |
36 | 36 | // set ElementUI lang to EN |
... | ... | @@ -41,8 +41,8 @@ Vue.use(ElementUI, { locale }) |
41 | 41 | Vue.config.productionTip = false |
42 | 42 | |
43 | 43 | new Vue({ |
44 | - el: '#app', | |
45 | - router, | |
46 | - store, | |
47 | - render: h => h(App) | |
44 | + el: '#app', | |
45 | + router, | |
46 | + store, | |
47 | + render: h => h(App) | |
48 | 48 | }) |
... | ... |
HHECS.Web/src/views/table/taskModel_CRGV.vue
... | ... | @@ -250,7 +250,7 @@ |
250 | 250 | </div> |
251 | 251 | </div> |
252 | 252 | <!-- 新增弹框 --> |
253 | - <el-dialog title="主任务新增" :visible.sync="dialogFormVisible"> | |
253 | + <el-dialog title="CRGV任新增" :visible.sync="dialogFormVisible"> | |
254 | 254 | <div class="container"> |
255 | 255 | <div class="box"> |
256 | 256 | <div class="inner-left">关联主任务:</div> |
... | ... | @@ -737,6 +737,9 @@ export default { |
737 | 737 | }, |
738 | 738 | //新增按钮 |
739 | 739 | btnAdd() { |
740 | + this.optionsAddType = []; | |
741 | + this.optionsAddLine = []; | |
742 | + this.optionsAddTos = []; | |
740 | 743 | this.fetchData("CRGVTaskType"); |
741 | 744 | this.fetchData("CRGVLine"); |
742 | 745 | this.fetchData("CRGVAllTo"); |
... | ... | @@ -955,10 +958,11 @@ export default { |
955 | 958 | if (response.data.tos == "") { |
956 | 959 | response.data.tos = []; |
957 | 960 | } else { |
958 | - let a = []; | |
959 | - a.push(response.data.tos); | |
960 | - response.data.tos = a; | |
961 | + response.data.tos = response.data.tos | |
962 | + .split(", ") | |
963 | + .map((item) => item.trim()); | |
961 | 964 | } |
965 | + | |
962 | 966 | switch (response.data.forkFlag) { |
963 | 967 | case 0: |
964 | 968 | response.data.forkFlag = "None"; |
... | ... | @@ -1234,7 +1238,7 @@ export default { |
1234 | 1238 | }, |
1235 | 1239 | }; |
1236 | 1240 | </script> |
1237 | -<style scoped lang="scss"> | |
1241 | +<style lang="scss"> | |
1238 | 1242 | .app-container-father { |
1239 | 1243 | width: 100%; |
1240 | 1244 | height: 100%; |
... | ... | @@ -1461,5 +1465,10 @@ export default { |
1461 | 1465 | border: 1px solid #ccc; /* 大 div 的边框 */ |
1462 | 1466 | } |
1463 | 1467 | } |
1468 | + /* 修改复选框大小 */ | |
1469 | + .el-table .el-checkbox { | |
1470 | + transform: scale(1.8) !important; /* 调整大小 */ | |
1471 | + margin-top: 5px; | |
1472 | + } | |
1464 | 1473 | } |
1465 | 1474 | </style> |
... | ... |
HHECS.Web/src/views/table/taskModel_RGV.vue
... | ... | @@ -255,7 +255,7 @@ |
255 | 255 | </div> |
256 | 256 | </div> |
257 | 257 | <!-- 新增弹框 --> |
258 | - <el-dialog title="主任务新增" :visible.sync="dialogFormVisible"> | |
258 | + <el-dialog title="RGV任务新增" :visible.sync="dialogFormVisible"> | |
259 | 259 | <div class="container"> |
260 | 260 | <div class="box"> |
261 | 261 | <div class="inner-left">关联主任务:</div> |
... | ... | @@ -369,7 +369,7 @@ |
369 | 369 | </div> |
370 | 370 | </el-dialog> |
371 | 371 | |
372 | - <el-dialog title="CRGV任务维护" :visible.sync="dialogFormVisibleTwo"> | |
372 | + <el-dialog title="RGV任务维护" :visible.sync="dialogFormVisibleTwo"> | |
373 | 373 | <div class="containerTwo"> |
374 | 374 | <div class="box1"> |
375 | 375 | <div class="dv-title" style="margin-left: 10px"> |
... | ... | @@ -742,8 +742,12 @@ export default { |
742 | 742 | }, |
743 | 743 | //新增按钮 |
744 | 744 | btnAdd() { |
745 | + this.optionsAddType = []; | |
746 | + this.optionsAddLine = []; | |
747 | + this.optionsAddTos = []; | |
745 | 748 | this.fetchData("RGVTaskType"); |
746 | 749 | this.fetchData("RGVAllTo"); |
750 | + this.fetchData("RGVLine"); | |
747 | 751 | this.dialogFormVisible = true; |
748 | 752 | }, |
749 | 753 | //新增创建按钮 |
... | ... | @@ -830,10 +834,6 @@ export default { |
830 | 834 | }, |
831 | 835 | // 状态数据 |
832 | 836 | fetchData(data, key) { |
833 | - this.optionsAddType = []; | |
834 | - this.options = []; | |
835 | - this.optionsAddLine = []; | |
836 | - this.optionsAddTos = []; | |
837 | 837 | let params = { |
838 | 838 | Code: data, |
839 | 839 | }; |
... | ... | @@ -850,7 +850,7 @@ export default { |
850 | 850 | this.options.push({ value: x.code, label: x.name }); |
851 | 851 | } |
852 | 852 | //线体标记 |
853 | - else if (data == "RGVTaskType") { | |
853 | + else if (data == "RGVLine") { | |
854 | 854 | this.optionsAddLine.push({ value: x.code, label: x.name }); |
855 | 855 | if (this.optionsAddLine.length > 0) { |
856 | 856 | this.elAddDialog.line = this.optionsAddLine[0].value; |
... | ... | @@ -978,10 +978,11 @@ export default { |
978 | 978 | if (response.data.toStations == "") { |
979 | 979 | response.data.toStations = []; |
980 | 980 | } else { |
981 | - let a = []; | |
982 | - a.push(response.data.toStations); | |
983 | - response.data.toStations = a; | |
981 | + response.data.toStations = response.data.toStations | |
982 | + .split(",") | |
983 | + .map((item) => item.trim()); | |
984 | 984 | } |
985 | + | |
985 | 986 | switch (response.data.forkFlag) { |
986 | 987 | case 0: |
987 | 988 | response.data.forkFlag = "None"; |
... | ... | @@ -1288,7 +1289,7 @@ export default { |
1288 | 1289 | }, |
1289 | 1290 | }; |
1290 | 1291 | </script> |
1291 | -<style scoped lang="scss"> | |
1292 | +<style lang="scss"> | |
1292 | 1293 | .app-container-father { |
1293 | 1294 | width: 100%; |
1294 | 1295 | height: 100%; |
... | ... | @@ -1515,5 +1516,10 @@ export default { |
1515 | 1516 | border: 1px solid #ccc; /* 大 div 的边框 */ |
1516 | 1517 | } |
1517 | 1518 | } |
1519 | + /* 修改复选框大小 */ | |
1520 | + .el-table .el-checkbox { | |
1521 | + transform: scale(1.8) !important; /* 调整大小 */ | |
1522 | + margin-top: 5px; | |
1523 | + } | |
1518 | 1524 | } |
1519 | 1525 | </style> |
... | ... |
HHECS.Web/src/views/table/taskModel_host.vue
... | ... | @@ -104,6 +104,7 @@ |
104 | 104 | height="700" |
105 | 105 | @selection-change="handleSelectionChange" |
106 | 106 | highlight-current-row |
107 | + @row-click="handleRowClick" | |
107 | 108 | > |
108 | 109 | <el-table-column type="selection" align="center" width="55"> |
109 | 110 | </el-table-column> |
... | ... | @@ -247,7 +248,7 @@ |
247 | 248 | <div class="box"> |
248 | 249 | <div class="inner-left">任务类型:</div> |
249 | 250 | <div class="inner-right"> |
250 | - <el-select v-model="elAddDialog.task" placeholder="请选择"> | |
251 | + <el-select v-model="elAddDialog.type" placeholder="请选择"> | |
251 | 252 | <el-option |
252 | 253 | v-for="item in optionsAdd" |
253 | 254 | :key="item.value" |
... | ... | @@ -399,19 +400,9 @@ |
399 | 400 | <div class="inner-inner-box1"> |
400 | 401 | <div class="dv-maintenance-text">途径点:</div> |
401 | 402 | <div class="dv-maintenance-text2"> |
402 | - <el-input v-model="elMaintenance.approachPoint" /> | |
403 | - </div> | |
404 | - <div class="dv-maintenance-text3"> | |
405 | - <el-button class="T1" @click="approachPointModify()" | |
406 | - >修改</el-button | |
407 | - > | |
408 | - </div> | |
409 | - </div> | |
410 | - <div class="inner-inner-box2"> | |
411 | - <div class="dv-maintenance-text">添加途径点:</div> | |
412 | - <div class="dv-maintenance-text2"> | |
413 | 403 | <el-select |
414 | - v-model="elMaintenance.approachPointAdd" | |
404 | + v-model="elMaintenance.approachPoint" | |
405 | + multiple | |
415 | 406 | placeholder="请选择" |
416 | 407 | > |
417 | 408 | <el-option |
... | ... | @@ -419,11 +410,14 @@ |
419 | 410 | :key="item.value" |
420 | 411 | :label="item.label" |
421 | 412 | :value="item.value" |
422 | - /> | |
413 | + > | |
414 | + </el-option> | |
423 | 415 | </el-select> |
424 | 416 | </div> |
425 | 417 | <div class="dv-maintenance-text3"> |
426 | - <el-button class="T1">修改</el-button> | |
418 | + <el-button class="T1" @click="approachPointModify()" | |
419 | + >修改</el-button | |
420 | + > | |
427 | 421 | </div> |
428 | 422 | </div> |
429 | 423 | </div> |
... | ... | @@ -620,10 +614,11 @@ export default { |
620 | 614 | data() { |
621 | 615 | return { |
622 | 616 | sysTable: [], |
617 | + selectedRows: [], | |
623 | 618 | // 查询条件 |
624 | 619 | queryConfig: { |
625 | 620 | currentPage: 1, |
626 | - pageSize: 10, | |
621 | + pageSize: 20, | |
627 | 622 | taskNumber: "", |
628 | 623 | remoteTask: "", |
629 | 624 | barcode: "", |
... | ... | @@ -634,7 +629,7 @@ export default { |
634 | 629 | elAddDialog: { |
635 | 630 | remoteTask: "", |
636 | 631 | preRemoteTask: "", |
637 | - type: 0, | |
632 | + type: "", | |
638 | 633 | from: "", |
639 | 634 | to: "", |
640 | 635 | approachPoint: "", |
... | ... | @@ -680,11 +675,25 @@ export default { |
680 | 675 | }; |
681 | 676 | }, |
682 | 677 | created() { |
683 | - this.fetchData("Status"); | |
678 | + this.fetchData("MTaskStatus"); | |
684 | 679 | this.getTableList(); |
685 | 680 | this.userCode = this.$store.state.user.name; |
686 | 681 | }, |
687 | 682 | methods: { |
683 | + handleRowClick(row) { | |
684 | + const index = this.selectedRows.indexOf(row); | |
685 | + | |
686 | + if (index === -1) { | |
687 | + // 如果该行未被选中,则添加到选中行 | |
688 | + this.selectedRows.push(row); | |
689 | + } else { | |
690 | + // 如果该行已被选中,则移除 | |
691 | + this.selectedRows.splice(index, 1); | |
692 | + } | |
693 | + | |
694 | + // 更新选择状态 | |
695 | + this.$refs.table.toggleRowSelection(row, true); | |
696 | + }, | |
688 | 697 | //回传 |
689 | 698 | getOne(data) { |
690 | 699 | this.optionsCommitd = []; |
... | ... | @@ -722,7 +731,7 @@ export default { |
722 | 731 | }, |
723 | 732 | //新增按钮 |
724 | 733 | btnAdd() { |
725 | - this.fetchData("Type"); | |
734 | + this.fetchData("MTaskType"); | |
726 | 735 | this.dialogFormVisible = true; |
727 | 736 | }, |
728 | 737 | //新增创建按钮 |
... | ... | @@ -810,24 +819,16 @@ export default { |
810 | 819 | }, |
811 | 820 | // 状态数据 |
812 | 821 | fetchData(data) { |
813 | - let params = {}; | |
814 | - if (data == "Type") { | |
815 | - params = { | |
816 | - Code: "MTaskType", | |
817 | - }; | |
818 | - } else { | |
819 | - params = { | |
820 | - Code: "MTaskStatus", | |
821 | - }; | |
822 | - } | |
822 | + this.optionsAdd = []; | |
823 | + let params = { Code: data }; | |
823 | 824 | getHostType(params).then((response) => { |
824 | 825 | response.data.dictDetails.forEach((x) => { |
825 | - if (data == "Type") { | |
826 | + if (data == "MTaskType") { | |
826 | 827 | this.optionsAdd.push({ value: x.code, label: x.name }); |
827 | 828 | if (this.optionsAdd.length > 0) { |
828 | - this.elAddDialog.task = this.optionsAdd[0].value; | |
829 | + this.elAddDialog.type = this.optionsAdd[0].value; | |
829 | 830 | } |
830 | - } else { | |
831 | + } else if (data == "MTaskStatus") { | |
831 | 832 | this.options.push({ value: x.code, label: x.name }); |
832 | 833 | } |
833 | 834 | }); |
... | ... | @@ -1000,6 +1001,14 @@ export default { |
1000 | 1001 | }; |
1001 | 1002 | GetMTaskById(params).then((response) => { |
1002 | 1003 | if (response.code == "Success") { |
1004 | + if (response.data.approachPoint == "") { | |
1005 | + response.data.approachPoint = []; | |
1006 | + } else { | |
1007 | + response.data.approachPoint = response.data.approachPoint | |
1008 | + .split(", ") | |
1009 | + .map((item) => item.trim()); | |
1010 | + } | |
1011 | + | |
1003 | 1012 | switch (response.data.mStage) { |
1004 | 1013 | case 0: |
1005 | 1014 | response.data.mStage = "In"; |
... | ... | @@ -1231,9 +1240,11 @@ export default { |
1231 | 1240 | }, |
1232 | 1241 | //途径点 |
1233 | 1242 | approachPointModify() { |
1243 | + let lst = this.elMaintenance.approachPoint, | |
1244 | + result = lst.join(", "); | |
1234 | 1245 | let prams = { |
1235 | 1246 | id: this.multipleSelection[0].id, |
1236 | - data: this.elMaintenance.approachPoint, | |
1247 | + data: result, | |
1237 | 1248 | userCode: this.userCode, |
1238 | 1249 | }; |
1239 | 1250 | ApproachPointEdit(prams).then((response) => { |
... | ... | @@ -1294,7 +1305,7 @@ export default { |
1294 | 1305 | }, |
1295 | 1306 | }; |
1296 | 1307 | </script> |
1297 | -<style scoped lang="scss"> | |
1308 | +<style lang="scss"> | |
1298 | 1309 | .app-container-father { |
1299 | 1310 | width: 100%; |
1300 | 1311 | height: 100%; |
... | ... | @@ -1534,5 +1545,10 @@ export default { |
1534 | 1545 | border: 1px solid #ccc; /* 大 div 的边框 */ |
1535 | 1546 | } |
1536 | 1547 | } |
1548 | + /* 修改复选框大小 */ | |
1549 | + .el-table .el-checkbox { | |
1550 | + transform: scale(1.8) !important; /* 调整大小 */ | |
1551 | + margin-top: 5px; | |
1552 | + } | |
1537 | 1553 | } |
1538 | 1554 | </style> |
... | ... |
HHECS.Web/src/views/table/taskModel_stacker.vue
... | ... | @@ -534,7 +534,7 @@ |
534 | 534 | <div class="dv-maintenance-text">起点站台:</div> |
535 | 535 | <div class="dv-maintenance-text2"> |
536 | 536 | <el-select |
537 | - v-model="elAddDialog.fromStationCode" | |
537 | + v-model="elMaintenance.fromStationCode" | |
538 | 538 | placeholder="请选择" |
539 | 539 | > |
540 | 540 | <el-option |
... | ... | @@ -555,7 +555,7 @@ |
555 | 555 | <div class="dv-maintenance-text">终点站台:</div> |
556 | 556 | <div class="dv-maintenance-text2"> |
557 | 557 | <el-select |
558 | - v-model="elAddDialog.toStationCode" | |
558 | + v-model="elMaintenance.toStationCode" | |
559 | 559 | placeholder="请选择" |
560 | 560 | > |
561 | 561 | <el-option |
... | ... | @@ -841,7 +841,7 @@ export default { |
841 | 841 | fromStationCode: "", |
842 | 842 | toStationCode: "", |
843 | 843 | toStationCodes: "", |
844 | - type: 1, | |
844 | + type: "", | |
845 | 845 | priority: 0, |
846 | 846 | srmCode: "", |
847 | 847 | goodsType: 0, |
... | ... | @@ -959,6 +959,7 @@ export default { |
959 | 959 | const params = this.elAddDialog; |
960 | 960 | CreateSRMTask(params).then((response) => { |
961 | 961 | if (response.code == "Success") { |
962 | + this.getTableList(); | |
962 | 963 | this.$message({ |
963 | 964 | message: "恭喜你,这是一条成功消息", |
964 | 965 | type: "success", |
... | ... | @@ -1303,7 +1304,6 @@ export default { |
1303 | 1304 | break; |
1304 | 1305 | } |
1305 | 1306 | this.elMaintenance = response.data; |
1306 | - this.elMaintenanceTwo = response.data; | |
1307 | 1307 | this.dialogFormVisibleTwo = true; |
1308 | 1308 | } |
1309 | 1309 | }); |
... | ... | @@ -1609,7 +1609,7 @@ export default { |
1609 | 1609 | }, |
1610 | 1610 | }; |
1611 | 1611 | </script> |
1612 | -<style scoped lang="scss"> | |
1612 | +<style lang="scss"> | |
1613 | 1613 | .app-container-father { |
1614 | 1614 | width: 100%; |
1615 | 1615 | height: 100%; |
... | ... | @@ -1836,5 +1836,10 @@ export default { |
1836 | 1836 | border: 1px solid #ccc; /* 大 div 的边框 */ |
1837 | 1837 | } |
1838 | 1838 | } |
1839 | + /* 修改复选框大小 */ | |
1840 | + .el-table .el-checkbox { | |
1841 | + transform: scale(1.8) !important; /* 调整大小 */ | |
1842 | + margin-top: 5px; | |
1843 | + } | |
1839 | 1844 | } |
1840 | 1845 | </style> |
... | ... |