From ca3903e09980b98a1a46af0c339e9ca00fa04ccd Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期三, 17 四月 2024 23:36:31 +0800 Subject: [PATCH] 应用设置 --- src/views/mdc/configuration.vue | 151 +++++++++++++++++++++++++++---------------------- 1 files changed, 83 insertions(+), 68 deletions(-) diff --git a/src/views/mdc/configuration.vue b/src/views/mdc/configuration.vue index e70cb85..b00cf3a 100644 --- a/src/views/mdc/configuration.vue +++ b/src/views/mdc/configuration.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-04-09 22:11:21 * @LastEditors: Sneed - * @LastEditTime: 2024-04-14 10:31:10 + * @LastEditTime: 2024-04-17 23:35:22 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/configuration.vue * 搴旂敤璁剧疆 --> @@ -10,77 +10,46 @@ <el-card shadow="never"> <el-tabs :tab-position="'left'" class="demo-tabs"> <el-tab-pane label="瀹炴椂鐪嬫澘鏌ヨ缁勮缃�"> - <el-row> - <el-col :span="4"> - 椤甸潰鎺掑垪鏂瑰紡 - </el-col> - <el-col :span="20"> - <el-radio-group v-model="radio"> - <el-radio :value="1">鍏呮弧灞忓箷</el-radio> - <el-radio :value="2">璁剧疆琛屽垪</el-radio> - </el-radio-group> - </el-col> - <el-col :span="4"> - 璁剧疆琛屾暟 - </el-col> - <el-col :span="20"> - <el-input-number v-model="num" :min="1" :max="10" @change="handleChange" /> - </el-col> - <el-col :span="4"> - 璁剧疆鍒楁暟 - </el-col> - <el-col :span="20"> - <el-input-number v-model="num" :min="1" :max="10" @change="handleChange" /> - </el-col> - <el-col> - 涓嬮潰闄堝垪鎷ユ湁鏍囩鐨勬墍鏈夊伐浣嶇粍锛岃閫夋嫨闇�瑕佸湪瀹炴椂鐪嬫澘椤甸潰鏌ヨ鐨勭粍锛屽苟璁惧畾涓�涓粯璁ょ粍 - 濡傛灉鏈厤缃煡璇㈢粍锛屽疄鏃跺伐鍐甸〉闈㈤粯璁ゆ煡璇㈡墍鏈夊伐浣� - </el-col> - <el-col> - 鏌旀�т骇绾� - </el-col> - <el-col> - <el-card style="max-width: 480px"> - <template #header> - <div class="card-header"> - <span>鍗冩枃绉戞妧</span> - </div> - </template> - <p>鎵�鏈夌殑> 鍗冩枃绉戞妧</p> - </el-card> - </el-col> - - <el-col> - 杞﹂棿 - </el-col> - <el-col> - <el-card style="max-width: 480px"> - <template #header> - <div class="card-header"> - <span>鍗冩枃绉戞妧</span> - </div> - </template> - <p>鎵�鏈夌殑> 鍗冩枃绉戞妧</p> - </el-card> - <el-card style="max-width: 480px"> - <template #header> - <div class="card-header"> - <span>鍗冩枃绉戞妧</span> - </div> - </template> - <p>鎵�鏈夌殑> 鍗冩枃绉戞妧</p> - </el-card> - </el-col> - </el-row> + <Board /> </el-tab-pane> <el-tab-pane label="鐘舵�佸拰缁╂晥鏃堕棿璁剧疆"> - + <Status /> </el-tab-pane> <el-tab-pane label="鏁堢巼缁熻璁剧疆"> - + <Efficiency /> </el-tab-pane> <el-tab-pane label="閲囬泦鏁版嵁鏍囩璁剧疆"> - + <scFormTable ref="table1" v-model="Tabledata" stripe hideDelete :addTemplate="addTemplate"> + <el-table-column label="鏁版嵁鏍囩" prop="usageName"> + <template #default="scope"> + <el-input v-if="scope.row.isEdit" v-model="scope.row.usageName"></el-input> + <span v-else>{{ scope.row.usageName }}</span> + </template> + </el-table-column> + <el-table-column label="鏁版嵁鏍囩鏍囪瘑" prop="usageCode"> + <template #default="scope"> + <el-input v-if="scope.row.isEdit" v-model="scope.row.usageCode"></el-input> + <span v-else>{{ scope.row.usageCode }}</span> + </template> + </el-table-column> + <el-table-column label="璁$畻鏂规硶" prop="dataTypeDesc"> + <template #default="scope"> + <el-select v-if="scope.row.isEdit" v-model="scope.row.collectType" style="width: 100%;" + @change="update(scope.row)"> + <el-option v-for="(item, index) in options.rps" :key="index" :label="item.label" + :value="item.value"></el-option> + </el-select> + <span v-else>{{ scope.row.dataTypeDesc }}</span> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" prop="state"> + <template #default="scope"> + <el-button v-show="!scope.row.id || !scope.row.isEdit" + @click="add(scope.row)">淇濆瓨</el-button> + <el-button v-show="!scope.row.isEdit" @click="edit(scope.row)">缂栬緫</el-button> + </template> + </el-table-column> + </scFormTable> </el-tab-pane> </el-tabs> </el-card> @@ -88,13 +57,59 @@ </template> <script> +import Board from './configComp/Board.vue' +import Status from './configComp/Status.vue' +import Efficiency from './configComp/Efficiency.vue' export default { + components: { + Board, + Status, + Efficiency + }, data() { return { - + Tabledata: [], + addTemplate: { + collectType: '', + dataTypeDesc: '', + id: null, + parameter: { + value: 0 + }, + usageCode: '', + usageName: '', + isEdit: false, + } } }, + created() { + this.getList() + }, + methods: { + getList() { + this.$HTTP.get('/api/blade-cps/workstation-wcs-usage/list').then(res => { + if (res.code === 200) { + this.Tabledata = res.data + } + }) + }, + edit(row) { + row.isEdit = true + }, + add(row) { + // /api/blade-cps/workstation-wcs-usage + // collectType + // usageCode + // usageName + + } + } } </script> -<style lang="scss" scoped></style> \ No newline at end of file +<style lang="scss" scoped> +.label { + display: flex; + align-items: center; +} +</style> \ No newline at end of file -- Gitblit v1.9.3