...
|
...
|
@@ -41,6 +41,7 @@ |
|
|
<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>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
...
|
...
|
@@ -51,6 +52,78 @@ |
|
|
<el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;">
|
|
|
</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">
|
|
|
<el-switch
|
|
|
v-model="electrixityAddForm.prepaid"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电警告跳闸" prop="warningtrip">
|
|
|
<el-switch
|
|
|
v-model="electrixityAddForm.warningtrip"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
</el-switch>
|
|
|
<span>告警阀值</span> <el-input v-model="electrixityAddForm.warningthreshold" style="width: 100px;" auto-complete="off"></el-input> <span>元</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="透支使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityAddForm.overdraft"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
</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"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
</el-switch>
|
|
|
<span>功率</span> <el-input v-model="electrixityAddForm.power" style="width: 100px;" auto-complete="off"></el-input> <span>KW</span>
|
|
|
<br/>
|
|
|
<br/>
|
|
|
<span>功率因数</span> <el-input v-model="electrixityAddForm.powerfactor" style="width: 100px;" auto-complete="off"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="免费电度使能" prop="overdraft">
|
|
|
<el-switch
|
|
|
v-model="electrixityAddForm.free"
|
|
|
active-color="#00A854"
|
|
|
active-text="是"
|
|
|
active-value="0"
|
|
|
inactive-color="#F04134"
|
|
|
inactive-text="否"
|
|
|
inactive-value="1">
|
|
|
</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>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="electrixityAddFormVisible = false">取消</el-button>
|
|
|
<el-button type="primary" @click.native="addSubmit" :loading="addLoading">提交</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
<style>
|
...
|
...
|
@@ -79,6 +152,9 @@ |
|
|
processName: '',
|
|
|
parseTime: parseTime
|
|
|
},
|
|
|
userId: '',
|
|
|
realName: '',
|
|
|
wmId:'',
|
|
|
locationList:[],
|
|
|
total: 0,
|
|
|
pageNum: 1,
|
...
|
...
|
@@ -103,7 +179,7 @@ |
|
|
},
|
|
|
//用户ID
|
|
|
//新增界面是否显示
|
|
|
addFormVisible: false,
|
|
|
electrixityAddFormVisible: false,
|
|
|
//设置权限界面是否显示
|
|
|
addLoading: false,
|
|
|
addFormRules: {
|
...
|
...
|
@@ -114,14 +190,18 @@ |
|
|
{ required: true, message: '请输入岗位/角色描述', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
//新增界面数据
|
|
|
addForm: {
|
|
|
processname: '',
|
|
|
begindate: '',
|
|
|
enddate: '',
|
|
|
vacationtype:'',
|
|
|
reason: '',
|
|
|
userId: ''
|
|
|
//水表参数配置、界面数据
|
|
|
electrixityAddForm: {
|
|
|
prepaid: '',
|
|
|
warningtrip: '',
|
|
|
warningthreshold: '',
|
|
|
overdraft:'',
|
|
|
overdraftthreshold: '',
|
|
|
load: '',
|
|
|
power: '',
|
|
|
powerfactor: '',
|
|
|
freeelectricitylimit: '',
|
|
|
eeId: ''
|
|
|
},
|
|
|
permForm: {
|
|
|
roleId: 1,
|
...
|
...
|
@@ -278,18 +358,48 @@ |
|
|
this.editForm = Object.assign({}, row);
|
|
|
this.getdepartmentNames();
|
|
|
},
|
|
|
//显示新增界面,每次点开初始化数据
|
|
|
handleAdd: function () {
|
|
|
this.addFormVisible = true;
|
|
|
this.addForm = {
|
|
|
processname: '',
|
|
|
begindate: '',
|
|
|
enddate: '',
|
|
|
vacationtype:'',
|
|
|
reason: '',
|
|
|
userid: loginUserInfo.userId
|
|
|
//水表参数配置新增界面,每次点开初始化数据
|
|
|
electrixityMeterConfiguration: function (row) {
|
|
|
this.electrixityAddFormVisible = true;
|
|
|
this.electrixityAddForm = {
|
|
|
prepaid: '',
|
|
|
warningtrip: '',
|
|
|
warningthreshold: '',
|
|
|
overdraft:'',
|
|
|
overdraftthreshold: '',
|
|
|
load: '',
|
|
|
water: '',
|
|
|
free: '',
|
|
|
freeWater: '',
|
|
|
eeId: row.eeId
|
|
|
}
|
|
|
},
|
|
|
|
|
|
//新增
|
|
|
addSubmit: function () {
|
|
|
this.$refs.electrixityAddForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
this.addLoading = true;
|
|
|
//NProgress.start();
|
|
|
let para = Object.assign({}, this.electrixityAddForm);
|
|
|
add(para).then((res) => {
|
|
|
this.addLoading = false;
|
|
|
if (res.status ===200) {
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.$refs['permForm'].resetFields();
|
|
|
this.electrixityAddFormVisible = false;
|
|
|
this.getList();
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
//编辑
|
|
|
editSubmit: function () {
|
|
|
this.$refs.editForm.validate((valid) => {
|
...
|
...
|
@@ -326,30 +436,6 @@ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//新增
|
|
|
addSubmit: function () {
|
|
|
this.$refs.addForm.validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
this.addLoading = true;
|
|
|
//NProgress.start();
|
|
|
let para = Object.assign({}, this.addForm);
|
|
|
add(para).then((res) => {
|
|
|
this.addLoading = false;
|
|
|
if (res.status ===200) {
|
|
|
this.$message({
|
|
|
message: '提交成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
this.$refs['permForm'].resetFields();
|
|
|
this.addFormVisible = false;
|
|
|
this.getProcessList();
|
|
|
}
|
|
|
}).catch(error => alert(error));
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
selsChange: function (sels) {
|
|
|
this.sels = sels;
|
|
|
},
|
...
|
...
|
@@ -387,9 +473,11 @@ |
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
this.userId = loginUserInfo.userId;
|
|
|
this.realName = loginUserInfo.realname;
|
|
|
this.getList();
|
|
|
}
|
|
|
}
|
...
|
...
|
|