| | |
| | | .el-drawer__header .heading {
|
| | | text-align: center;
|
| | | } |
| | |
|
| | | /* input */
|
| | | .el-input__inner {
|
| | | border: 1px solid #ccc;
|
| | | } |
| | |
| | | </div>
|
| | | <link rel="stylesheet" href="css/iconfont/iconfont.css">
|
| | | <link rel="stylesheet" href="css/element-ui/theme-chalk/index.css">
|
| | | <link rel="stylesheet" href="css/common.css?1d97b0c3ce">
|
| | | <link rel="stylesheet" href="css/common.css?ac7b5a4318">
|
| | | <script src="js/zepto.js"></script>
|
| | | <script src="js/bui.js"></script>
|
| | | <script src="js/common_functions.js?7a37f1e251"></script>
|
| | | <script src="js/vue.min.js"></script>
|
| | | <script src="css/element-ui/index.js?12fd3b4c55"></script>
|
| | | <script src="css/element-ui/index.js?3c8cb8a2a5"></script>
|
| | | <script src="js/componets.js?4dacdaa4ab"></script>
|
| | | <script src="css/highchart/highcharts.js"></script>
|
| | |
|
| | | <script src="index.js?12fd3b4c55"></script>
|
| | | <script src="index.js?3c8cb8a2a5"></script>
|
| | | </body>
|
| | |
|
| | | </html> |
| | |
| | | hash: true |
| | | }); |
| | | |
| | | window.onresize = function () { |
| | | // 重新设置路由宽高 |
| | | router.resize(); |
| | | }; |
| | | |
| | | // 绑定事件 |
| | | bind(); |
| | | |
| | |
| | | </header>
|
| | | <main>
|
| | | <el-table border stripe size="mini" header-row-class-name="header-primary" height="100%" :data="tbl.data">
|
| | | <el-table-column prop="num" align="center" label="电池组编号">
|
| | | <el-table-column prop="num" align="center" width="180" label="电池组编号">
|
| | | </el-table-column>
|
| | | <el-table-column prop="BattGroupName" align="center" label="电池组名称">
|
| | | <el-table-column prop="BattGroupName" align="center" width="180" label="电池组名称">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonCount" align="center" label="单体个数">
|
| | | <el-table-column prop="MonCount" align="center" width="180" label="单体个数">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonCapStd" align="center" label="单体标称容量(AH)">
|
| | | <el-table-column prop="MonCapStd" align="center" width="180" label="标称容量(AH)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonVolStd" align="center" label="单体标称电压(V)">
|
| | | <el-table-column prop="MonVolStd" align="center" width="180" label="标称电压(V)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="station_install" align="center" label="安装状态">
|
| | | <el-table-column prop="MonResStd" align="center" width="180" label="标称内阻(mΩ)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonTmpStd" align="center" width="180" label="标称温度(℃)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="station_install" align="center" width="120" label="安装状态">
|
| | | <template slot-scope="scope">
|
| | | <el-button size="mini" :type="scope.row.station_install==1?'success':''">
|
| | | {{scope.row.station_install==1?'已安装':'未安装'}}
|
| | | </el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column align="center" width="150" label="操作">
|
| | | <el-table-column align="center" width="150" fixed="right" label="操作">
|
| | | <template slot-scope="scope">
|
| | | <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | |
| | | <div id="dialogCenter" class="bui-dialog" style="display:none">
|
| | | <div class="bui-dialog-head">电池参数设置</div>
|
| | | <div class="bui-dialog-main">
|
| | | <div class="bui-fluid-space">
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">电池组名称:</span>
|
| | | <el-input v-model="battInfo.data.BattGroupName1" placeholder="请输入电池组名称" size="small" @focus="showDetail(battInfo.data.BattGroupName1, 'BattGroupName1', '电池组名称:')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体个数:</span>
|
| | | <el-input v-model="battInfo.data.MonCount" type="number" placeholder="请输入单体个数" size="small" @focus="showDetail(battInfo.data.MonCount, 'MonCount', '单体个数:', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">浮充电流(A):</span>
|
| | | <el-input v-model="battInfo.data.BattFloatCurrent" type="number" placeholder="请输入浮充电流" size="small" @focus="showDetail(battInfo.data.BattFloatCurrent, 'BattFloatCurrent', '浮充电流(A):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称容量(AH):</span>
|
| | | <el-input v-model="battInfo.data.MonCapStd" type="number" placeholder="请输入单体标称容量" size="small" @focus="showDetail(battInfo.data.MonCapStd, 'MonCapStd', '单体标称容量(AH):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称电压(V):</span>
|
| | | <el-input v-model="battInfo.data.MonVolStd" type="number" placeholder="请输入标称电压" size="small" @focus="showDetail(battInfo.data.MonVolStd, 'MonVolStd', '单体标称电压(V):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称内阻(mΩ):</span>
|
| | | <el-input v-model="battInfo.data.MonVolStd" type="number" placeholder="请输入标称内阻" size="small" @focus="showDetail(battInfo.data.MonResStd, 'MonResStd', '单体标称内阻(mΩ):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称温度(℃):</span>
|
| | | <el-input v-model="battInfo.data.MonTmpStd" type="number" placeholder="请输入标称温度" size="small" @focus="showDetail(battInfo.data.MonTmpStd, 'MonTmpStd', '单体标称温度(℃):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称温度(℃):</span>
|
| | | <el-select :disabled="battInfo.data.num == 1" v-model="battInfo.data.station_install" size="small" placeholder="请选择">
|
| | | <el-option key="0" label="未安装" :value="0">
|
| | | </el-option>
|
| | | <el-option key="1" label="已安装" :value="1">
|
| | | </el-option>
|
| | | </el-select>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-foot">
|
| | | <div class="bui-box">
|
| | | <div class="span1">
|
| | | <div class="bui-btn" @click="closeDialog">取消</div>
|
| | | </div>
|
| | | <div class="span1">
|
| | | <div class="bui-btn blue" @click="update">确定</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-close"><i class="icon-close"></i></div>
|
| | | </div>
|
| | | |
| | | <div id="dialogTop" class="bui-dialog" style="display:none">
|
| | | <div class="bui-dialog-main" style="padding:8px 4px">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">{{detailInfo.label}}</span>
|
| | | <el-input ref="detailInfo" style="margin-top:8px" v-model="detailInfo.value" :type="detailInfo.type" size="small"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-foot">
|
| | | <div class="bui-box">
|
| | | <div class="span1">
|
| | | <div class="bui-btn" @click="uiDialogTop.close()">取消</div>
|
| | | </div>
|
| | | <div class="span1">
|
| | | <div class="bui-btn blue" @click="setDetailInfo">确定</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-close"><i class="icon-close"></i></div>
|
| | | </div>
|
| | | </main>
|
| | | <footer>
|
| | |
|
| | | </footer>
|
| | | </div> |
| | | <style scoped>.bui-dialog-head{background-color:#39a4ff;color:#fff}.bui-dialog .bui-dialog-close i{color:#fff}.bui-dialog-main{padding:4px}.span-inner{text-align:left}.span-inner .span-label{margin-bottom:4px}.bui-dialog-top{left:50%;margin-left:-250px}</style> |
| | |
| | | this.vm = new Vue({ |
| | | el: getPageRoot(module), |
| | | data: { |
| | | dialogFormVisible: false, |
| | | dialogVisible: false, |
| | | uiDialog: '', |
| | | uiDialogTop: '', |
| | | tbl: { |
| | | noData: '暂无电池信息', |
| | | height: 300, |
| | |
| | | rules: {}, |
| | | loading: false, |
| | | data: {} |
| | | }, |
| | | detailInfo: { |
| | | value: 0, |
| | | name: '', |
| | | label: '', |
| | | type: '' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | showDialog: function showDialog(row) { |
| | | // 初始化电池信息 |
| | | this.initBattInfo(row); |
| | | this.dialogFormVisible = true; |
| | | this.uiDialog.open(); |
| | | }, |
| | | closeDialog: function closeDialog() { |
| | | this.dialogFormVisible = false; |
| | | this.uiDialog.close(); |
| | | }, |
| | | initBattInfo: function initBattInfo(row) { |
| | | var data = Object.assign({}, row); |
| | | this.battInfo.data = data; |
| | | }, |
| | | update: function update() { |
| | | var _this = this; |
| | | |
| | | var self = this; |
| | | this.battInfo.loading = true; |
| | | var data = this.battInfo.data; |
| | | console.log(data); |
| | | // 特殊数据处理 |
| | | data.BattGroupName = data.BattGroupName1 + data.num; |
| | | data.BattInUseDate = new Date().format('yyyy-MM-dd'); |
| | |
| | | BattinfService.update(JSON.stringify(data)); |
| | | } else { |
| | | setTimeout(function () { |
| | | _this.battInfo.loading = false; |
| | | self.battInfo.loading = false; |
| | | // 提示信息 |
| | | _this.$message({ |
| | | self.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }); |
| | | // 关闭对话框 |
| | | _this.dialogFormVisible = false; |
| | | self.closeDialog(); |
| | | }, 3000); |
| | | } |
| | | }, |
| | | showDetail: function showDetail(val, name, label, type) { |
| | | var self = this; |
| | | this.detailInfo.value = val, this.detailInfo.name = name; |
| | | this.detailInfo.label = label; |
| | | this.detailInfo.type = type; |
| | | this.uiDialog.close(); |
| | | this.uiDialogTop.open(); |
| | | this.$nextTick(function () { |
| | | self.$refs.detailInfo.focus(); |
| | | }); |
| | | }, |
| | | setDetailInfo: function setDetailInfo() { |
| | | this.battInfo.data[this.detailInfo.name] = this.detailInfo.value; |
| | | this.uiDialogTop.close(); |
| | | } |
| | | }, |
| | | mounted: function mounted() { |
| | |
| | | // 查询电池信息 |
| | | this.searchAll(); |
| | | |
| | | // 自定义居中弹出框 |
| | | this.uiDialog = bui.dialog({ |
| | | id: "#dialogCenter", |
| | | width: 500, |
| | | height: 400, |
| | | autoClose: false |
| | | }); |
| | | |
| | | // 自定义居中弹出框 |
| | | this.uiDialogTop = bui.dialog({ |
| | | id: "#dialogTop", |
| | | position: 'top', |
| | | width: 500, |
| | | height: 120, |
| | | autoClose: false, |
| | | onBeforeClose: function onBeforeClose() { |
| | | self.uiDialog.open(); |
| | | } |
| | | }); |
| | | // 后台触发事件查询所有的电池组信息 |
| | | window['BattinfServicesearchAllcalljs'] = function (res) { |
| | | var data = res.data; |
| | |
| | | // 跳转 |
| | | router.load({ |
| | | url: url, |
| | | param: {} |
| | | param: { |
| | | random: Math.random().toFixed(2) |
| | | }, |
| | | reload: true |
| | | }); |
| | | }, 100); |
| | | } |
| | |
| | | vm: '' |
| | | }, |
| | | loaded: function loaded(require, exports, module) { |
| | | var loading = bui.loading(); |
| | | loading.show(); |
| | | var self = this; |
| | | setTimeout(function () { |
| | | loading.hide(); |
| | | // 引入vue |
| | | this.vm = new Vue({ |
| | | self.vm = new Vue({ |
| | | el: getPageRoot(module), |
| | | data: { |
| | | loading: bui.loading(), |
| | |
| | | this.timer.stop(); |
| | | } |
| | | }); |
| | | }, 100); |
| | | }, |
| | | destroyed: function destroyed() { |
| | | this.vm.$destroy(); |
| | |
| | | .el-drawer__header .heading {
|
| | | text-align: center;
|
| | | } |
| | |
|
| | | /* input */
|
| | | .el-input__inner {
|
| | | border: 1px solid #ccc;
|
| | | } |
| | |
| | | </div>
|
| | | <link rel="stylesheet" href="css/iconfont/iconfont.css">
|
| | | <link rel="stylesheet" href="css/element-ui/theme-chalk/index.css">
|
| | | <link rel="stylesheet" href="css/common.css?1d97b0c3ce">
|
| | | <link rel="stylesheet" href="css/common.css?ac7b5a4318">
|
| | | <script src="js/zepto.js"></script>
|
| | | <script src="js/bui.js"></script>
|
| | | <script src="js/common_functions.js?7a37f1e251"></script>
|
| | | <script src="js/vue.min.js"></script>
|
| | | <script src="css/element-ui/index.js?12fd3b4c55"></script>
|
| | | <script src="css/element-ui/index.js?3c8cb8a2a5"></script>
|
| | | <script src="js/componets.js?4dacdaa4ab"></script>
|
| | | <script src="css/highchart/highcharts.js"></script>
|
| | |
|
| | | <script src="index.js?12fd3b4c55"></script>
|
| | | <script src="index.js?3c8cb8a2a5"></script>
|
| | | </body>
|
| | |
|
| | | </html> |
| | |
| | | hash: true |
| | | }); |
| | | |
| | | window.onresize = function () { |
| | | // 重新设置路由宽高 |
| | | router.resize(); |
| | | }; |
| | | |
| | | // 绑定事件 |
| | | bind(); |
| | | |
| | |
| | | </header>
|
| | | <main>
|
| | | <el-table border stripe size="mini" header-row-class-name="header-primary" height="100%" :data="tbl.data">
|
| | | <el-table-column prop="num" align="center" label="电池组编号">
|
| | | <el-table-column prop="num" align="center" width="180" label="电池组编号">
|
| | | </el-table-column>
|
| | | <el-table-column prop="BattGroupName" align="center" label="电池组名称">
|
| | | <el-table-column prop="BattGroupName" align="center" width="180" label="电池组名称">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonCount" align="center" label="单体个数">
|
| | | <el-table-column prop="MonCount" align="center" width="180" label="单体个数">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonCapStd" align="center" label="单体标称容量(AH)">
|
| | | <el-table-column prop="MonCapStd" align="center" width="180" label="标称容量(AH)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonVolStd" align="center" label="单体标称电压(V)">
|
| | | <el-table-column prop="MonVolStd" align="center" width="180" label="标称电压(V)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="station_install" align="center" label="安装状态">
|
| | | <el-table-column prop="MonResStd" align="center" width="180" label="标称内阻(mΩ)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="MonTmpStd" align="center" width="180" label="标称温度(℃)">
|
| | | </el-table-column>
|
| | | <el-table-column prop="station_install" align="center" width="120" label="安装状态">
|
| | | <template slot-scope="scope">
|
| | | <el-button size="mini" :type="scope.row.station_install==1?'success':''">
|
| | | {{scope.row.station_install==1?'已安装':'未安装'}}
|
| | | </el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column align="center" width="150" label="操作">
|
| | | <el-table-column align="center" width="150" fixed="right" label="操作">
|
| | | <template slot-scope="scope">
|
| | | <el-button size="mini" type="primary" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | |
| | | <div id="dialogCenter" class="bui-dialog" style="display:none">
|
| | | <div class="bui-dialog-head">电池参数设置</div>
|
| | | <div class="bui-dialog-main">
|
| | | <div class="bui-fluid-space">
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">电池组名称:</span>
|
| | | <el-input v-model="battInfo.data.BattGroupName1" placeholder="请输入电池组名称" size="small" @focus="showDetail(battInfo.data.BattGroupName1, 'BattGroupName1', '电池组名称:')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体个数:</span>
|
| | | <el-input v-model="battInfo.data.MonCount" type="number" placeholder="请输入单体个数" size="small" @focus="showDetail(battInfo.data.MonCount, 'MonCount', '单体个数:', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">浮充电流(A):</span>
|
| | | <el-input v-model="battInfo.data.BattFloatCurrent" type="number" placeholder="请输入浮充电流" size="small" @focus="showDetail(battInfo.data.BattFloatCurrent, 'BattFloatCurrent', '浮充电流(A):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称容量(AH):</span>
|
| | | <el-input v-model="battInfo.data.MonCapStd" type="number" placeholder="请输入单体标称容量" size="small" @focus="showDetail(battInfo.data.MonCapStd, 'MonCapStd', '单体标称容量(AH):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称电压(V):</span>
|
| | | <el-input v-model="battInfo.data.MonVolStd" type="number" placeholder="请输入标称电压" size="small" @focus="showDetail(battInfo.data.MonVolStd, 'MonVolStd', '单体标称电压(V):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称内阻(mΩ):</span>
|
| | | <el-input v-model="battInfo.data.MonVolStd" type="number" placeholder="请输入标称内阻" size="small" @focus="showDetail(battInfo.data.MonResStd, 'MonResStd', '单体标称内阻(mΩ):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称温度(℃):</span>
|
| | | <el-input v-model="battInfo.data.MonTmpStd" type="number" placeholder="请输入标称温度" size="small" @focus="showDetail(battInfo.data.MonTmpStd, 'MonTmpStd', '单体标称温度(℃):', 'number')"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="span6">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">单体标称温度(℃):</span>
|
| | | <el-select :disabled="battInfo.data.num == 1" v-model="battInfo.data.station_install" size="small" placeholder="请选择">
|
| | | <el-option key="0" label="未安装" :value="0">
|
| | | </el-option>
|
| | | <el-option key="1" label="已安装" :value="1">
|
| | | </el-option>
|
| | | </el-select>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-foot">
|
| | | <div class="bui-box">
|
| | | <div class="span1">
|
| | | <div class="bui-btn" @click="closeDialog">取消</div>
|
| | | </div>
|
| | | <div class="span1">
|
| | | <div class="bui-btn blue" @click="update">确定</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-close"><i class="icon-close"></i></div>
|
| | | </div>
|
| | | |
| | | <div id="dialogTop" class="bui-dialog" style="display:none">
|
| | | <div class="bui-dialog-main" style="padding:8px 4px">
|
| | | <div class="span-inner">
|
| | | <span class="span-label">{{detailInfo.label}}</span>
|
| | | <el-input ref="detailInfo" style="margin-top:8px" v-model="detailInfo.value" :type="detailInfo.type" size="small"></el-input>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-foot">
|
| | | <div class="bui-box">
|
| | | <div class="span1">
|
| | | <div class="bui-btn" @click="uiDialogTop.close()">取消</div>
|
| | | </div>
|
| | | <div class="span1">
|
| | | <div class="bui-btn blue" @click="setDetailInfo">确定</div>
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="bui-dialog-close"><i class="icon-close"></i></div>
|
| | | </div>
|
| | | </main>
|
| | | <footer>
|
| | |
|
| | | </footer>
|
| | | </div> |
| | | <style scoped>.bui-dialog-head{background-color:#39a4ff;color:#fff}.bui-dialog .bui-dialog-close i{color:#fff}.bui-dialog-main{padding:4px}.span-inner{text-align:left}.span-inner .span-label{margin-bottom:4px}.bui-dialog-top{left:50%;margin-left:-250px}</style> |
| | |
| | | this.vm = new Vue({ |
| | | el: getPageRoot(module), |
| | | data: { |
| | | dialogFormVisible: false, |
| | | dialogVisible: false, |
| | | uiDialog: '', |
| | | uiDialogTop: '', |
| | | tbl: { |
| | | noData: '暂无电池信息', |
| | | height: 300, |
| | |
| | | rules: {}, |
| | | loading: false, |
| | | data: {} |
| | | }, |
| | | detailInfo: { |
| | | value: 0, |
| | | name: '', |
| | | label: '', |
| | | type: '' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | showDialog: function showDialog(row) { |
| | | // 初始化电池信息 |
| | | this.initBattInfo(row); |
| | | this.dialogFormVisible = true; |
| | | this.uiDialog.open(); |
| | | }, |
| | | closeDialog: function closeDialog() { |
| | | this.dialogFormVisible = false; |
| | | this.uiDialog.close(); |
| | | }, |
| | | initBattInfo: function initBattInfo(row) { |
| | | var data = Object.assign({}, row); |
| | | this.battInfo.data = data; |
| | | }, |
| | | update: function update() { |
| | | var _this = this; |
| | | |
| | | var self = this; |
| | | this.battInfo.loading = true; |
| | | var data = this.battInfo.data; |
| | | console.log(data); |
| | | // 特殊数据处理 |
| | | data.BattGroupName = data.BattGroupName1 + data.num; |
| | | data.BattInUseDate = new Date().format('yyyy-MM-dd'); |
| | |
| | | BattinfService.update(JSON.stringify(data)); |
| | | } else { |
| | | setTimeout(function () { |
| | | _this.battInfo.loading = false; |
| | | self.battInfo.loading = false; |
| | | // 提示信息 |
| | | _this.$message({ |
| | | self.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | }); |
| | | // 关闭对话框 |
| | | _this.dialogFormVisible = false; |
| | | self.closeDialog(); |
| | | }, 3000); |
| | | } |
| | | }, |
| | | showDetail: function showDetail(val, name, label, type) { |
| | | var self = this; |
| | | this.detailInfo.value = val, this.detailInfo.name = name; |
| | | this.detailInfo.label = label; |
| | | this.detailInfo.type = type; |
| | | this.uiDialog.close(); |
| | | this.uiDialogTop.open(); |
| | | this.$nextTick(function () { |
| | | self.$refs.detailInfo.focus(); |
| | | }); |
| | | }, |
| | | setDetailInfo: function setDetailInfo() { |
| | | this.battInfo.data[this.detailInfo.name] = this.detailInfo.value; |
| | | this.uiDialogTop.close(); |
| | | } |
| | | }, |
| | | mounted: function mounted() { |
| | |
| | | // 查询电池信息 |
| | | this.searchAll(); |
| | | |
| | | // 自定义居中弹出框 |
| | | this.uiDialog = bui.dialog({ |
| | | id: "#dialogCenter", |
| | | width: 500, |
| | | height: 400, |
| | | autoClose: false |
| | | }); |
| | | |
| | | // 自定义居中弹出框 |
| | | this.uiDialogTop = bui.dialog({ |
| | | id: "#dialogTop", |
| | | position: 'top', |
| | | width: 500, |
| | | height: 120, |
| | | autoClose: false, |
| | | onBeforeClose: function onBeforeClose() { |
| | | self.uiDialog.open(); |
| | | } |
| | | }); |
| | | // 后台触发事件查询所有的电池组信息 |
| | | window['BattinfServicesearchAllcalljs'] = function (res) { |
| | | var data = res.data; |
| | |
| | | // 跳转 |
| | | router.load({ |
| | | url: url, |
| | | param: {} |
| | | param: { |
| | | random: Math.random().toFixed(2) |
| | | }, |
| | | reload: true |
| | | }); |
| | | }, 100); |
| | | } |
| | |
| | | vm: '' |
| | | }, |
| | | loaded: function loaded(require, exports, module) { |
| | | var loading = bui.loading(); |
| | | loading.show(); |
| | | var self = this; |
| | | setTimeout(function () { |
| | | loading.hide(); |
| | | // 引入vue |
| | | this.vm = new Vue({ |
| | | self.vm = new Vue({ |
| | | el: getPageRoot(module), |
| | | data: { |
| | | loading: bui.loading(), |
| | |
| | | this.timer.stop(); |
| | | } |
| | | }); |
| | | }, 100); |
| | | }, |
| | | destroyed: function destroyed() { |
| | | this.vm.$destroy(); |