|
@@ -22,11 +22,17 @@
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAttrAdd" v-hasPermi="['basecfg:price:add']">新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
-<!-- <right-toolbar :showSearch.sync="showSearch" :search="false" @queryTable="getAttrList"></right-toolbar>-->
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="attrList">
|
|
|
- <el-table-column label="服务区" align="center" prop="areaName" />
|
|
|
+ <el-table-column label="服务区" align="center" prop="areaName"/>
|
|
|
+ <el-table-column label="状态" align="center" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag :type="scope.row.areaCode === currentAreaCode ? 'success' : 'info'" disable-transitions>
|
|
|
+ {{ scope.row.areaCode === currentAreaCode ? '生效' : '继承' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="用电分类" align="center" prop="elecTypeName" />
|
|
|
<el-table-column label="电压等级" align="center" prop="voltageLevel" />
|
|
|
<el-table-column label="容(需)量策略" align="center">
|
|
@@ -36,18 +42,47 @@
|
|
|
</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="handleAttrUpdate(scope.row)" v-hasPermi="['basecfg:price:edit']" v-if="scope.row.areaCode === currentAreaCode">
|
|
|
- 修改</el-button>
|
|
|
- <el-button size="mini" type="text" icon="el-icon-delete" class="deleteBtn" @click="handleAttrDelete(scope.row)" v-hasPermi="['basecfg:price:remove']" v-if="scope.row.areaCode === currentAreaCode">
|
|
|
- 删除</el-button>
|
|
|
+ <!-- 修改按钮 -->
|
|
|
+ <el-tooltip
|
|
|
+ effect="dark"
|
|
|
+ :content="scope.row.areaCode !== currentAreaCode ? '请到上游节点编辑' : '修改'"
|
|
|
+ placement="top"
|
|
|
+ :open-delay="0"
|
|
|
+ :disabled="scope.row.areaCode === currentAreaCode">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ :disabled="scope.row.areaCode !== currentAreaCode"
|
|
|
+ @click="handleAttrUpdate(scope.row)"
|
|
|
+ v-hasPermi="['basecfg:price:edit']">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <!-- 删除按钮 -->
|
|
|
+ <el-tooltip
|
|
|
+ effect="dark"
|
|
|
+ :content="scope.row.areaCode !== currentAreaCode ? '请到上游节点编辑' : '删除'"
|
|
|
+ placement="top"
|
|
|
+ :open-delay="0"
|
|
|
+ :disabled="scope.row.areaCode === currentAreaCode">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ class="deleteBtn"
|
|
|
+ :disabled="scope.row.areaCode !== currentAreaCode"
|
|
|
+ @click="handleAttrDelete(scope.row)"
|
|
|
+ v-hasPermi="['basecfg:price:remove']">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination v-show="total > 0 || total === 0" :total="total || 0" :page.sync="queryAttrParams.pageNum" :limit.sync="queryAttrParams.pageSize"
|
|
|
@pagination="refreshCurrentAreaData" />
|
|
|
-<!-- <pagination v-show="total>0" :total="total" :page.sync="queryAttrParams.pageNum" :limit.sync="queryAttrParams.pageSize"-->
|
|
|
-<!-- @pagination="getAttrList" />-->
|
|
|
<!-- 添加或修改服务区用电属性对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="attrOpen" width="500px" append-to-body>
|
|
|
<el-form ref="attrForm" :model="attrForm" :rules="attrRules" label-width="150px">
|
|
@@ -82,7 +117,6 @@
|
|
|
</el-row>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
-
|
|
|
<el-tab-pane label="国网电价" name="second">
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
@@ -111,7 +145,6 @@
|
|
|
修改</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-delete" class="deleteBtn" @click="handleGwPriceDelete(scope.row)" v-hasPermi="['basecfg:price:remove']">
|
|
|
删除</el-button>
|
|
|
-
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -350,8 +383,6 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleChargingUpdate(scope.row)" v-hasPermi="['basecfg:price:edit']">
|
|
|
修改</el-button>
|
|
|
- <!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleChargingDelete(scope.row)"
|
|
|
- v-hasPermi="['basecfg:price:del']">删除</el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -596,7 +627,6 @@ export default {
|
|
|
getAreaTree(areaCode, recursion) {
|
|
|
areaTreeSelect(areaCode, recursion).then(response => {
|
|
|
this.treeAreaOptions = response.data
|
|
|
-
|
|
|
// 自动选中并触发点击第一个节点
|
|
|
if (response.data && response.data.length > 0) {
|
|
|
const firstNode = response.data[0];
|
|
@@ -630,7 +660,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
formatDict(value, options, key = 'value', name = 'name') {
|
|
|
let text = ''
|
|
|
this[options].forEach(item => {
|
|
@@ -1163,11 +1192,15 @@ export default {
|
|
|
background: #fff;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
-<style lang="scss">
|
|
|
-.custom-dialog {
|
|
|
- .el-dialog__body {
|
|
|
- padding-bottom: 0;
|
|
|
+
|
|
|
+.app-container {
|
|
|
+ .el-button.deleteBtn:disabled {
|
|
|
+ color: #c0c4cc !important; /* 文字颜色 */
|
|
|
+ }
|
|
|
+ .el-button.deleteBtn:disabled:hover {
|
|
|
+ color: #c0c4cc !important;/*删除按钮颜色*/
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+
|