| | |
| | | <el-dialog title="数据点" v-model="visible" :width="'80%'" destroy-on-close @closed="$emit('closed')"> |
| | | <p style="margin-bottom: 14px;"> |
| | | <span style="margin-right: 8px;">类型</span> |
| | | <el-select v-model="type" placeholder="Select" size="small" style="width: 240px" @change="changeType"> |
| | | <el-select v-model="type" placeholder="类型" size="small" style="width: 240px" @change="changeType"> |
| | | <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </p> |
| | |
| | | }, |
| | | methods: { |
| | | changeType(val) { |
| | | this.$confirm(`切换类型将删除所有已配置数据点`, '提示', { |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (this.tabledata.length > 0) { |
| | | this.$confirm(`切换类型将删除所有已配置数据点`, '提示', { |
| | | type: 'warning' |
| | | }).then(() => { |
| | | try { |
| | | this.cols = JSON.parse(this.typeList.find(v => v.id === val).dpHeadFull) |
| | | this.tabledata = [] |
| | | } catch (error) { |
| | | this.cols = [] |
| | | } |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | } else { |
| | | try { |
| | | this.cols = JSON.parse(this.typeList.find(v => v.id === val).dpHeadFull) |
| | | this.table = [] |
| | | } catch (error) { |
| | | this.cols = [] |
| | | } |
| | | }).catch(() => { |
| | | } |
| | | |
| | | }) |
| | | |
| | | }, |
| | | //显示 |
| | |
| | | Object.keys(this.form).forEach(key => { |
| | | this.form[key] = params[key] |
| | | }) |
| | | if (this.form.calendarCode) this.form.calendarCodeWaiting = this.form.calendarCodeWaiting || this.form.calendarCode |
| | | |
| | | this.$HTTP.get(`/api/blade-cps/workstation/get?workstationId=${params.id}`).then(res => { |
| | | this.form = res?.data |
| | | if (this.form.calendarCode && !this.form.calendarCodeWaiting) this.form.calendarCodeWaiting = this.form.calendarCode |
| | | this.$HTTP.get(`/api/blade-cps/workstation-workbench/listWorkbench?workstationId=${params.id}`).then(res => { |
| | | this.form.workbenchVOList = res?.data?.workstationList || [] |
| | | }) |
| | |
| | | type="primary" size="small">保存</el-button> --> |
| | | <!-- <el-button text type="primary" size="small" |
| | | @click="editDMP">修改DMP配置</el-button> --> |
| | | <el-button style="margin-left: auto;" @click="getExport" |
| | | text type="primary" size="small">导出</el-button> |
| | | <el-button @click="editCollection" text type="primary" |
| | | size="small">数据点编辑</el-button> |
| | | |
| | | </el-header> |
| | | <el-main> |
| | | <!-- <el-table :data="list" height="200px"> |
| | |
| | | this.queryList() |
| | | }, |
| | | methods: { |
| | | // 数据点导出 |
| | | getExport() { |
| | | this.$HTTP.get(`/api/blade-cps/workstation/export-dp?` + this.$TOOL.qsStringify({ |
| | | workstationId: this.previewData.id |
| | | })).then(res => { |
| | | if (res.code == 200) { |
| | | window.open(res.data.link) |
| | | } |
| | | }) |
| | | }, |
| | | // 数据点编辑 |
| | | editCollection() { |
| | | this.$refs.CollDialog.open('edit', this.previewData) |
| | |
| | | return |
| | | } |
| | | console.log(data, '>>>>>>>>>>>') |
| | | this.$HTTP.get(`/api/blade-cps/workstation/listDmpVariablesByMachineId?machineId=${data.machineId}`).then(res => { |
| | | data.machineId && this.$HTTP.get(`/api/blade-cps/workstation/listDmpVariablesByMachineId?machineId=${data.machineId}`).then(res => { |
| | | this.list = res?.data |
| | | // Object.keys(this.basic).forEach(key => { |
| | | // this.basic[key] = res?.data?.[key] || '-' |
| | |
| | | /* |
| | | * @Date: 2024-03-23 09:49:06 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2024-10-05 17:23:49 |
| | | * @LastEditTime: 2024-10-06 10:17:18 |
| | | * @FilePath: /cps-web/vue.config.js |
| | | */ |
| | | const { defineConfig } = require('@vue/cli-service') |
| | |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/api/blade-cps/workstation/export-dp': { |
| | | target: 'http://120.46.212.231:4102', |
| | | // ws: true, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | }, |
| | | '/api': { |
| | | target: process.env.VUE_APP_API_BASEURL, |
| | | ws: true, |