| | |
| | | <template> |
| | | <div> |
| | | <span class="weui-switch" :class="{'weui-switch-on' : isChecked}" :value="value" @click="toggle" |
| | | style="position:relative"> |
| | | <div v-if="isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;display: flex; |
| | | align-items: center;color:#FFF;user-select:none"> |
| | | {{direction[0]}} |
| | | </div> |
| | | <div v-if="!isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;right:2px;display: flex;flex-direction: row-reverse; |
| | | align-items: center;color:#7A7A7A;user-select:none"> |
| | | {{direction[1]}} |
| | | </div> |
| | | </span> |
| | | </div> |
| | | <div> |
| | | <span |
| | | class="weui-switch" :class="{'weui-switch-on' : isChecked, 'switch-disabled': disabled}" |
| | | :value="value" @click="toggle" style="position:relative"> |
| | | <div v-if="isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;display: flex; |
| | | align-items: center;color:#FFF;user-select:none"> |
| | | {{ direction[0] }} |
| | | </div> |
| | | <div v-if="!isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;right:2px;display: flex;flex-direction: row-reverse; |
| | | align-items: center;color:#7A7A7A;user-select:none"> |
| | | {{ direction[1] }} |
| | | </div> |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | export default { |
| | | name: 'switchComponent', |
| | | model: { |
| | | prop: "value", |
| | | event: 'changeValue' |
| | | }, |
| | | props: { |
| | | value: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | value: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | text: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | isChecked: this.value |
| | | } |
| | | return { |
| | | isChecked: this.value |
| | | } |
| | | }, |
| | | computed: { |
| | | direction() { |
| | | if (this.text) { |
| | | return this.text.split('|') |
| | | } else { |
| | | return [] |
| | | direction() { |
| | | if (this.text) { |
| | | return this.text.split('|') |
| | | } else { |
| | | return [] |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | value(val) { |
| | | this.isChecked = val |
| | | }, |
| | | isChecked(val) { |
| | | this.$emit('change', val); |
| | | } |
| | | value(val) { |
| | | this.isChecked = val |
| | | }, |
| | | isChecked(val) { |
| | | this.$emit('change', val); |
| | | } |
| | | }, |
| | | methods: { |
| | | toggle() { |
| | | this.isChecked = !this.isChecked; |
| | | } |
| | | } |
| | | } |
| | | toggle() { |
| | | if(!this.disabled) { |
| | | this.isChecked = !this.isChecked; |
| | | this.$emit('changeValue', this.isChecked); |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | .weui-switch { |
| | | .weui-switch { |
| | | display: block; |
| | | position: relative; |
| | | width: 72px; |
| | |
| | | transition: background-color 0.1s, border 0.1s; |
| | | cursor: pointer; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .weui-switch:before { |
| | | } |
| | | .weui-switch.switch-disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | .weui-switch:before { |
| | | content: " "; |
| | | position: absolute; |
| | | top: 0; |
| | |
| | | border-radius: 15px; |
| | | background-color: #d7d7d7; |
| | | transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1); |
| | | } |
| | | } |
| | | |
| | | .weui-switch:after { |
| | | .weui-switch:after { |
| | | content: " "; |
| | | position: absolute; |
| | | top: 0; |
| | |
| | | background-color: #FFFFFF; |
| | | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); |
| | | transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35); |
| | | } |
| | | } |
| | | |
| | | .weui-switch-on { |
| | | .weui-switch-on { |
| | | border-color: #6F6F6F; |
| | | background-color: #1AAD19; |
| | | } |
| | | } |
| | | |
| | | .weui-switch-on:before { |
| | | .weui-switch-on:before { |
| | | border-color: #1AAD19; |
| | | background-color: #409eff; |
| | | } |
| | | } |
| | | |
| | | .weui-switch-on:after { |
| | | .weui-switch-on:after { |
| | | transform: translateX(45px); |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="thermometer" :class="{ active: state}"> |
| | | <div class="line"></div> |
| | | <div class="arc"></div> |
| | | </div> |
| | | <div class="thermometer" :class="{ active: state}"> |
| | | <div class="line"></div> |
| | | <div class="arc"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | export default { |
| | | props: ['switch'], |
| | | data() { |
| | | return { |
| | | state: false |
| | | } |
| | | return { |
| | | state: false |
| | | } |
| | | }, |
| | | watch: { |
| | | 'switch': { |
| | | handler(val) { |
| | | this.state = val |
| | | 'switch': { |
| | | handler(val) { |
| | | this.state = val |
| | | }, |
| | | deep: true |
| | | }, |
| | | deep: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.state = this.switch |
| | | this.state = this.switch |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .thermometer { |
| | | .thermometer { |
| | | width: 16px; |
| | | height: 72px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | } |
| | | } |
| | | |
| | | .line { |
| | | .line { |
| | | width: 8px; |
| | | height: 54px; |
| | | background-color: #ffffff; |
| | | border-radius: 4px 4px 0 0; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .thermometer.active .line::before { |
| | | .thermometer.active .line::before { |
| | | content: ""; |
| | | display: block; |
| | | width: 6px; |
| | |
| | | bottom: 0; |
| | | left: 1px; |
| | | background: -webkit-linear-gradient(top, #ffffff, #318bf1); |
| | | } |
| | | } |
| | | |
| | | .arc { |
| | | .arc { |
| | | width: 18px; |
| | | height: 18px; |
| | | border-radius: 50%; |
| | |
| | | margin-top: -1px; |
| | | overflow: hidden; |
| | | position: relative; |
| | | } |
| | | } |
| | | |
| | | .thermometer.active .arc::before { |
| | | .thermometer.active .arc::before { |
| | | content: ""; |
| | | display: block; |
| | | width: 20px; |
| | |
| | | position: absolute; |
| | | bottom: -1px; |
| | | left: -1px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | yData.push(a.value); |
| | | } |
| | | }); |
| | | let option = { |
| | | let option = { |
| | | backgroundColor: "#111c4e", |
| | | color: ['#3398DB'], |
| | | tooltip: { |
New file |
| | |
| | | <template> |
| | | <div class="closeTest"></div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "closeTest" |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="footer-button"> |
| | | <el-button type="primary" size="small" @click="preStep">重做当前步骤</el-button> |
| | | <el-button type="primary" size="small" @click="completeTest" v-if="end">完成试验</el-button> |
| | | <el-button type="primary" size="small" @click="nextStep" v-else>开始下一步</el-button> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {redoTestPoint} from "@/pages/test/js/api"; |
| | | |
| | | export default { |
| | | name: "pointResultTest", |
| | | props: { |
| | |
| | | nextStep() { |
| | | this.$emit('nextStep'); |
| | | }, |
| | | preStep() { |
| | | this.$confirm("确定重做当前步骤", "系统提示", { |
| | | type: "warning", |
| | | }).then(()=>{ |
| | | let point = this.point; |
| | | redoTestPoint(point.id).then(res=>{ |
| | | let rs = res.data; |
| | | if(rs.code == 1) { |
| | | this.$emit('preStep'); |
| | | } |
| | | this.$layer.msg(rs.msg); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }).catch(error=>{ |
| | | |
| | | }); |
| | | |
| | | }, |
| | | completeTest() { |
| | | this.$emit('completeTest', this.point); |
| | | } |
| | |
| | | :visible.sync="resultDialog" class="position-absolute dialog-center dialog-no-header" width="840px" |
| | | top="0" :modal="false" :destroy-on-close="true" :close-on-press-escape="false" :close-on-click-modal="false" |
| | | :modal-append-to-body="false"> |
| | | <point-result-test :point="prePoint" @nextStep="nextStep" @completeTest="completeTest" :end="endTest"></point-result-test> |
| | | <point-result-test :point="prePoint" @preStep="preStep" @nextStep="nextStep" @completeTest="completeTest" :end="endTest"></point-result-test> |
| | | </el-dialog> |
| | | <complete-test-dialog :visible.sync="completeDialog" :type="type"></complete-test-dialog> |
| | | </div> |
| | |
| | | this.resultDialog = true; |
| | | } |
| | | }, |
| | | preStep() { |
| | | this.resultDialog = false; |
| | | this.endTest = false; |
| | | }, |
| | | nextStep() { |
| | | this.resultDialog = false; |
| | | this.pointDialog = true; |
| | |
| | | value |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 重做当前试验点 |
| | | * @param id |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | export const redoTestPoint = (id)=>{ |
| | | return axios({ |
| | | method: "POST", |
| | | url: "/experiment/restartExperimentPoint", |
| | | params: { |
| | | id, |
| | | }, |
| | | }); |
| | | } |
| | |
| | | <abs-panel class="diagramPanel4" title="受功电机" :list="underServiceMotor"></abs-panel> |
| | | <abs-panel class="diagramPanel5" title="AFE变频驱动柜" :list="afeBox"></abs-panel> |
| | | <div class="thermometerCon"> |
| | | <mw-thermometer :switch="true"></mw-thermometer> |
| | | AFE变频器<br>水冷开启 |
| | | <mw-thermometer :switch="true"></mw-thermometer> |
| | | 受功电机<br>水冷开启 |
| | | <mw-thermometer :switch="true"></mw-thermometer> |
| | | 受试电机<br>水冷开启 |
| | | <mw-thermometer :switch="value1"></mw-thermometer> |
| | | AFE变频器<br>水冷{{ value1?"开启":"关闭" }} |
| | | <mw-thermometer :switch="value2"></mw-thermometer> |
| | | 受功电机<br>水冷{{ value2?"开启":"关闭" }} |
| | | <mw-thermometer :switch="value3"></mw-thermometer> |
| | | 受试电机<br>水冷{{ value3?"开启":"关闭" }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="optItem"> |
| | | <div class="lineTit">受试电机水冷</div> |
| | | <mw-switch v-model="value1" text="开启|关闭"></mw-switch> |
| | | <mw-switch v-model="value2" text="开启|关闭"></mw-switch> |
| | | </div> |
| | | <div class="optItem"> |
| | | <div class="lineTit">测功电机水冷</div> |
| | | <mw-switch v-model="value1" text="开启|关闭"></mw-switch> |
| | | <mw-switch v-model="value3" text="开启|关闭"></mw-switch> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="stepBtnCon"> |
| | | <el-button type="primary" size="mini">查看结果</el-button> |
| | | <el-button type="primary" size="mini">完成试验</el-button> |
| | | <el-button type="primary" size="mini">关闭试验</el-button> |
| | | <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | SVCValue: 30, |
| | | FVCValue: 110, |
| | | value1: true, |
| | | value2: true, |
| | | value3: true, |
| | | statusList1: [ |
| | | { |
| | | text: '运行中', |
| | |
| | | <abs-panel class="diagramPanel1" title="直流配电柜" :list="dcBox"></abs-panel> |
| | | <abs-panel class="diagramPanel2" title="受试电机" :list="underTestMotor"></abs-panel> |
| | | <div class="thermometerCon"> |
| | | <mw-thermometer :switch="true"></mw-thermometer> |
| | | 受试电机<br>水冷开启 |
| | | <mw-thermometer :switch="value1"></mw-thermometer> |
| | | AFE变频器<br>水冷{{ value1?"开启":"关闭" }} |
| | | <mw-thermometer :switch="value2"></mw-thermometer> |
| | | 受功电机<br>水冷{{ value2?"开启":"关闭" }} |
| | | <mw-thermometer :switch="value3"></mw-thermometer> |
| | | 受试电机<br>水冷{{ value3?"开启":"关闭" }} |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | </div> |
| | | <div class="optItem"> |
| | | <div class="lineTit">受试电机水冷</div> |
| | | <mw-switch v-model="value1" text="开启|关闭"></mw-switch> |
| | | <mw-switch v-model="value2" text="开启|关闭"></mw-switch> |
| | | </div> |
| | | <div class="optItem"> |
| | | <div class="lineTit">测功电机水冷</div> |
| | | <mw-switch v-model="value1" text="开启|关闭"></mw-switch> |
| | | <mw-switch v-model="value3" text="开启|关闭"></mw-switch> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="stepBtnCon"> |
| | | <el-button type="primary" size="mini">查看结果</el-button> |
| | | <el-button type="primary" size="mini">完成试验</el-button> |
| | | <el-button type="primary" size="mini">关闭试验</el-button> |
| | | <el-button type="primary" size="mini" :disabled="!progressStep" @click="nextStepTest">下步试验</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | ], |
| | | text1Pos: [20, 20], |
| | | value1: true, |
| | | value1: true, // AFE变频器水冷 |
| | | value2: true, // 受试电机水冷 |
| | | value3: true, // 测工电机水冷 |
| | | speedValue: 0, |
| | | nbmspeedValue: 0, |
| | | VFValue: 10, |
| | |
| | | .thermometerCon { |
| | | position: absolute; |
| | | bottom: 20px; |
| | | right: 40px; |
| | | right: 16px; |
| | | color: #318bf1; |
| | | font-size: 10px; |
| | | display: flex; |
| | |
| | | <el-table :data="tableData" style="width: 100%;" :max-height="h +'px'" :span-method="objectSpanMethod"><!--:span-method="objectSpanMethod"--> |
| | | <el-table-column prop="id" label="ID" align="center"></el-table-column> |
| | | <el-table-column prop="saveTime" label="数据保存时间" width="160" align="center"></el-table-column> |
| | | <el-table-column prop="winding" label="绕组编号" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="resistance" :label="next_status==1?'绝缘电阻值(Ω)':'直流电阻值(Ω)'" width="150" align="center"></el-table-column> |
| | | <el-table-column prop="electricCurrent" :label="next_status==1?'电流(μA)':'电流(mA)'" width="150" align="center"></el-table-column> |
| | | <el-table-column prop="vol" label="电压(V)" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="experimentId" label="设备SN" width="150" align="center"></el-table-column> |
| | | <el-table-column label="设备类型" align="center" width="150"> |
| | | <template slot-scope="scope"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="winding" label="绕组编号" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="resistance" :label="next_status==1?'绝缘电阻值(Ω)':'直流电阻值(Ω)'" width="150" align="center"></el-table-column> |
| | | <el-table-column prop="electricCurrent" :label="next_status==1?'电流(μA)':'电流(mA)'" width="150" align="center"></el-table-column> |
| | | <el-table-column prop="vol" label="电压(V)" align="center" width="150"></el-table-column> |
| | | <el-table-column prop="realName" label="测试人" align="center" width="150"></el-table-column> |
| | | <el-table-column label="操作" align="center" fixed="right" width="150"> |
| | | <template slot-scope="scope"> |
| | |
| | | color:#606266 !important; |
| | | } |
| | | .explain p{ |
| | | font-size: 16px; |
| | | padding: 10px 10px; |
| | | } |
| | | </style> |