| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:11:21 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-16 00:00:46 |
| | | * @LastEditTime: 2024-04-17 23:35:22 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/configuration.vue |
| | | * 应用设置 |
| | | --> |
| | |
| | | <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> |
| | |
| | | |
| | | <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 { |
| | | radio: '' |
| | | 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> |
| | | |