| | |
| | | <template> |
| | | <div class="params-container"> |
| | | <el-form ref="ruleForm" size="mini" label-position="top" :model="params" :rules="rules" |
| | | class="params-dialog bg-white"> |
| | | <el-form |
| | | ref="ruleForm" |
| | | size="mini" |
| | | label-position="top" |
| | | :model="params" |
| | | :rules="rules" |
| | | class="params-dialog bg-white" |
| | | > |
| | | <el-row :gutter="layout.gutter"> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('Province')" prop="stationName1"> |
| | | <el-select v-model="params.stationName1" :placeholder="$t('form.selectMsg')" @change="provinceChange" |
| | | :filterable="true"> |
| | | <el-option v-for="item in linkage.provinces" :key="item" :label="item" :value="item"> |
| | | <el-select |
| | | v-model="params.stationName1" |
| | | :placeholder="$t('form.selectMsg')" |
| | | @change="provinceChange" |
| | | allow-create |
| | | :filterable="true" |
| | | > |
| | | <el-option |
| | | v-for="item in linkage.provinces" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('Other')" :value="$t('Other')"></el-option> |
| | | </el-select> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('City')" prop="stationName2"> |
| | | <el-select v-model="params.stationName2" :placeholder="$t('form.selectMsg')" @change="cityChange" |
| | | :filterable="true"> |
| | | <el-option v-for="item in linkage.cities" :key="item" :label="item" :value="item"> |
| | | <el-select |
| | | v-model="params.stationName2" |
| | | :placeholder="$t('form.selectMsg')" |
| | | @change="cityChange" |
| | | allow-create |
| | | :filterable="true" |
| | | > |
| | | <el-option |
| | | v-for="item in linkage.cities" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('Other')" :value="$t('Other')"></el-option> |
| | | </el-select> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('DistrictCounty')" prop="stationName5"> |
| | | <el-select v-model="params.stationName5" :placeholder="$t('form.selectMsg')" @change="countyChange" |
| | | allow-create :filterable="true"> |
| | | <el-option v-for="item in linkage.counties" :key="item" :label="item" :value="item"> |
| | | <el-select |
| | | v-model="params.stationName5" |
| | | :placeholder="$t('form.selectMsg')" |
| | | @change="countyChange" |
| | | allow-create |
| | | :filterable="true" |
| | | > |
| | | <el-option |
| | | v-for="item in linkage.counties" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('Other')" :value="$t('Other')"></el-option> |
| | | </el-select> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('EquipmentRoomName')" prop="stationName3"> |
| | | <el-select v-model="params.stationName3" :placeholder="$t('form.selectMsg')" @change="siteChange" |
| | | :filterable="true"> |
| | | <el-option v-for="(item, index) in linkage.sites" :key="index" :label="item.label" :value="item.value"> |
| | | <el-select |
| | | v-model="params.stationName3" |
| | | :placeholder="$t('form.selectMsg')" |
| | | @change="siteChange" |
| | | allow-create |
| | | :filterable="true" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in linkage.sites" |
| | | :key="index" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('Other')" :value="$t('Other')"></el-option> |
| | | </el-select> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('DeviceType')" prop="fbsdeviceId"> |
| | | <el-select v-model="params.fbsdeviceId" disabled :placeholder="$t('form.selectMsg')"> |
| | | <el-option v-for="item in devTypes" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-select |
| | | v-model="params.fbsdeviceId" |
| | | disabled |
| | | :placeholder="$t('form.selectMsg')" |
| | | > |
| | | <el-option |
| | | v-for="item in devTypes" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span" v-if="isInversion"> |
| | | <el-form-item :label="$t('ChargeType')"> |
| | | <el-select v-model="params.chargeType" :placeholder="$t('form.selectMsg')"> |
| | | <el-option v-for="item in chargeTypes" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | <el-select |
| | | v-model="params.chargeType" |
| | | :placeholder="$t('form.selectMsg')" |
| | | > |
| | | <el-option |
| | | v-for="item in chargeTypes" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span" v-if="isHasBuscouple"> |
| | | <el-form-item :label="$t('BuscouplerStatus')"> |
| | | <el-select v-model="params.buscoupleState" :placeholder="$t('form.selectMsg')"> |
| | | <el-option v-for="item in buscouplestates" :key="item.value" :label="item.label" |
| | | :value="item.value"></el-option> |
| | | <el-select |
| | | v-model="params.buscoupleState" |
| | | :placeholder="$t('form.selectMsg')" |
| | | > |
| | | <el-option |
| | | v-for="item in buscouplestates" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('BatteryGroupType')" prop="battGroupNum"> |
| | | <el-select v-model="params.battGroupNum" :placeholder="$t('form.selectMsg')"> |
| | | <el-option v-for="item in batteryTypes" :key="item.value" :label="$t('battTypes.' + item.label)" |
| | | :value="item.value"></el-option> |
| | | <el-select |
| | | v-model="params.battGroupNum" |
| | | :placeholder="$t('form.selectMsg')" |
| | | > |
| | | <el-option |
| | | v-for="item in batteryTypes" |
| | | :key="item.value" |
| | | :label="$t('battTypes.' + item.label)" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('FCCurrentThreshold')" prop="battFloatCurrent"> |
| | | <el-form-item |
| | | :label="$t('FCCurrentThreshold')" |
| | | prop="battFloatCurrent" |
| | | > |
| | | <el-input v-model="params.battFloatCurrent"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('BatteryBrand')" prop="battProducer"> |
| | | <el-select v-model="params.battProducer" :placeholder="$t('form.selectMsg')" @change="battProducerChange" |
| | | :filterable="true"> |
| | | <el-option v-for="item in linkage.battProducers" :key="item" :label="item" :value="item"> |
| | | <el-select |
| | | v-model="params.battProducer" |
| | | :placeholder="$t('form.selectMsg')" |
| | | @change="battProducerChange" |
| | | :filterable="true" |
| | | > |
| | | <el-option |
| | | v-for="item in linkage.battProducers" |
| | | :key="item" |
| | | :label="item" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('Other')" value="-999"></el-option> |
| | | </el-select> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('ManufactureDate')" prop="battProductDate"> |
| | | <el-date-picker v-model="params.battProductDate" size="small" type="date" :placeholder="$t('form.selectDate')" |
| | | value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-date-picker |
| | | v-model="params.battProductDate" |
| | | size="small" |
| | | type="date" |
| | | :placeholder="$t('form.selectDate')" |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | | <el-form-item :label="$t('ServiceDate')" prop="battInUseDate"> |
| | | <el-date-picker v-model="params.battInUseDate" size="small" type="date" :placeholder="$t('form.selectDate')" |
| | | value-format="yyyy-MM-dd"></el-date-picker> |
| | | <el-date-picker |
| | | v-model="params.battInUseDate" |
| | | size="small" |
| | | type="date" |
| | | :placeholder="$t('form.selectDate')" |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="layout.span"> |
| | |
| | | </el-col> |
| | | <el-col :span="layout.span" v-if="isLithium"> |
| | | <el-form-item :label="$t('ElectricityRateTemplate')" prop="tmpId"> |
| | | <el-select v-model="params.tmpId" :placeholder="$t('form.selectMsg')"> |
| | | <el-option v-for="item in tmpList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
| | | <el-select |
| | | v-model="params.tmpId" |
| | | :placeholder="$t('form.selectMsg')" |
| | | > |
| | | <el-option |
| | | v-for="item in tmpList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <div class="form-footer"> |
| | | <three-btn @click="autoComputeIp" v-if="params.fbsdeviceId == '9100'">{{ $t('AutomaticallycalculateIP') }}</three-btn> |
| | | <three-btn @click="submitFrom">{{ $t('operate.ok') }}</three-btn> |
| | | <three-btn @click="autoComputeIp" v-if="params.fbsdeviceId == '9100'">{{ |
| | | $t("AutomaticallycalculateIP") |
| | | }}</three-btn> |
| | | <three-btn @click="submitFrom">{{ $t("operate.ok") }}</three-btn> |
| | | </div> |
| | | </el-form> |
| | | <!-- 省 --> |
| | | <el-dialog v-cloak top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('Province')" :visible.sync="province.dialogVisible" width="280px" |
| | | append-to-body> |
| | | <el-dialog |
| | | v-cloak |
| | | top="0" |
| | | class="dialog-center" |
| | | :title="$t('form.selectMsg') + ' ' + $t('Province')" |
| | | :visible.sync="province.dialogVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item :label="$t('Province')"> |
| | | <el-select v-model="province.value" :placeholder="$t('form.selectMsg')" :filterable="true"> |
| | | <el-option v-for="province in province.list" :key="province.name" :label="province.name" |
| | | :value="province.name"></el-option> |
| | | </el-select> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="province.value" |
| | | :placeholder="$t('form.inputMsg')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="provinceOk">{{ $t('operate.ok') }}</el-button> |
| | | <el-button size="mini" @click="province.dialogVisible = false">{{ $t('operate.cancel') }}</el-button> |
| | | <el-button type="primary" size="mini" @click="provinceOk">{{ |
| | | $t("operate.ok") |
| | | }}</el-button> |
| | | <el-button size="mini" @click="province.dialogVisible = false">{{ |
| | | $t("operate.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 市 --> |
| | | <el-dialog v-cloak top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('City')" :visible.sync="city.dialogVisible" width="280px" |
| | | append-to-body> |
| | | <el-dialog |
| | | v-cloak |
| | | top="0" |
| | | class="dialog-center" |
| | | :title="$t('form.selectMsg') + ' ' + $t('City')" |
| | | :visible.sync="city.dialogVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item :label="$t('City')"> |
| | | <el-select v-model="city.value" :placeholder="$t('form.selectMsg')" :filterable="true"> |
| | | <el-option v-for="city in city.list" :key="city.name" :label="city.name" :value="city.name"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="city.value" |
| | | :placeholder="$t('form.inputMsg')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="cityOk">{{ $t('operate.ok') }}</el-button> |
| | | <el-button size="mini" @click="city.dialogVisible = false">{{ $t('operate.cancel') }}</el-button> |
| | | <el-button type="primary" size="mini" @click="cityOk">{{ |
| | | $t("operate.ok") |
| | | }}</el-button> |
| | | <el-button size="mini" @click="city.dialogVisible = false">{{ |
| | | $t("operate.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 区县 --> |
| | | <el-dialog top="0" class="dialog-center" :title="$t('form.selectMsg') + ' ' + $t('DistrictCounty')" :visible.sync="county.dialogVisible" width="280px" |
| | | append-to-body> |
| | | <el-dialog |
| | | top="0" |
| | | class="dialog-center" |
| | | :title="$t('form.selectMsg') + ' ' + $t('DistrictCounty')" |
| | | :visible.sync="county.dialogVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item :label="$t('DistrictCounty')"> |
| | | <el-select v-model="county.value" :placeholder="$t('form.selectMsg')" :filterable="true"> |
| | | <el-option v-for="county in county.list" :key="county.name" :label="county.name" |
| | | :value="county.name"></el-option> |
| | | </el-select> |
| | | <el-form-item> |
| | | <el-input |
| | | v-model="county.value" |
| | | :placeholder="$t('form.inputMsg')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="countyOk">{{ $t('operate.ok') }}</el-button> |
| | | <el-button size="mini" @click="county.dialogVisible = false">{{ $t('operate.cancel') }}</el-button> |
| | | <el-button type="primary" size="mini" @click="countyOk">{{ |
| | | $t("operate.ok") |
| | | }}</el-button> |
| | | <el-button size="mini" @click="county.dialogVisible = false">{{ |
| | | $t("operate.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 电池品牌 --> |
| | | <el-dialog top="0" class="dialog-center" :title="$t('form.inputMsg') + ' ' + $t('BatteryBrand')" :visible.sync="battProducer.dialogVisible" width="280px" |
| | | append-to-body> |
| | | <el-dialog |
| | | top="0" |
| | | class="dialog-center" |
| | | :title="$t('form.inputMsg') + ' ' + $t('BatteryBrand')" |
| | | :visible.sync="battProducer.dialogVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item :label="$t('BatteryBrand')"> |
| | | <el-input v-model="battProducer.value"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="battProducerOk">{{ $t('operate.ok') }}</el-button> |
| | | <el-button size="mini" @click="battProducer.dialogVisible = false">{{ $t('operate.cancel') }}</el-button> |
| | | <el-button type="primary" size="mini" @click="battProducerOk">{{ |
| | | $t("operate.ok") |
| | | }}</el-button> |
| | | <el-button size="mini" @click="battProducer.dialogVisible = false">{{ |
| | | $t("operate.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 机房 --> |
| | | <el-dialog top="0" class="dialog-center" :title="$t('form.inputMsg') + ' ' + $t('EquipmentRoomName')" :visible.sync="site.dialogVisible" width="280px" |
| | | append-to-body> |
| | | <el-dialog |
| | | top="0" |
| | | class="dialog-center" |
| | | :title="$t('form.inputMsg') + ' ' + $t('EquipmentRoomName')" |
| | | :visible.sync="site.dialogVisible" |
| | | width="280px" |
| | | append-to-body |
| | | > |
| | | <el-form size="small"> |
| | | <el-form-item> |
| | | <el-input v-model="site.value" :placeholder="$t('form.inputMsg')"></el-input> |
| | | <el-input |
| | | v-model="site.value" |
| | | :placeholder="$t('form.inputMsg')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="text-align: right"> |
| | | <el-button type="primary" size="mini" @click="siteOk">{{ $t('operate.ok') }}</el-button> |
| | | <el-button size="mini" @click="site.dialogVisible = false">{{ $t('operate.cancel') }}</el-button> |
| | | <el-button type="primary" size="mini" @click="siteOk">{{ |
| | | $t("operate.ok") |
| | | }}</el-button> |
| | | <el-button size="mini" @click="site.dialogVisible = false">{{ |
| | | $t("operate.cancel") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | |
| | | import const_rules from "@/assets/js/const/const_rules"; |
| | | import getDevIp from "@/assets/js/tools/getDevIp"; |
| | | import i18n from '../i18n/battGroupMager'; |
| | | import { createI18nOption } from '@/assets/js/tools/i18n'; |
| | | import battTypes from '@/assets/js/i18n/const_battery_type'; |
| | | import i18nConstRules from '@/assets/js/i18n/const_rules'; |
| | | import i18nConstBatt from '@/assets/js/i18n/const_battGroup'; |
| | | const i18nMixin = createI18nOption(i18n, [[battTypes, 'battTypes'], [i18nConstRules, 'constRule'], [i18nConstBatt, 'rule']]); |
| | | import i18n from "../i18n/battGroupMager"; |
| | | import { createI18nOption } from "@/assets/js/tools/i18n"; |
| | | import battTypes from "@/assets/js/i18n/const_battery_type"; |
| | | import i18nConstRules from "@/assets/js/i18n/const_rules"; |
| | | import i18nConstBatt from "@/assets/js/i18n/const_battGroup"; |
| | | const i18nMixin = createI18nOption(i18n, [ |
| | | [battTypes, "battTypes"], |
| | | [i18nConstRules, "constRule"], |
| | | [i18nConstBatt, "rule"], |
| | | ]); |
| | | export default { |
| | | mixins: [i18nMixin], |
| | | props: { |
| | |
| | | const vm = this; |
| | | const subRules = { |
| | | validator(rule, value, callback) { |
| | | testVal(rule, value, callback, constRules.noSpecialChar, vm, 'constRule'); |
| | | testVal( |
| | | rule, |
| | | value, |
| | | callback, |
| | | constRules.noSpecialChar, |
| | | vm, |
| | | "constRule" |
| | | ); |
| | | }, |
| | | trigger: "change", |
| | | }; |
| | |
| | | stationName1: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | stationName2: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | stationName5: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | stationName3: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | stationName4: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | fbsdeviceName: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | { |
| | | required: true, |
| | | validator(rule, value, callback) { |
| | | testVal(rule, value, callback, rules.FbsDeviceIp, vm, 'constRule'); |
| | | testVal( |
| | | rule, |
| | | value, |
| | | callback, |
| | | rules.FbsDeviceIp, |
| | | vm, |
| | | "constRule" |
| | | ); |
| | | }, |
| | | trigger: "change", |
| | | }, |
| | |
| | | { |
| | | required: true, |
| | | validator(rule, value, callback) { |
| | | testVal(rule, value, callback, rules.FbsDeviceIp_YM, vm, 'constRule'); |
| | | testVal( |
| | | rule, |
| | | value, |
| | | callback, |
| | | rules.FbsDeviceIp_YM, |
| | | vm, |
| | | "constRule" |
| | | ); |
| | | }, |
| | | trigger: "change", |
| | | }, |
| | |
| | | { |
| | | required: true, |
| | | validator(rule, value, callback) { |
| | | testVal(rule, value, callback, rules.FbsDeviceIp_WG, vm, 'constRule'); |
| | | testVal( |
| | | rule, |
| | | value, |
| | | callback, |
| | | rules.FbsDeviceIp_WG, |
| | | vm, |
| | | "constRule" |
| | | ); |
| | | }, |
| | | trigger: "change", |
| | | }, |
| | |
| | | groupIndexInFBSDevice: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | tmpId: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('electricityTemplateMsg'), |
| | | message: this.$t("electricityTemplateMsg"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battGroupNum: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | floatVolLevel: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | offlineVolLevel: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battFloatCurrent: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | monResStd: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | monSerStd: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | ], |
| | | monVolLowToAvg: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | disCurrMax: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battGroupName: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | monVolStd: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | monCapStd: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | loadCurr: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battProducer: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battModel: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battProductDate: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | battInUseDate: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | packCount: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | monCount: [ |
| | | { |
| | | required: true, |
| | | message: this.$t('cannotbeblank'), |
| | | message: this.$t("cannotbeblank"), |
| | | trigger: "change", |
| | | }, |
| | | { ...subRules }, |
| | |
| | | this.linkage.cites = []; |
| | | |
| | | // 点击其他 |
| | | if (value == this.$t('Other')) { |
| | | var provinces = this.linkagePlus.getProvince(); |
| | | if (value == this.$t("Other")) { |
| | | // var provinces = this.linkagePlus.getProvince(); |
| | | this.province.dialogVisible = true; |
| | | this.province.value = provinces[0].name; |
| | | this.province.list = provinces; |
| | | // this.province.value = provinces[0].name; |
| | | // this.province.list = provinces; |
| | | // 恢复上一次选择的内容 |
| | | this.params.stationName1 = this.linkage.province; |
| | | } else { |
| | |
| | | // 获取省 |
| | | var stationName1 = this.params.stationName1; |
| | | // 点击其他 |
| | | if (value == this.$t('Other')) { |
| | | if (value == this.$t("Other")) { |
| | | // 恢复上一次选择的内容 |
| | | this.params.stationName2 = this.linkage.city; |
| | | // 未选择省 |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('provincefirst'), |
| | | message: this.$t("provincefirst"), |
| | | }); |
| | | return; |
| | | } |
| | | var result = this.linkagePlus.getCity(stationName1); |
| | | if (result.code == 1) { |
| | | var cities = result.data; |
| | | this.city.dialogVisible = true; |
| | | this.city.value = cities[0].name; |
| | | this.city.list = cities; |
| | | } else { |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: result.msg, |
| | | }); |
| | | } |
| | | this.city.dialogVisible = true; |
| | | // 恢复上一次选择的内容 |
| | | this.params.stationName2 = this.linkage.city; |
| | | // var result = this.linkagePlus.getCity(stationName1); |
| | | // if (result.code == 1) { |
| | | // var cities = result.data; |
| | | // this.city.dialogVisible = true; |
| | | // this.city.value = cities[0].name; |
| | | // this.city.list = cities; |
| | | // } else { |
| | | // // 提出告警 |
| | | // this.$message({ |
| | | // type: "warning", |
| | | // message: result.msg, |
| | | // }); |
| | | // } |
| | | } else { |
| | | this.linkage.city = value; |
| | | } |
| | |
| | | // 获取市 |
| | | var stationName2 = this.params.stationName2; |
| | | // 点击其他 |
| | | if (value == this.$t('Other')) { |
| | | if (value == this.$t("Other")) { |
| | | // 恢复上一次选择的内容 |
| | | this.params.stationName5 = this.linkage.county; |
| | | // 未选择省 |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('provincefirst'), |
| | | message: this.$t("provincefirst"), |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('cityfirst'), |
| | | message: this.$t("cityfirst"), |
| | | }); |
| | | return; |
| | | } |
| | | var result = this.linkagePlus.getCounty(stationName1, stationName2); |
| | | if (result.code == 1) { |
| | | var counties = result.data; |
| | | this.county.dialogVisible = true; |
| | | this.county.value = counties[0].name; |
| | | this.county.list = counties; |
| | | } else { |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: result.msg, |
| | | }); |
| | | } |
| | | this.county.dialogVisible = true; |
| | | // var result = this.linkagePlus.getCounty(stationName1, stationName2); |
| | | // if (result.code == 1) { |
| | | // var counties = result.data; |
| | | // this.county.dialogVisible = true; |
| | | // this.county.value = counties[0].name; |
| | | // this.county.list = counties; |
| | | // } else { |
| | | // // 提出告警 |
| | | // this.$message({ |
| | | // type: "warning", |
| | | // message: result.msg, |
| | | // }); |
| | | // } |
| | | } else { |
| | | this.linkage.county = value; |
| | | } |
| | |
| | | // 获取区 |
| | | var stationName5 = this.params.stationName5; |
| | | // 点击其他 |
| | | if (value == this.$t('Other')) { |
| | | if (value == this.$t("Other")) { |
| | | // 恢复上一次选择的内容 |
| | | this.params.stationName3 = this.linkage.site; |
| | | // 未选择省 |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('provincefirst'), |
| | | message: this.$t("provincefirst"), |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('cityfirst'), |
| | | message: this.$t("cityfirst"), |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // 提出告警 |
| | | this.$message({ |
| | | type: "warning", |
| | | message: this.$t('CountyFirst'), |
| | | message: this.$t("CountyFirst"), |
| | | }); |
| | | return; |
| | | } |
| | |
| | | // 添加机房 |
| | | this.addHome(tmp); |
| | | } else { |
| | | this.$layer.msg(this.$t('form.validateMsg')); |
| | | this.$layer.msg(this.$t("form.validateMsg")); |
| | | return false; |
| | | } |
| | | }); |
| | |
| | | .then((res) => { |
| | | res = res.data; |
| | | if (res.code) { |
| | | this.$message.success(this.$t('operate.successMsg')); |
| | | this.$message.success(this.$t("operate.successMsg")); |
| | | // 触发事件 |
| | | } else { |
| | | this.$message.error(this.$t('operate.failMsg')); |
| | | this.$message.error(this.$t("operate.failMsg")); |
| | | } |
| | | this.$emit("success"); |
| | | // 关闭加载框 |
| | |
| | | }) |
| | | .catch((error) => { |
| | | console.log(error); |
| | | this.$message.error(this.$t('operate.failMsg')); |
| | | this.$message.error(this.$t("operate.failMsg")); |
| | | // 触发事件 |
| | | this.$emit("success"); |
| | | // 关闭加载框 |
| | |
| | | let ipInfo = getDevIp(dev_id); |
| | | if (ipInfo.code == 1) { |
| | | this.$alert( |
| | | this.$t('DeviceIP') + ':' + ipInfo.data + ", " + this.$t('AutomaticupdatedtodeviceIP'), |
| | | this.$t('Message'), |
| | | this.$t("DeviceIP") + |
| | | ":" + |
| | | ipInfo.data + |
| | | ", " + |
| | | this.$t("AutomaticupdatedtodeviceIP"), |
| | | this.$t("Message"), |
| | | { |
| | | confirmButtonText: this.$t('operate.ok'), |
| | | confirmButtonText: this.$t("operate.ok"), |
| | | } |
| | | ); |
| | | this.params.fbsdeviceIp = ipInfo.data; |
| | |
| | | }, |
| | | monCountText() { |
| | | let isLithiumPack = this.isLithiumPack; |
| | | return isLithiumPack ? this.$t('LithiumBatteryPackCellQty') : this.$t('CellQty'); |
| | | return isLithiumPack |
| | | ? this.$t("LithiumBatteryPackCellQty") |
| | | : this.$t("CellQty"); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | // 设置省市区县的数据 |
| | | this.linkagePlus.setData(const_province_city_county); |
| | | // this.linkagePlus.setData(const_province_city_county); |
| | | // 初始化值 |
| | | this.initParams(); |
| | | |