|
@@ -198,7 +198,7 @@
|
|
|
<el-tag type="info" effect="dark" v-else>禁用</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="备注" prop="remark"> </el-table-column>
|
|
|
+ <!--el-table-column label="备注" prop="remark"> </el-table-column-->
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -224,11 +224,11 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
- <el-card header="违章扣分规则设置">
|
|
|
+ <el-card header="扣分规则设置">
|
|
|
<el-table
|
|
|
ref="table3"
|
|
|
:data="tableData4"
|
|
|
- row-key="contractId"
|
|
|
+ row-key="id"
|
|
|
stripe
|
|
|
height="300px"
|
|
|
>
|
|
@@ -237,18 +237,15 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
label="规则编号"
|
|
|
- prop="contractCode"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
+ prop="parCode"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- label="违章项目"
|
|
|
- prop="title"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
+ label="扣分项目"
|
|
|
+ prop="parName"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
label="扣分"
|
|
|
- prop="customerName"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
+ prop="parValue"
|
|
|
></el-table-column>
|
|
|
<el-table-column label="状态" prop="status">
|
|
|
<template slot-scope="scope">
|
|
@@ -265,7 +262,7 @@
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
- :render-header="renderHeader2"
|
|
|
+ :render-header="renderHeader4"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -273,7 +270,6 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['powerdistribution:par:edit']"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -281,7 +277,6 @@
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['powerdistribution:par:remove']"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -303,6 +298,12 @@
|
|
|
@success="handleDicSuccess"
|
|
|
@closed="dialog.info = false"
|
|
|
></fault-free-duration-dic-dialog>
|
|
|
+ <deduct-points-dialog
|
|
|
+ v-if="dialog.info"
|
|
|
+ ref="deductPointsDialog"
|
|
|
+ @success="handleDicSuccess"
|
|
|
+ @closed="dialog.deduct = false"
|
|
|
+ ></deduct-points-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -315,12 +316,14 @@ import {
|
|
|
} from "@/api/powerdistribution/par";
|
|
|
import dicDialog from "./dic";
|
|
|
import faultFreeDurationDicDialog from "./fault-free-duration-dic";
|
|
|
+import deductPointsDialog from "./deduct-points";
|
|
|
export default {
|
|
|
name: "Par",
|
|
|
dicts: ["pdm_maintenance_time", "repeat_power_failure"],
|
|
|
components: {
|
|
|
dicDialog,
|
|
|
faultFreeDurationDicDialog,
|
|
|
+ deductPointsDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -362,6 +365,7 @@ export default {
|
|
|
dialog: {
|
|
|
dic: false,
|
|
|
info: false,
|
|
|
+ deduct:false
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -440,25 +444,45 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
- handleAddFaultFreeDuration() {
|
|
|
+ handleAddDeductPoints() {
|
|
|
this.dialog.info = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
parCode: null,
|
|
|
- parName: "无故障持续时间",
|
|
|
+ parName: null,
|
|
|
parValue: null,
|
|
|
parUnit: null,
|
|
|
- parType: 2,
|
|
|
+ parType: 3,
|
|
|
remark: null,
|
|
|
createBy: null,
|
|
|
createTime: null,
|
|
|
updateBy: null,
|
|
|
updateTime: null,
|
|
|
};
|
|
|
- this.$refs.faultFreeDurationDicDialog.open().setData(this.form);
|
|
|
+ this.$refs.deductPointsDialog.open().setData(this.form);
|
|
|
});
|
|
|
},
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAddFaultFreeDuration() {
|
|
|
+ this.dialog.info = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ parCode: null,
|
|
|
+ parName: "无故障持续时间",
|
|
|
+ parValue: null,
|
|
|
+ parUnit: null,
|
|
|
+ parType: 2,
|
|
|
+ remark: null,
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ };
|
|
|
+ this.$refs.faultFreeDurationDicDialog.open().setData(this.form);
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
@@ -471,7 +495,16 @@ export default {
|
|
|
.open("edit")
|
|
|
.setData(response.data);
|
|
|
});
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else if (row.parType == 3) {
|
|
|
+ this.dialog.deduct = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.deductPointsDialog
|
|
|
+ .open("edit")
|
|
|
+ .setData(response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
this.dialog.dic = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.dicDialog.open("edit").setData(response.data);
|
|
@@ -580,6 +613,20 @@ export default {
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
|
+ renderHeader4() {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <span>操作</span>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="table-icon"
|
|
|
+ size="mini"
|
|
|
+ onClick={() => this.handleAddDeductPoints()}
|
|
|
+ ></el-button>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
//本地更新数据
|
|
|
async handleDicSuccess(data, mode) {
|
|
|
this.getParList(data.parType);
|