| | |
| | | .w_18em {width: 18em;} |
| | | .w_19em {width: 19em;} |
| | | .w_20em {width: 20em;} |
| | | .pr_o4em {padding-right: .4em;} |
| | | .pr_o6em {padding-right: .6em;} |
| | | .pr_o8em {padding-right: .8em;} |
| | | .pr_1em {padding-right: 1em;} |
| | | /* home state */ |
| | | .home-state { |
| | | color: #47F030; |
| | |
| | | line-height: 0.32rem; |
| | | } |
| | | |
| | | .el-dialog { |
| | | color: #333; |
| | | } |
| | | .dialog-bg { |
| | | color: #fff; |
| | | } |
| | | /** |
| | | * 弹窗中表格隔行变色 |
| | | */ |
| | |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 250 |
| | | ,label: '电池组1' |
| | | ,label: '1#蓄电池组' |
| | | ,noDraw: true |
| | | ,cbfn_click: function () { |
| | | window.open('/DyEnvir_system/big_screen/index.html#/?idx=0', '_self'); |
| | |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 380 |
| | | ,label: '电池组2' |
| | | ,label: '2#蓄电池组' |
| | | ,noDraw: true |
| | | ,cbfn_click: function () { |
| | | window.open('/DyEnvir_system/big_screen/index.html#/?idx=1', '_self'); |
| | |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 510 |
| | | ,label: '电池组3' |
| | | ,label: '3#蓄电池组' |
| | | ,noDraw: true |
| | | ,cbfn_click: function () { |
| | | window.open('/DyEnvir_system/big_screen/index.html#/?idx=2', '_self'); |
| | |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 640 |
| | | ,label: '电池组4' |
| | | ,label: '4#蓄电池组' |
| | | ,noDraw: true |
| | | ,cbfn_click: function () { |
| | | window.open('/DyEnvir_system/big_screen/index.html#/?idx=3', '_self'); |
| | |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 250 |
| | | ,label: '电池组1' |
| | | ,label: '1#蓄电池组' |
| | | ,noDraw: status.batt1 && flag |
| | | }); |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 380 |
| | | ,label: '电池组2' |
| | | ,label: '2#蓄电池组' |
| | | ,noDraw: status.batt2 && flag |
| | | }); |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 510 |
| | | ,label: '电池组3' |
| | | ,label: '3#蓄电池组' |
| | | ,noDraw: status.batt3 && flag |
| | | }); |
| | | can.drawBatt({ |
| | | startX: 760 |
| | | ,startY: 640 |
| | | ,label: '电池组4' |
| | | ,label: '4#蓄电池组' |
| | | ,noDraw: status.batt4 && flag |
| | | }); |
| | | } |
| | |
| | | ,getProgress () { |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = Number(res.data[0].toFixed(0)); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | |
| | | <!-- <div class="title vertical_middle">负载柜自动加载画面</div> --> |
| | | <div class="flex_contain"> |
| | | <div class="item" v-for="(item, index) in list" :key="index"> |
| | | <div class="item_title vertical_middle">{{item.dev_name}}</div> |
| | | <div class="item_title vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div> |
| | | <!-- 按钮组 --> |
| | | <div class="item_btn_grp"> |
| | | <div class="vertical_middle"> |
| | |
| | | <el-button type="primary" @click="callBack">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import FlexLayout from '@/components/FlexLayout' |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | export default { |
| | | name: 'AutoLoad', |
| | | components: { |
| | | FlexLayout |
| | | ,ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | export_id: 0, |
| | | export_name: '', |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | confirmTxt: '', |
| | | confirmVisible: false, |
| | | cbFn: null, |
| | |
| | | console.warn(error); |
| | | }); |
| | | } |
| | | // 数据导出 |
| | | ,exportData (obj) { |
| | | console.log('数据导出'); |
| | | this.export_id = obj.dev_id; |
| | | this.export_name = obj.dev_name; |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: this.export_name, |
| | | dev_id: this.export_id, |
| | | export_num: 1, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.getInfo().then(() => { |
| | |
| | | text-decoration: underline; |
| | | font-weight: bolder; |
| | | } |
| | | .btn_3d.btn_export { |
| | | margin-left: 1em; |
| | | } |
| | | </style> |
| | |
| | | <div class="flex_contain"> |
| | | <div class="item" v-for="(item, itemIndex) in list" :key="itemIndex"> |
| | | <!-- 柜名 --> |
| | | <div class="item_title vertical_middle">{{item.dev_name}}</div> |
| | | <div class="item_title vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div> |
| | | <!-- 按钮组 --> |
| | | <div class="item_btn_grp"> |
| | | <div class="vertical_middle"> |
| | |
| | | <el-button type="primary" @click="callBack">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import FlexLayout from '@/components/FlexLayout' |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | export default { |
| | | name: 'BurstLoad', |
| | | components: { |
| | | FlexLayout |
| | | ,ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | export_id: 0, |
| | | export_name: '', |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | confirmTxt: '', |
| | | confirmVisible: false, |
| | | cbFn: null, |
| | |
| | | console.warn(error); |
| | | }); |
| | | } |
| | | // 数据导出 |
| | | ,exportData (obj) { |
| | | console.log('数据导出'); |
| | | this.export_id = obj.dev_id; |
| | | this.export_name = obj.dev_name; |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: this.export_name, |
| | | dev_id: this.export_id, |
| | | export_num: 1, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.getInfo().then(() => { |
| | |
| | | text-decoration: underline; |
| | | font-weight: bolder; |
| | | } |
| | | .btn_3d.btn_export { |
| | | margin-left: 1em; |
| | | } |
| | | </style> |
| | |
| | | <div class="flex_contain"> |
| | | <div class="item" v-for="(item, index) in list" :key="index"> |
| | | <!-- 柜名 --> |
| | | <div class="name vertical_middle">{{item.dev_name}}</div> |
| | | <div class="name vertical_middle">{{item.dev_name}}<div class="btn_3d btn_export" @click="exportData(item)">数据导出</div></div> |
| | | <!-- 是否允许合闸 --> |
| | | <div class="info_voltage"> |
| | | <div class="lay_label vertical_middle"> |
| | |
| | | <div class="btn_3d" @click="goTo('/load/burst')">突加突卸</div> |
| | | </div> |
| | | </div> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | <!-- ROOTEND --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | |
| | | export default { |
| | | name: 'MainLoad', |
| | | components: { |
| | | ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | timer: new this.$common.Timeout(), |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | export_id: 0, |
| | | export_name: '', |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | info: [], |
| | | list: [] |
| | | list: [], |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.getStatus(); |
| | | this.timer.open(); |
| | | }, 1000); |
| | | } |
| | | // 数据导出 |
| | | ,exportData (obj) { |
| | | console.log('数据导出'); |
| | | this.export_id = obj.dev_id; |
| | | this.export_name = obj.dev_name; |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: this.export_name, |
| | | dev_id: this.export_id, |
| | | export_num: 1, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | .footer .btn-grp .btn_3d { |
| | | padding: 6px 16px; |
| | | } |
| | | .btn_3d.btn_export { |
| | | margin-left: 1em; |
| | | } |
| | | </style> |
| | |
| | | <div class="lay_label vertical_middle">{{item.dev_name}}</div> |
| | | <div class="lay_content vertical_middle"> |
| | | <div class="btn_3d" v-btn-confirm="handleConfirm" data-fn="switchOff" data-confirmTxt="全部分闸确认" :param="JSON.stringify(['CONTEXT.list[' + index + ']'])">全部分闸</div> |
| | | <div class="btn_3d btn_export" @click="exportData(item)">数据导出</div> |
| | | </div> |
| | | </div> |
| | | <!-- 是否允许合闸 --> |
| | |
| | | <el-button type="primary" @click="callBack">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | |
| | | export default { |
| | | name: 'ManualLoad', |
| | | components: { |
| | | ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | export_id: 0, |
| | | export_name: '', |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | confirmTxt: '', |
| | | confirmVisible: false, |
| | | cbFn: null, |
| | |
| | | } |
| | | }, 100); |
| | | } |
| | | } |
| | | // 数据导出 |
| | | ,exportData (obj) { |
| | | console.log('数据导出'); |
| | | this.export_id = obj.dev_id; |
| | | this.export_name = obj.dev_name; |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: this.export_name, |
| | | dev_id: this.export_id, |
| | | export_num: 1, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | |
| | | clip: rect(0 4px 64px 0); |
| | | } |
| | | } |
| | | |
| | | .btn_3d.btn_export { |
| | | margin-left: 1em; |
| | | } |
| | | </style> |
| | |
| | | ,getProgress () { |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = Number(res.data[0].toFixed(0)); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | |
| | | ,getProgress () { |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = Number(res.data[0].toFixed(0)); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | |
| | | <div class="btn-group"> |
| | | <div class="btn_3d" @click="toWater(2)">切换到2号水冷装置</div> |
| | | <div class="btn_3d" @click="toWater(3)">切换到3号水冷装置</div> |
| | | <div class="btn_3d" @click="exportData">数据导出</div> |
| | | <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div> |
| | | </div> |
| | | <div class="page_content" :class="{'turn_end': showTable}"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <rotate-menu class="menu_contain"> |
| | | <!-- <rotate-menu class="menu_contain"> |
| | | <div class="main posA_full">菜单</div> |
| | | <ul class="menu" slot="sub"> |
| | | <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li> |
| | |
| | | <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li> |
| | | <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li> |
| | | </ul> |
| | | </rotate-menu> |
| | | </rotate-menu> --> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import RotateMenu from '@/components/RotateMenu'; |
| | | // import RotateMenu from '@/components/RotateMenu'; |
| | | import ScienceBox from '../../components/ScienceBox' |
| | | import EleCircle from '@/script/drawplus' |
| | | import draw from '@/script/draw_water_cooling'; |
| | | import AssembleTable from '@/components/AssembleTable'; |
| | | import type from '@/script/config_water'; |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | |
| | | let can, can1, resizeHandler; |
| | | // 临时存放格式化后的表格数据 |
| | |
| | | export default { |
| | | name: 'WaterCooling', |
| | | components: { |
| | | RotateMenu, |
| | | // RotateMenu, |
| | | ScienceBox, |
| | | AssembleTable |
| | | ,ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | tlist: { |
| | | rtData: [], |
| | | branchData: [], |
| | |
| | | // draw.update1(can1, this.G_status); |
| | | }, 1000); |
| | | } |
| | | // 数据导出 |
| | | ,exportData () { |
| | | console.log('数据导出'); |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: '1号水冷装置', |
| | | dev_id: water_id, |
| | | export_num: 5, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | | const $container = this.$refs.container; |
| | |
| | | <div class="btn-group"> |
| | | <div class="btn_3d" @click="toWater(1)">切换到1号水冷装置</div> |
| | | <div class="btn_3d" @click="toWater(3)">切换到3号水冷装置</div> |
| | | <div class="btn_3d" @click="exportData">数据导出</div> |
| | | <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div> |
| | | </div> |
| | | <div class="page_content" :class="{'turn_end': showTable}"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <rotate-menu class="menu_contain"> |
| | | <!-- <rotate-menu class="menu_contain"> |
| | | <div class="main posA_full">菜单</div> |
| | | <ul class="menu" slot="sub"> |
| | | <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li> |
| | |
| | | <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li> |
| | | <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li> |
| | | </ul> |
| | | </rotate-menu> |
| | | </rotate-menu> --> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import RotateMenu from '@/components/RotateMenu'; |
| | | // import RotateMenu from '@/components/RotateMenu'; |
| | | import ScienceBox from '../../components/ScienceBox' |
| | | import EleCircle from '@/script/drawplus' |
| | | import draw from '@/script/draw_water_cooling'; |
| | | import AssembleTable from '@/components/AssembleTable'; |
| | | import type from '@/script/config_water'; |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | |
| | | let can, can1, resizeHandler; |
| | | // 临时存放格式化后的表格数据 |
| | |
| | | export default { |
| | | name: 'WaterCooling', |
| | | components: { |
| | | RotateMenu, |
| | | // RotateMenu, |
| | | ScienceBox, |
| | | AssembleTable |
| | | ,ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | tlist: { |
| | | rtData: [], |
| | | branchData: [], |
| | |
| | | // draw.update2(can1, this.G_status); |
| | | }, 1000); |
| | | } |
| | | // 数据导出 |
| | | ,exportData () { |
| | | console.log('数据导出'); |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: '2号水冷装置', |
| | | dev_id: water_id, |
| | | export_num: 5, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | | const $container = this.$refs.container; |
| | |
| | | <div class="btn-group"> |
| | | <div class="btn_3d" @click="toWater(1)">切换到1号水冷装置</div> |
| | | <div class="btn_3d" @click="toWater(2)">切换到2号水冷装置</div> |
| | | <div class="btn_3d" @click="exportData">数据导出</div> |
| | | <div class="btn_3d btn-toggle" @click="changeStatus">{{showTable ? '显示运行图' : '显示表格'}}</div> |
| | | </div> |
| | | <div class="page_content" :class="{'turn_end': showTable}"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <rotate-menu class="menu_contain"> |
| | | <!-- <rotate-menu class="menu_contain"> |
| | | <div class="main posA_full">菜单</div> |
| | | <ul class="menu" slot="sub"> |
| | | <li v-if="!flag"><div class="btn" @click="start">就地启动</div></li> |
| | |
| | | <li><div class="btn" @click="go('/watercooling/alarmhis/9')">历史报警</div></li> |
| | | <li><div class="btn" @click="go('/watercooling/systemsettings/9')">系统设定</div></li> |
| | | </ul> |
| | | </rotate-menu> |
| | | </rotate-menu> --> |
| | | <!-- 导出数据弹窗 --> |
| | | <el-dialog |
| | | title="数据导出" |
| | | :visible.sync="exportDialogVisible" |
| | | width="400px" > |
| | | <label class="pr_o6em">选择日期</label> |
| | | <el-date-picker |
| | | v-model="export_date" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | size="small" |
| | | :picker-options="pickerOptions" |
| | | placeholder="选择日期" > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportDialogVisible = false">关 闭</el-button> |
| | | <el-button type="primary" @click="exportCsv">导 出</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <progress-load |
| | | :show="progress.show" |
| | | :percentage="progress.value" |
| | | :text="progress.text"></progress-load> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import RotateMenu from '@/components/RotateMenu'; |
| | | // import RotateMenu from '@/components/RotateMenu'; |
| | | import ScienceBox from '../../components/ScienceBox' |
| | | import EleCircle from '@/script/drawplus' |
| | | import draw from '@/script/draw_water_cooling'; |
| | | import AssembleTable from '@/components/AssembleTable'; |
| | | import type from '@/script/config_water'; |
| | | import ProgressLoad from '@/components/ProgressLoad' |
| | | |
| | | let can, can1, resizeHandler; |
| | | // 临时存放格式化后的表格数据 |
| | |
| | | export default { |
| | | name: 'WaterCooling', |
| | | components: { |
| | | RotateMenu, |
| | | // RotateMenu, |
| | | ScienceBox, |
| | | AssembleTable |
| | | ,ProgressLoad |
| | | }, |
| | | data () { |
| | | return { |
| | | progress: { |
| | | show: false, |
| | | value: 0, |
| | | text: '', |
| | | }, |
| | | exportDialogVisible: false, |
| | | export_date: new Date().format('yyyy-MM-dd'), |
| | | pickerOptions: { |
| | | disabledDate (data) { |
| | | return data && data.valueOf() > Date.now().valueOf() || data.valueOf() < Date.now().valueOf() - 1000 * 60 * 60 * 24 * 30; |
| | | } |
| | | }, |
| | | tlist: { |
| | | rtData: [], |
| | | branchData: [], |
| | |
| | | this.timer.open(); |
| | | }, 1000); |
| | | } |
| | | // 数据导出 |
| | | ,exportData () { |
| | | console.log('数据导出'); |
| | | this.exportDialogVisible = true; |
| | | } |
| | | ,getProgress () { |
| | | this.exportDialogVisible = false; |
| | | this.$api.common.getProgress().then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | let percentage = !res.data[0] ? 0 : Number(res.data[0].toFixed(0)); |
| | | this.progress.value = percentage; |
| | | // console.log(res); |
| | | if(percentage == 0) { |
| | | this.progress.text="数据加载中..."; |
| | | }else { |
| | | this.progress.text="文件下载中..."; |
| | | } |
| | | |
| | | if(res.data<100 && this.progress.show) { |
| | | setTimeout(this.getProgress, 50); |
| | | }else { |
| | | this.progress.value = 100; |
| | | } |
| | | }); |
| | | } |
| | | ,exportCsv () { |
| | | let param = { |
| | | dev_name: '3号水冷装置', |
| | | dev_id: water_id, |
| | | export_num: 5, |
| | | table_name: this.export_date.replace(/-/g, '_'), |
| | | record_time: this.export_date + " 00:00:00" |
| | | }; |
| | | console.log(param, 'param'); |
| | | // 显示进度条 |
| | | this.progress.show = true; |
| | | // 请求后台 |
| | | this.$api.common.clearProgress().then(() => { |
| | | this.getProgress(); |
| | | this.$api.common.download(param).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | // console.log(res, 'download res'); |
| | | if(res.code == 1) { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | let data = res.data[0]; |
| | | const link = document.createElement("a"); |
| | | link.href = encodeURI(this.$config.url + 'tomcat7_csv/' + data.fileName); |
| | | link.download = data.fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | setTimeout(()=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | }, 1000); |
| | | }else { |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | } |
| | | }).catch(error=>{ |
| | | // 关闭进度条 |
| | | this.progress.show = false; |
| | | this.progress.value = 0; |
| | | this.$layer.msg('生成文件失败!'); |
| | | console.warn(error); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted () { |
| | | const $container = this.$refs.container; |