|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<!-- 奖惩规则配置 -->
|
|
|
<div class="app-container">
|
|
|
- <el-form
|
|
|
+ <!-- <el-form
|
|
|
ref="queryForm"
|
|
|
:model="queryParams"
|
|
|
size="small"
|
|
@@ -26,8 +26,8 @@
|
|
|
>重置</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
+ </el-form> -->
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="false">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -38,6 +38,15 @@
|
|
|
>新增</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ :disabled="dataList.length == 0"
|
|
|
+ @click="handleAddDetail"
|
|
|
+ >新增明细</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
type="danger"
|
|
|
plain
|
|
|
icon="el-icon-delete"
|
|
@@ -52,84 +61,217 @@
|
|
|
@queryTable="getList"
|
|
|
></right-toolbar>
|
|
|
</el-row>
|
|
|
- <div class="table">
|
|
|
- <el-table
|
|
|
- ref="renewalTable"
|
|
|
- v-loading="loading"
|
|
|
- :data="dataList"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- row-key="id"
|
|
|
- >
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column prop="date" label="序号" width="80" align="center">
|
|
|
- <template slot-scope="scope">{{ scope.$index + 1 }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="编码名称"
|
|
|
- align="center"
|
|
|
- prop="roleName"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="编码值"
|
|
|
- align="center"
|
|
|
- prop="roleCode"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="描述"
|
|
|
- prop="roleDes"
|
|
|
- align="center"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="备注"
|
|
|
- prop="remark"
|
|
|
- align="center"
|
|
|
- :show-overflow-tooltip="true"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-card>
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>时户数考核规则分级</span>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
+ style="float: right; padding: 3px 0"
|
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- >修改</el-button
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="handleAdd"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="table">
|
|
|
+ <el-table
|
|
|
+ ref="renewalTable"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="dataList"
|
|
|
+ row-key="id"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ highlight-current-row
|
|
|
>
|
|
|
+ <el-table-column width="25">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-radio
|
|
|
+ class="radio"
|
|
|
+ :label="scope.row"
|
|
|
+ v-model="currentRow"
|
|
|
+ >{{ "" }}</el-radio
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="序号"
|
|
|
+ width="70"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">{{ scope.$index + 1 }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="目标时户数规则"
|
|
|
+ align="center"
|
|
|
+ prop="targetName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="最小时户数"
|
|
|
+ align="center"
|
|
|
+ prop="minNum"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="最大时户数"
|
|
|
+ prop="maxNum"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click.stop="handleUpdate(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click.stop="handleDelete(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-card header="时户数考核规则明细">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>时户数考核规则明细</span>
|
|
|
<el-button
|
|
|
- size="mini"
|
|
|
+ style="float: right; padding: 3px 0"
|
|
|
type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- :page.sync="queryParams.pageNum"
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <RiskRoleModel ref="riskRoleModelRef" @refresh="getList()"></RiskRoleModel>
|
|
|
+ icon="el-icon-plus"
|
|
|
+ :disabled="dataList.length == 0"
|
|
|
+ @click="handleAddDetail"
|
|
|
+ >新增
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="table">
|
|
|
+ <el-table :data="childrenList" v-loading="childrenLoading">
|
|
|
+ <el-table-column label="序号" width="70" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="完成时户数规则"
|
|
|
+ align="center"
|
|
|
+ prop="detailName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column label="考核金额" align="center">
|
|
|
+ <el-table-column
|
|
|
+ label="党政一把手"
|
|
|
+ prop="manageAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="分管副经理"
|
|
|
+ prop="manageAssistantAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="部室主任"
|
|
|
+ prop="deptDirectorAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="部室分管主任"
|
|
|
+ prop="deptDirectorAssistantAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="部室责任专责"
|
|
|
+ prop="deptManageAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="总负责人"
|
|
|
+ prop="principAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="工作负责人"
|
|
|
+ prop="workPrincipAmt"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="设备主人"
|
|
|
+ prop="ownerAmt"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdateDetail(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDeleteDetail(scope.row)"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <UpdateModel ref="addModelRef" @refresh="getList()"></UpdateModel>
|
|
|
+ <UpdateModelDetail
|
|
|
+ ref="addModelDetailRef"
|
|
|
+ @refresh="handleCurrentChange(currentRow)"
|
|
|
+ ></UpdateModelDetail>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getRiskRolePage, delRiskRole } from "@/api/secure/pdm-risk-role";
|
|
|
import UpdateModel from "./components/UpdateModel";
|
|
|
+import UpdateModelDetail from "./components/UpdateModelDetail";
|
|
|
+import {
|
|
|
+ examineRoleTargetList,
|
|
|
+ dleExamineRoleTarget,
|
|
|
+ examineRoleDetailList,
|
|
|
+ dleExamineRoleDetail,
|
|
|
+} from "@/api/powerdistribution/maintenance";
|
|
|
export default {
|
|
|
- components: { UpdateModel },
|
|
|
+ components: { UpdateModel, UpdateModelDetail },
|
|
|
data() {
|
|
|
return {
|
|
|
dataList: [],
|
|
@@ -146,12 +288,24 @@ export default {
|
|
|
},
|
|
|
// 选中数组
|
|
|
selectedRows: [],
|
|
|
+ childrenList: [],
|
|
|
+ childrenLoading: true,
|
|
|
+ currentRow: null,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ async handleCurrentChange(row) {
|
|
|
+ this.currentRow = row;
|
|
|
+ this.childrenLoading = true;
|
|
|
+ const data = await examineRoleDetailList({
|
|
|
+ targetId: row.id,
|
|
|
+ });
|
|
|
+ this.childrenList = data.rows;
|
|
|
+ this.childrenLoading = false;
|
|
|
+ },
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selectedRows) {
|
|
|
// 记录选择的行
|
|
@@ -159,19 +313,36 @@ export default {
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.$refs.riskRoleModelRef.openModel({ ...row });
|
|
|
+ this.$refs.addModelRef.openModel({ ...row });
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.$refs.riskRoleModelRef.openModel({});
|
|
|
+ this.$refs.addModelRef.openModel({});
|
|
|
+ },
|
|
|
+ handleAddDetail() {
|
|
|
+ this.$refs.addModelDetailRef.openModel({ targetId: this.currentRow.id });
|
|
|
+ },
|
|
|
+ handleUpdateDetail(row) {
|
|
|
+ this.$refs.addModelDetailRef.openModel({ ...row });
|
|
|
+ },
|
|
|
+ handleDeleteDetail(row) {
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认删除该数据项?")
|
|
|
+ .then(function () {
|
|
|
+ return dleExamineRoleDetail(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.handleCurrentChange(this.currentRow);
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ });
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const roleIds = row.id || this.selectedRows.map((ite) => ite.id);
|
|
|
this.$modal
|
|
|
- .confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?')
|
|
|
+ .confirm('是否确认删除编号为"' + roleIds + '"的数据项?')
|
|
|
.then(function () {
|
|
|
- return delRiskRole(roleIds);
|
|
|
+ return dleExamineRoleTarget(roleIds);
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.getList();
|
|
@@ -184,13 +355,16 @@ export default {
|
|
|
/** 查询列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- getRiskRolePage({ ...this.queryParams, riskFlag: "1" }).then(
|
|
|
- (response) => {
|
|
|
- this.dataList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
+ examineRoleTargetList({ ...this.queryParams }).then((response) => {
|
|
|
+ this.dataList = response.rows;
|
|
|
+ if (this.dataList.length) {
|
|
|
+ this.handleCurrentChange(
|
|
|
+ this.dataList.length ? this.dataList[0] : null
|
|
|
+ );
|
|
|
}
|
|
|
- );
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|