| src/api/model/machineManagement.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/console/workstation/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/tpm/Machine.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/tpm/MachineGroup.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/tpm/machine-management.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/model/machineManagement.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ /* * @Date: 2024-03-24 11:37:47 * @LastEditors: Sneed * @LastEditTime: 2024-04-27 20:26:42 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/api/model/machineManagement.js */ import config from "@/config" import http from "@/utils/request" export default { getList: { url: `${config.API_URL}/blade-cps/machine/page`, name: "è·åå·¥ä½å表", get: async function (params) { return await http.post(this.url, { ...params }, { params: { current: params.current, size: params.size } }); }, }, } src/views/console/workstation/index.vue
@@ -47,14 +47,10 @@ ref="table" :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe> <el-table-column type="selection" width="50"></el-table-column> <el-table-column label="å·¥ä½ç¼å·" prop="code" width="120" sortable='custom'></el-table-column> <el-table-column label="å·¥ä½åç§°" prop="name" width="120" sortable='custom'></el-table-column> <el-table-column label="å·¥ä½ç±»å" prop="type" width="120" sortable='custom'></el-table-column> <el-table-column label="工使¥å" prop="calendarName" width="120" sortable='custom'></el-table-column> <el-table-column label="å·¥ä½ç¼å·" prop="code" width="120"></el-table-column> <el-table-column label="å·¥ä½åç§°" prop="name" width="120"></el-table-column> <el-table-column label="å·¥ä½ç±»å" prop="type" width="120"></el-table-column> <el-table-column label="工使¥å" prop="calendarName" width="120"></el-table-column> <el-table-column label="æä½" fixed="right" align="right" width="160"> <template #default="scope"> <el-button-group> @@ -129,22 +125,31 @@ <el-container> <el-header> <span>ééä¿¡æ¯</span> <el-button @click="editFlag = !editFlag" style="margin-left: auto;" text type="primary" size="small">é 置工ä½éé</el-button> <el-button v-show="editFlag" @click="saveInfo" text type="primary" size="small">ä¿å</el-button> <el-button text type="primary" size="small">ä¿®æ¹DMPé ç½®</el-button> <el-button @click="editFlag = !editFlag" style="margin-left: auto;" text type="primary" size="small">é 置工ä½éé</el-button> <el-button v-show="editFlag" @click="saveInfo" text type="primary" size="small">ä¿å</el-button> <el-button text type="primary" size="small">ä¿®æ¹DMPé ç½®</el-button> </el-header> <el-main> <el-table :data="list" height="200px"> <el-table-column label="ééåéåç§°" prop="name" /> <el-table-column label="å·¥ä½åéåç§°" prop="dataItem"> <template #default="scope"> <el-input :disabled="!editFlag" v-model="scope.row.dataItem"></el-input> <el-input :disabled="!editFlag" v-model="scope.row.dataItem"></el-input> </template> </el-table-column> <el-table-column label="æ°æ®æ ç¾" prop="description"> <template #default="scope"> <el-select :disabled="!editFlag" v-model="scope.row.description"> <el-option v-for="item in workstation_param_type" :key="item.dictKey" :label="item.dictValue" <el-select :disabled="!editFlag" v-model="scope.row.description"> <el-option v-for="item in workstation_param_type" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey-0" /> </el-select> <!-- {{ dmp_data_type.find(v => v.dictKey == scope.row.wcsDataType)?.dictValue }} --> @@ -152,8 +157,11 @@ </el-table-column> <el-table-column label="æ°æ®ç±»å«" prop="wcsDataType"> <template #default="scope"> <el-select disabled v-model="scope.row.wcsDataType"> <el-option v-for="item in dmp_data_type" :key="item.dictKey" :label="item.dictValue" <el-select disabled v-model="scope.row.wcsDataType"> <el-option v-for="item in dmp_data_type" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey-0" /> </el-select> <!-- {{ dmp_data_type.find(v => v.dictKey == scope.row.wcsDataType)?.dictValue }} --> @@ -161,17 +169,20 @@ </el-table-column> <el-table-column label="大å±" prop="bigScreen"> <template #default="scope"> <el-checkbox :disabled="!editFlag" v-model="scope.row.bigScreen" /> <el-checkbox :disabled="!editFlag" v-model="scope.row.bigScreen" /> </template> </el-table-column> <el-table-column label="宿¶æ°æ®" prop="realTimeData"> <template #default="scope"> <el-checkbox :disabled="!editFlag" v-model="scope.row.realTimeData" /> <el-checkbox :disabled="!editFlag" v-model="scope.row.realTimeData" /> </template> </el-table-column> <el-table-column label="è¿ç¨åæ°" prop="processParameter"> <template #default="scope"> <el-checkbox :disabled="!editFlag" v-model="scope.row.processParameter" /> <el-checkbox :disabled="!editFlag" v-model="scope.row.processParameter" /> </template> </el-table-column> </el-table> @@ -701,6 +712,7 @@ } } } .workbench { list-style: none; } src/views/tpm/Machine.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,126 @@ <!-- * @Date: 2024-04-27 20:04:34 * @LastEditors: Sneed * @LastEditTime: 2024-04-27 20:38:52 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/Machine.vue --> <template> <el-container> <el-aside width="200px" v-loading="showGrouploading"> <el-container> <el-main class="nopadding"> <el-tree ref="group" default-expand-all node-key="id" :data="group" :current-node-key="params.groupId" :highlight-current="true" @node-click="nodeClick"></el-tree> </el-main> </el-container> </el-aside> <el-container> <el-header> <div class="left-panel"> <el-button size="small" @click="table_add" type="primary" icon="el-icon-plus"></el-button> <el-button size="small" type="danger" plain icon="el-icon-delete" @click="batchDel"></el-button> <!-- <el-button type="primary" plain>å¯¼å ¥</el-button> <el-button type="primary" plain>æ¹éæä½</el-button> --> </div> <div class="right-panel"> <div class="right-panel-search"> <span>ç±»å</span> <el-select size="small" v-model="params.machineTypeId" style="width: 240px"> <el-option size="small" v-for="item in types" :key="item.value" :label="item.label" :value="item.value" /> </el-select> <span>ç¶æ</span> <el-select size="small" v-model="params.status" style="width: 240px"> <el-option size="small" v-for="item in status" :key="item.value" :label="item.label" :value="item.value" /> </el-select> <el-input size="small" v-model="params.machineName" style="width: 240px" placeholder="请è¾å ¥æºå¨åç§°" clearable></el-input> <el-button size="small" @click="search" type="primary" icon="el-icon-search"></el-button> </div> </div> </el-header> <el-main class="nopadding"> <scTable highlight-current-row @dataChange="dataChange" @row-click="rowClick" ref="table" :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe> <el-table-column type="selection" width="50"></el-table-column> <el-table-column label="æºå¨ç¼å·" prop="machineCode" width="120"></el-table-column> <el-table-column label="æºå¨åç§°" prop="machineName" width="120"></el-table-column> <el-table-column label="æå±æºå¨ç»" prop="groupName" width="120"></el-table-column> <el-table-column label="æºå¨ç±»å" prop="machineTypeName" width="120"></el-table-column> <el-table-column label="æºå¨åºåå·" prop="serialNo" width="120"></el-table-column> <el-table-column label="çç¼å·" prop="shortCode" width="120"></el-table-column> <el-table-column label="æºå¨è§æ ¼" prop="machineModel" width="120"></el-table-column> <el-table-column label="使ç¨ç¶æ" prop="machineUseStatusName" width="120"></el-table-column> <el-table-column label="æä½" fixed="right" align="right" width="160"> <template #default="scope"> <el-button-group> <el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">ç¼è¾</el-button> <el-popconfirm title="ç¡®å®å é¤åï¼" @confirm="table_del(scope.row, scope.$index, '0')"> <template #reference> <el-button text type="primary" size="small">å é¤</el-button> </template> </el-popconfirm> </el-button-group> </template> </el-table-column> </scTable> </el-main> </el-container> </el-container> </template> <script> export default { data() { return { apiObj: this.$API.machineManagement.getList, group: [], treeCheckKey: '', params: { groupId: '', machineCode: '', machineName: '', machineTypeId: '', status: 1, }, status: [ { label: 'å¯ç¨', value: 1 }, { label: 'åç¨', value: 0 } ], types: [] } }, created() { this.getTreeData() }, methods: { getTreeData() { this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => { if (res.code === 200) { this.group = res.data this.params.groupId = res.data[0].id } }) }, nodeClick(node) { this.params.groupId = node.id }, search() { this.$refs.table.reload(this.params) }, table_add() { }, batchDel() { }, } } </script> <style lang="scss" scoped></style> src/views/tpm/MachineGroup.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,80 @@ <!-- * @Date: 2024-04-27 20:02:44 * @LastEditors: Sneed * @LastEditTime: 2024-04-27 20:49:52 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/tpm/MachineGroup.vue --> <template> <el-container> <el-aside width="200px" v-loading="showGrouploading"> <el-container> <el-main class="nopadding"> <el-tree ref="group" node-key="id" :data="group" :current-node-key="treeCheckKey" :highlight-current="true" default-expand-all @node-click="groupClick"></el-tree> </el-main> </el-container> </el-aside> <el-container> <el-header> <div class="left-panel"> <el-button @click="addChild" type="primary" plain>æ°å¢ä¸çº§</el-button> <el-button @click="del" type="danger" plain>å é¤</el-button> </div> </el-header> <el-main class=""> <el-form :model="form" :rules="rules" ref="dialogForm" label-width="200px" label-position="left"> <el-form-item label="ä¸çº§ç®å½" prop="parentName"> <el-input style="width: 240px" v-model="form.parentName"></el-input> </el-form-item> <el-form-item label="æºå¨ç»åç§°" prop="name"> <el-input style="width: 240px" v-model="form.name" clearable></el-input> </el-form-item> </el-form> <el-button @click="save" style="width: 100px" type="primary" plain>ä¿å</el-button> </el-main> </el-container> </el-container> </template> <script> export default { data() { return { group: [], treeCheckKey: '', form: { name: '', parentName: '', parentId: '', id: '', groupType: 'group_machine', groupCategory: '1', code: '' }, } }, created() { this.getTreeData() }, methods: { getTreeData() { this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => { if (res.code === 200) { this.group = res.data this.treeCheckKey = res.data[0].id } }) }, groupClick() { }, addChild() { }, del() { }, save() { } } } </script> <style lang="scss" scoped></style> src/views/tpm/machine-management.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,111 @@ <template> <el-main> <el-card shadow="never"> <el-tabs tab-position="top" class="custom-tabs" v-model="activeName"> <el-tab-pane label="æºå¨å°è´¦" name="1"> <Machine></Machine> </el-tab-pane> <el-tab-pane label="æºå¨ç»" name="2"> <MachineGroup></MachineGroup> </el-tab-pane> </el-tabs> </el-card> <!-- <Dialog ref="dialog" @success="success" :option="{ types, status, group }"></Dialog> --> </el-main> </template> <script> import pmsPng from '@/assets/pms.png' // import Dialog from './Dialog.vue' import MachineGroup from './MachineGroup.vue' import Machine from './Machine.vue' export default { name: 'system', components: { // Dialog, MachineGroup, Machine }, data() { return { activeName: '1', } }, watch: { activeName: { handler(val) { // this.queryList().then(() => { // if (val == 1) { // console.log('>>>>>>>>>>>>>>', this.treeCheckedNode) // this.apiObj = this.$API.workstation.getList // this.params = { // groupId: this.treeCheckedNode.id, // keyWord: '', // status: 1, // type: '' // } // this.groupClick1(this.treeCheckedNode) // } // }) }, immediate: true }, treeCheckedNode: { handler(val) { this.addGroupShow = false Object.keys(this.form).forEach(key => { this.form[key] = val?.[key] }) }, deep: true } }, created() { this.init() this.queryList() }, methods: { } } </script> <style lang="scss" scoped> .show-info { list-style: none; font-size: 14px; } .preview-title { padding: 12px; margin-bottom: 14px; font-size: 16px; } .preview-content { font-size: 14px; display: flex; align-items: center; .img { width: 30%; } ul { list-style: none; display: flex; flex-wrap: wrap; li { width: 50%; flex: 1 0 auto; margin-bottom: 10px; } } } .workbench { list-style: none; } </style>