...
|
...
|
@@ -41,7 +41,20 @@ |
|
|
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>
|
|
|
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">新增</el-button>
|
|
|
<el-button size="mini" type="danger" @click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }}</el-button>
|
|
|
<el-button type="primary" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>
|
|
|
|
|
|
<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>
|
|
|
<el-button v-else disabled="" type="primary" size="small" @click="pay(scope.row)">缴费</el-button>
|
|
|
|
|
|
<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="waterMeter(scope.row)">水表实时信息</el-button>
|
|
|
<el-button v-else disabled="" type="primary" size="small" @click="waterMeter(scope.row)">水表实时信息</el-button>
|
|
|
|
|
|
<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>
|
|
|
<el-button v-else type="primary" disabled="" size="small" @click="electrixityMeterConfiguration(scope.row)">电表参数配置</el-button>
|
|
|
|
|
|
<el-button v-if="scope.row.type=='3'" type="primary" size="small" @click="electrixityMeterEdit(scope.row)">编辑电表参数配置</el-button>
|
|
|
<el-button v-else disabled="" type="primary" size="small" @click="electrixityMeterEdit(scope.row)">编辑电表参数配置</el-button>
|
|
|
|
|
|
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
...
|
...
|
@@ -53,7 +66,7 @@ |
|
|
</el-pagination>
|
|
|
</el-col>
|
|
|
|
|
|
<!--水表新增-->
|
|
|
<!--电表新增-->
|
|
|
<el-dialog title="电表参数配置新增" :visible.sync="electrixityAddFormVisible" :close-on-click-modal="false">
|
|
|
<el-form :model="electrixityAddForm" label-width="110px" :rules="addFormRules" ref="electrixityAddForm">
|
|
|
<el-form-item label="水电预付费" prop="prepaid">
|
...
|
...
|
@@ -61,10 +74,10 @@ |
|
|
v-model="electrixityAddForm.prepaid"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
active-value="1"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
inactive-value="0">
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电警告跳闸" prop="warningtrip">
|
...
|
...
|
@@ -72,10 +85,10 @@ |
|
|
v-model="electrixityAddForm.warningtrip"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
active-value="1"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
inactive-value="0">
|
|
|
</el-switch>
|
|
|
<span>告警阀值</span> <el-input v-model="electrixityAddForm.warningthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span>
|
|
|
</el-form-item>
|
...
|
...
|
@@ -84,22 +97,22 @@ |
|
|
v-model="electrixityAddForm.overdraft"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
active-value="1"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
inactive-value="0">
|
|
|
</el-switch>
|
|
|
<span>可透支额度</span> <el-input v-model="electrixityAddForm.overdraftthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="过负荷跳闸使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityAddForm.load"
|
|
|
v-model="electrixityAddForm.waterload"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
active-value="1"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
inactive-value="0">
|
|
|
</el-switch>
|
|
|
<span>功率</span> <el-input v-model="electrixityAddForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span>
|
|
|
<br/>
|
...
|
...
|
@@ -111,12 +124,12 @@ |
|
|
v-model="electrixityAddForm.free"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
active-value="1"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
inactive-value="0">
|
|
|
</el-switch>
|
|
|
<span>免费电度</span> <el-input v-model="electrixityAddForm.overdraftthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>度</span>
|
|
|
<span>免费电度</span> <el-input v-model="electrixityAddForm.freeelectricitylimit" style="width: 100px;" auto-complete="off"></el-input> <span>度</span>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
...
|
...
|
@@ -124,6 +137,121 @@ |
|
|
<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--电表参数配置修改-->
|
|
|
<el-dialog title="电表参数配置新增" :visible.sync="electrixityeditFormVisible" :close-on-click-modal="false">
|
|
|
<el-form :model="electrixityeditForm" label-width="110px" :rules="editFormRules" ref="electrixityeditForm">
|
|
|
<el-form-item label="电表编号" prop="companyName">
|
|
|
<el-input v-model="electrixityeditForm.eeId" auto-complete="off" style="width: 40%" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="水电预付费" prop="prepaid">
|
|
|
<el-switch
|
|
|
v-model="electrixityeditForm.prepaid"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
:active-value="true"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
:inactive-value="false"
|
|
|
@change="func(data)">
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电警告跳闸" prop="warningtrip">
|
|
|
<el-switch
|
|
|
v-model="electrixityeditForm.warningtrip"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
:active-value="true"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
:inactive-value="false">
|
|
|
</el-switch>
|
|
|
<span>告警阀值</span> <el-input v-model="electrixityeditForm.warningthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="透支使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityeditForm.overdraft"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
:active-value="true"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
:inactive-value="false">
|
|
|
</el-switch>
|
|
|
<span>可透支额度</span> <el-input v-model="electrixityeditForm.overdraftthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="过负荷跳闸使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityeditForm.waterload"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
:active-value="true"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
:inactive-value="false">
|
|
|
</el-switch>
|
|
|
<span>功率</span> <el-input v-model="electrixityeditForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span>
|
|
|
<br/>
|
|
|
<br/>
|
|
|
<span>功率因数</span> <el-input v-model="electrixityeditForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="免费电度使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityeditForm.free"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
:active-value="true"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
:inactive-value="false">
|
|
|
</el-switch>
|
|
|
<span>免费电度</span> <el-input v-model="electrixityeditForm.freeelectricitylimit" style="width: 100px;" auto-complete="off"></el-input> <span>度</span>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="electrixityeditFormVisible = false">取消</el-button>
|
|
|
<el-button type="primary" @click.native="editSubmit" :loading="editLoading">提交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--水表实时信息-->
|
|
|
<el-dialog title="水表实施信息" :visible.sync="waterMeterVisible" :close-on-click-modal="false">
|
|
|
<el-form :model="waterMaterForm" label-width="100px" ref="waterMaterForm">
|
|
|
<el-form-item label="水表编号" prop="wmId">
|
|
|
<el-input v-model="waterMaterForm.wmId" auto-complete="off" ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="累计充值量" prop="wmSacc">
|
|
|
<el-input v-model="waterMaterForm.wmSacc" auto-complete="off" ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="累计流量" prop="wmLacc">
|
|
|
<el-input v-model="waterMaterForm.wmLacc" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="上传时间" prop="wmRdtime">
|
|
|
<el-input v-model="waterMaterForm.wmRdtime" auto-complete="off" ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="阀门状态" prop="wmFmstate">
|
|
|
<el-input v-model="waterMaterForm.wmFmstate" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="故障状态" prop="wmErrmessage">
|
|
|
<el-input v-model="waterMaterForm.wmErrmessage" auto-complete="off" ></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电压" prop="wmVoltage">
|
|
|
<el-input v-model="waterMaterForm.wmVoltage" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="表示信号强度" prop="wmSignalpower">
|
|
|
<el-input v-model="waterMaterForm.wmSignalpower" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="waterMeterVisible = false">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
</section>
|
|
|
</template>
|
|
|
<style>
|
...
|
...
|
@@ -141,6 +269,8 @@ |
|
|
</style>
|
|
|
<script>
|
|
|
import { getList,add} from '@/api/empt/location_api';
|
|
|
import {add as electicity, getEEModel, edit} from '@/api/empt/electricityParams';
|
|
|
import {findRealTime } from '@/api/empt/waterMeter';
|
|
|
import moment from 'moment'
|
|
|
import parseTime from '@/utils'
|
|
|
import loginUserInfo from '@/api/base'
|
...
|
...
|
@@ -152,8 +282,6 @@ |
|
|
processName: '',
|
|
|
parseTime: parseTime
|
|
|
},
|
|
|
userId: '',
|
|
|
realName: '',
|
|
|
wmId:'',
|
|
|
locationList:[],
|
|
|
total: 0,
|
...
|
...
|
@@ -163,6 +291,10 @@ |
|
|
sels: [],//列表选中列
|
|
|
//编辑界面是否显示
|
|
|
editFormVisible: false,
|
|
|
electrixityeditFormVisible: false,
|
|
|
// 水表实施信息
|
|
|
waterMeterVisible:false,
|
|
|
|
|
|
editLoading: false,
|
|
|
editFormRules: {
|
|
|
roleName: [
|
...
|
...
|
@@ -177,6 +309,20 @@ |
|
|
roleSign: 1,
|
|
|
departmentId:''
|
|
|
},
|
|
|
// 编辑电表参数配置
|
|
|
electrixityeditForm:{
|
|
|
id:'',
|
|
|
prepaid: '',
|
|
|
warningtrip: '',
|
|
|
warningthreshold: '',
|
|
|
overdraft:'',
|
|
|
overdraftthreshold: '',
|
|
|
waterload: '',
|
|
|
power: '',
|
|
|
powerfactor: '',
|
|
|
freeelectricitylimit: '',
|
|
|
eeId: ''
|
|
|
},
|
|
|
//用户ID
|
|
|
//新增界面是否显示
|
|
|
electrixityAddFormVisible: false,
|
...
|
...
|
@@ -190,19 +336,32 @@ |
|
|
{ required: true, message: '请输入岗位/角色描述', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
//水表参数配置、界面数据
|
|
|
//电表参数配置、界面数据
|
|
|
electrixityAddForm: {
|
|
|
prepaid: '',
|
|
|
warningtrip: '',
|
|
|
warningthreshold: '',
|
|
|
overdraft:'',
|
|
|
overdraftthreshold: '',
|
|
|
load: '',
|
|
|
waterload: '',
|
|
|
power: '',
|
|
|
powerfactor: '',
|
|
|
freeelectricitylimit: '',
|
|
|
eeId: ''
|
|
|
},
|
|
|
|
|
|
// 水表实施信息
|
|
|
waterMaterForm:{
|
|
|
wmId:'',
|
|
|
wmSacc:'',
|
|
|
wmLacc:'',
|
|
|
wmRdtime:'',
|
|
|
wmFmstate:'',
|
|
|
wmErrmessage:'',
|
|
|
wmVoltage:'',
|
|
|
wmSignalpower:''
|
|
|
},
|
|
|
|
|
|
permForm: {
|
|
|
roleId: 1,
|
|
|
description: '',
|
...
|
...
|
@@ -278,6 +437,9 @@ |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
one: function(prepaid){
|
|
|
return prepaid?true:one='是'?false:one='否'
|
|
|
},
|
|
|
//性别显示转换
|
|
|
formatType: function (row, column) {
|
|
|
let msg = '未知';
|
...
|
...
|
@@ -296,6 +458,9 @@ |
|
|
break;
|
|
|
}
|
|
|
return msg;
|
|
|
},//性别显示转换
|
|
|
formatperpaid: function (value) {
|
|
|
return value === true ? "1" : "0";
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.pageNum = val;
|
...
|
...
|
@@ -353,12 +518,18 @@ |
|
|
* @param index
|
|
|
* @param row 为这行的数据对象
|
|
|
*/
|
|
|
handleEdit: function (index, row) {
|
|
|
this.editFormVisible = true;
|
|
|
this.editForm = Object.assign({}, row);
|
|
|
this.getdepartmentNames();
|
|
|
electrixityMeterEdit: function (row) {
|
|
|
this.electrixityeditFormVisible = true;
|
|
|
var ids = row.eeid;
|
|
|
let para = { eeId: ids };
|
|
|
// 查询电表参数配置表数据
|
|
|
getEEModel(para).then((res) => {
|
|
|
this.electrixityeditForm = res.data;
|
|
|
});
|
|
|
},
|
|
|
//水表参数配置新增界面,每次点开初始化数据
|
|
|
|
|
|
|
|
|
//电表参数配置新增界面,每次点开初始化数据
|
|
|
electrixityMeterConfiguration: function (row) {
|
|
|
this.electrixityAddFormVisible = true;
|
|
|
this.electrixityAddForm = {
|
...
|
...
|
@@ -367,14 +538,31 @@ |
|
|
warningthreshold: '',
|
|
|
overdraft:'',
|
|
|
overdraftthreshold: '',
|
|
|
load: '',
|
|
|
waterload: '',
|
|
|
water: '',
|
|
|
free: '',
|
|
|
freeWater: '',
|
|
|
eeId: row.eeId
|
|
|
eeId: row.eeid
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
// 水表实施信息
|
|
|
waterMeter: function (row) {
|
|
|
let loadingInstance1 = Loading.service({ fullscreen: true });
|
|
|
this.waterMeterVisible=true;
|
|
|
var wmId = row.wmid;
|
|
|
let para = { wmId: wmId };
|
|
|
findRealTime(para).then((res) => {
|
|
|
this.waterMaterForm = res.data;
|
|
|
|
|
|
});
|
|
|
loadingInstance1.close();
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//新增
|
|
|
addSubmit: function () {
|
|
|
this.$refs.electrixityAddForm.validate((valid) => {
|
...
|
...
|
@@ -383,16 +571,20 @@ |
|
|
this.addLoading = true;
|
|
|
//NProgress.start();
|
|
|
let para = Object.assign({}, this.electrixityAddForm);
|
|
|
add(para).then((res) => {
|
|
|
electicity(para).then((res) => {
|
|
|
this.addLoading = false;
|
|
|
if (res.status ===200) {
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.$refs['permForm'].resetFields();
|
|
|
this.$refs['electrixityAddForm'].resetFields();
|
|
|
this.electrixityAddFormVisible = false;
|
|
|
this.getList();
|
|
|
}else if (res.status===201){
|
|
|
this.$message({
|
|
|
message:'不能重复提交',
|
|
|
type:"error"
|
|
|
})
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
});
|
...
|
...
|
@@ -400,30 +592,21 @@ |
|
|
});
|
|
|
},
|
|
|
|
|
|
//编辑
|
|
|
// 编辑电表参数配置
|
|
|
editSubmit: function () {
|
|
|
this.$refs.editForm.validate((valid) => {
|
|
|
this.$refs.electrixityeditForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
this.editLoading = true;
|
|
|
//NProgress.start();
|
|
|
let para = Object.assign({}, this.editForm);
|
|
|
//不需要提交的 去掉,后端不好接收
|
|
|
para.authorities = null;
|
|
|
para.permissions = null;
|
|
|
para.roles = null;
|
|
|
// para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd');
|
|
|
/*
|
|
|
查询之后格式this.filters.column.create_start_date中日期发生变化;
|
|
|
Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) 变成了 "2017-08-08T16:00:00.000Z";
|
|
|
所以使用 moment 日期格式化插件将时间转换成 [ Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) ] 格
|
|
|
式;
|
|
|
*/
|
|
|
/*moment 安装 npm install moment --save*/
|
|
|
para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
|
|
|
let para= Object.assign({}, this.electrixityeditForm);
|
|
|
para.prepaid = this.formatperpaid(para.prepaid);
|
|
|
para.warningtrip = this.formatperpaid(para.warningtrip);
|
|
|
para.overdraft = this.formatperpaid(para.overdraft);
|
|
|
para.waterload = this.formatperpaid(para.waterload);
|
|
|
para.free = this.formatperpaid(para.free);
|
|
|
this.editLoading = false;
|
|
|
edit(para).then((res) => {
|
|
|
|
|
|
//NProgress.done();
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
...
|
...
|
@@ -474,10 +657,15 @@ |
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
|
|
|
//缴水电费订单跳转
|
|
|
pay(row){
|
|
|
this.$router.push({name:'缴水电费订单',params:{row,Edistatus:'create'}});
|
|
|
},
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
this.userId = loginUserInfo.userId;
|
|
|
this.realName = loginUserInfo.realname;
|
|
|
|
|
|
this.getList();
|
|
|
}
|
|
|
}
|
...
|
...
|
|