|
@@ -1,7 +1,11 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div
|
|
<div
|
|
|
class="main-content"
|
|
class="main-content"
|
|
|
- :style="{ width: '100%', padding: '20px 30px', fontSize: '15px' }"
|
|
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ width: '100%',
|
|
|
|
|
+ padding: '20px 30px',
|
|
|
|
|
+ fontSize: '15px',
|
|
|
|
|
+ }"
|
|
|
>
|
|
>
|
|
|
<!-- 列表页 -->
|
|
<!-- 列表页 -->
|
|
|
<template v-if="!addOrUpdateOrDetailFlag">
|
|
<template v-if="!addOrUpdateOrDetailFlag">
|
|
@@ -155,11 +159,7 @@
|
|
|
display: 'flex',
|
|
display: 'flex',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-button
|
|
|
|
|
- class="add"
|
|
|
|
|
- type="success"
|
|
|
|
|
- @click="addOrUpdateHandler(null, 'add')"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button class="add" type="success" @click="addOrUpdateHandler(null, 'add')">
|
|
|
<span
|
|
<span
|
|
|
class="icon iconfont icon-xihuan"
|
|
class="icon iconfont icon-xihuan"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -234,52 +234,27 @@
|
|
|
width="50"
|
|
width="50"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="subName"
|
|
|
|
|
- label="变电站名称"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="subName" label="变电站名称">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.subName }}
|
|
{{ scope.row.subName }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="cityName"
|
|
|
|
|
- label="归属市名称"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="cityName" label="归属市名称">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.cityName }}
|
|
{{ scope.row.cityName }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="compName"
|
|
|
|
|
- label="归属旗县"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="compName" label="归属旗县">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.compName }}
|
|
{{ scope.row.compName }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="voltageLevel"
|
|
|
|
|
- label="电压等级"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="voltageLevel" label="电压等级">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.voltageLevel }}
|
|
{{ scope.row.voltageLevel }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="mainNum"
|
|
|
|
|
- label="主变台数"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="mainNum" label="主变台数">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.mainNum }}
|
|
{{ scope.row.mainNum }}
|
|
|
</template>
|
|
</template>
|
|
@@ -310,12 +285,7 @@
|
|
|
prop="growRate"
|
|
prop="growRate"
|
|
|
label="用户增长率(%)"
|
|
label="用户增长率(%)"
|
|
|
/>
|
|
/>
|
|
|
- <el-table-column
|
|
|
|
|
- :resizable="true"
|
|
|
|
|
- :sortable="true"
|
|
|
|
|
- prop="remark"
|
|
|
|
|
- label="备注"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-table-column :resizable="true" :sortable="true" prop="remark" label="备注">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.remark }}
|
|
{{ scope.row.remark }}
|
|
|
</template>
|
|
</template>
|
|
@@ -356,11 +326,7 @@
|
|
|
></span>
|
|
></span>
|
|
|
修改
|
|
修改
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- class="del"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="deleteHandler(scope.row.id)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button class="del" type="primary" @click="deleteHandler(scope.row.id)">
|
|
|
<span
|
|
<span
|
|
|
class="icon iconfont icon-xihuan"
|
|
class="icon iconfont icon-xihuan"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -373,12 +339,7 @@
|
|
|
></span>
|
|
></span>
|
|
|
删除
|
|
删除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button
|
|
|
|
|
- v-if="false"
|
|
|
|
|
- class="view"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- @click="lineHandler(scope.row)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-button v-if="false" class="view" type="primary" @click="lineHandler(scope.row)">
|
|
|
<span
|
|
<span
|
|
|
class="icon iconfont icon-xihuan"
|
|
class="icon iconfont icon-xihuan"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -423,29 +384,25 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 添加/修改页面 将父组件的search方法传递给子组件-->
|
|
<!-- 添加/修改页面 将父组件的search方法传递给子组件-->
|
|
|
- <add-or-update
|
|
|
|
|
- v-if="addOrUpdateOrDetailFlag"
|
|
|
|
|
- :parent="this"
|
|
|
|
|
- ref="addOrUpdate"
|
|
|
|
|
- ></add-or-update>
|
|
|
|
|
|
|
+ <add-or-update v-if="addOrUpdateOrDetailFlag" :parent="this" ref="addOrUpdate"></add-or-update>
|
|
|
<!-- 线路页面 -->
|
|
<!-- 线路页面 -->
|
|
|
<line-list :parent="this" ref="line"></line-list>
|
|
<line-list :parent="this" ref="line"></line-list>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import AddOrUpdate from "./components/add-or-update";
|
|
|
|
|
-import LineList from "./components/line-list";
|
|
|
|
|
-import { myMixin } from "./selectMixin";
|
|
|
|
|
|
|
+import AddOrUpdate from './components/add-or-update';
|
|
|
|
|
+import LineList from './components/line-list';
|
|
|
|
|
+import { myMixin } from './selectMixin';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [myMixin],
|
|
mixins: [myMixin],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
- subName: "",
|
|
|
|
|
- cityId: "",
|
|
|
|
|
- compId: "",
|
|
|
|
|
|
|
+ subName: '',
|
|
|
|
|
+ cityId: '',
|
|
|
|
|
+ compId: '',
|
|
|
},
|
|
},
|
|
|
form: {},
|
|
form: {},
|
|
|
dataList: [],
|
|
dataList: [],
|
|
@@ -454,7 +411,7 @@ export default {
|
|
|
totalPage: 0,
|
|
totalPage: 0,
|
|
|
dataListLoading: false,
|
|
dataListLoading: false,
|
|
|
dataListSelections: [],
|
|
dataListSelections: [],
|
|
|
- layouts: ["prev", "pager", "next", "sizes"],
|
|
|
|
|
|
|
+ layouts: ['prev', 'pager', 'next', 'sizes'],
|
|
|
compList: [],
|
|
compList: [],
|
|
|
addOrUpdateOrDetailFlag: false,
|
|
addOrUpdateOrDetailFlag: false,
|
|
|
};
|
|
};
|
|
@@ -463,8 +420,6 @@ export default {
|
|
|
this.getCityList();
|
|
this.getCityList();
|
|
|
this.getDataList();
|
|
this.getDataList();
|
|
|
},
|
|
},
|
|
|
- mounted() {},
|
|
|
|
|
- computed: {},
|
|
|
|
|
components: {
|
|
components: {
|
|
|
AddOrUpdate,
|
|
AddOrUpdate,
|
|
|
LineList,
|
|
LineList,
|
|
@@ -476,13 +431,13 @@ export default {
|
|
|
this.compList = [];
|
|
this.compList = [];
|
|
|
const { data } = await this.$http({
|
|
const { data } = await this.$http({
|
|
|
url: `/company/lists`,
|
|
url: `/company/lists`,
|
|
|
- method: "get",
|
|
|
|
|
|
|
+ method: 'get',
|
|
|
params: {
|
|
params: {
|
|
|
cityId: this.searchForm.cityId,
|
|
cityId: this.searchForm.cityId,
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
- this.compList = data.data.map((item) => ({
|
|
|
|
|
|
|
+ this.compList = data.data.map(item => ({
|
|
|
label: item.compName,
|
|
label: item.compName,
|
|
|
value: String(item.id),
|
|
value: String(item.id),
|
|
|
}));
|
|
}));
|
|
@@ -501,24 +456,21 @@ export default {
|
|
|
let params = {
|
|
let params = {
|
|
|
page: this.pageIndex,
|
|
page: this.pageIndex,
|
|
|
limit: this.pageSize,
|
|
limit: this.pageSize,
|
|
|
- sort: "id",
|
|
|
|
|
- order: "desc",
|
|
|
|
|
|
|
+ sort: 'id',
|
|
|
|
|
+ order: 'desc',
|
|
|
};
|
|
};
|
|
|
- if (
|
|
|
|
|
- this.searchForm.subName != "" &&
|
|
|
|
|
- this.searchForm.subName != undefined
|
|
|
|
|
- ) {
|
|
|
|
|
- params["subName"] = "%" + this.searchForm.subName + "%";
|
|
|
|
|
|
|
+ if (this.searchForm.subName != '' && this.searchForm.subName != undefined) {
|
|
|
|
|
+ params['subName'] = '%' + this.searchForm.subName + '%';
|
|
|
}
|
|
}
|
|
|
- if (this.searchForm.cityId != "" && this.searchForm.cityId != undefined) {
|
|
|
|
|
- params["cityId"] = Number(this.searchForm.cityId);
|
|
|
|
|
|
|
+ if (this.searchForm.cityId != '' && this.searchForm.cityId != undefined) {
|
|
|
|
|
+ params['cityId'] = Number(this.searchForm.cityId);
|
|
|
}
|
|
}
|
|
|
- if (this.searchForm.compId != "" && this.searchForm.compId != undefined) {
|
|
|
|
|
- params["compId"] = Number(this.searchForm.compId);
|
|
|
|
|
|
|
+ if (this.searchForm.compId != '' && this.searchForm.compId != undefined) {
|
|
|
|
|
+ params['compId'] = Number(this.searchForm.compId);
|
|
|
}
|
|
}
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: "/sub/page",
|
|
|
|
|
- method: "get",
|
|
|
|
|
|
|
+ url: '/sub/page',
|
|
|
|
|
+ method: 'get',
|
|
|
params: params,
|
|
params: params,
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
@@ -557,27 +509,23 @@ export default {
|
|
|
async deleteHandler(id) {
|
|
async deleteHandler(id) {
|
|
|
var ids = id
|
|
var ids = id
|
|
|
? [Number(id)]
|
|
? [Number(id)]
|
|
|
- : this.dataListSelections.map((item) => {
|
|
|
|
|
|
|
+ : this.dataListSelections.map(item => {
|
|
|
return Number(item.id);
|
|
return Number(item.id);
|
|
|
});
|
|
});
|
|
|
- await this.$confirm(
|
|
|
|
|
- `确定进行[${id ? "删除" : "批量删除"}]操作?`,
|
|
|
|
|
- "提示",
|
|
|
|
|
- {
|
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- }
|
|
|
|
|
- ).then(async () => {
|
|
|
|
|
|
|
+ await this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }).then(async () => {
|
|
|
await this.$http({
|
|
await this.$http({
|
|
|
- url: "sub/delete",
|
|
|
|
|
- method: "post",
|
|
|
|
|
|
|
+ url: 'sub/delete',
|
|
|
|
|
+ method: 'post',
|
|
|
data: ids,
|
|
data: ids,
|
|
|
}).then(async ({ data }) => {
|
|
}).then(async ({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- message: "操作成功",
|
|
|
|
|
- type: "success",
|
|
|
|
|
|
|
+ message: '操作成功',
|
|
|
|
|
+ type: 'success',
|
|
|
});
|
|
});
|
|
|
this.search();
|
|
this.search();
|
|
|
} else {
|
|
} else {
|
|
@@ -604,6 +552,7 @@ export default {
|
|
|
.center-form-pv .el-input {
|
|
.center-form-pv .el-input {
|
|
|
width: auto;
|
|
width: auto;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.center-form-pv .el-input ::v-deep .el-input__inner {
|
|
.center-form-pv .el-input ::v-deep .el-input__inner {
|
|
|
border: 1px solid #ddd;
|
|
border: 1px solid #ddd;
|
|
|
border-radius: 0px;
|
|
border-radius: 0px;
|
|
@@ -613,9 +562,11 @@ export default {
|
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.center-form-pv .el-select {
|
|
.center-form-pv .el-select {
|
|
|
width: auto;
|
|
width: auto;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.center-form-pv .el-select ::v-deep .el-input__inner {
|
|
.center-form-pv .el-select ::v-deep .el-input__inner {
|
|
|
border: 1px solid #ddd;
|
|
border: 1px solid #ddd;
|
|
|
border-radius: 0px;
|
|
border-radius: 0px;
|
|
@@ -625,6 +576,7 @@ export default {
|
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
|
height: 40px;
|
|
height: 40px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.center-form-pv .el-date-editor {
|
|
.center-form-pv .el-date-editor {
|
|
|
width: auto;
|
|
width: auto;
|
|
|
}
|
|
}
|
|
@@ -766,6 +718,7 @@ export default {
|
|
|
.el-table ::v-deep .el-table__body-wrapper {
|
|
.el-table ::v-deep .el-table__body-wrapper {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.el-table ::v-deep .el-table__body-wrapper tbody {
|
|
.el-table ::v-deep .el-table__body-wrapper tbody {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
@@ -1030,12 +983,7 @@ export default {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.main-content
|
|
|
|
|
- .el-pagination
|
|
|
|
|
- ::v-deep
|
|
|
|
|
- .el-pagination__sizes
|
|
|
|
|
- .el-input
|
|
|
|
|
- .el-input__inner {
|
|
|
|
|
|
|
+.main-content .el-pagination ::v-deep .el-pagination__sizes .el-input .el-input__inner {
|
|
|
border: 1px solid #dcdfe6;
|
|
border: 1px solid #dcdfe6;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
padding: 0 25px 0 8px;
|
|
padding: 0 25px 0 8px;
|
|
@@ -1051,12 +999,7 @@ export default {
|
|
|
height: 28px;
|
|
height: 28px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.main-content
|
|
|
|
|
- .el-pagination
|
|
|
|
|
- ::v-deep
|
|
|
|
|
- .el-pagination__sizes
|
|
|
|
|
- .el-input
|
|
|
|
|
- span.el-input__suffix {
|
|
|
|
|
|
|
+.main-content .el-pagination ::v-deep .el-pagination__sizes .el-input span.el-input__suffix {
|
|
|
top: 0;
|
|
top: 0;
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
right: 0;
|
|
right: 0;
|
|
@@ -1101,12 +1044,7 @@ export default {
|
|
|
height: 28px;
|
|
height: 28px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.main-content
|
|
|
|
|
- .el-pagination
|
|
|
|
|
- ::v-deep
|
|
|
|
|
- .el-pagination__jump
|
|
|
|
|
- .el-input
|
|
|
|
|
- .el-input__inner {
|
|
|
|
|
|
|
+.main-content .el-pagination ::v-deep .el-pagination__jump .el-input .el-input__inner {
|
|
|
border: 1px solid #dcdfe6;
|
|
border: 1px solid #dcdfe6;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
padding: 0 3px;
|
|
padding: 0 3px;
|
|
@@ -1203,6 +1141,7 @@ export default {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
height: 30px;
|
|
height: 30px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__label--left {
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__label--left {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
margin: 0 10px 0 0;
|
|
margin: 0 10px 0 0;
|
|
@@ -1214,6 +1153,7 @@ export default {
|
|
|
transition: 0.2s;
|
|
transition: 0.2s;
|
|
|
height: 30px;
|
|
height: 30px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__label--right {
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__label--right {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
margin: 0 0 0 10px;
|
|
margin: 0 0 0 10px;
|
|
@@ -1225,6 +1165,7 @@ export default {
|
|
|
transition: 0.2s;
|
|
transition: 0.2s;
|
|
|
height: 30px;
|
|
height: 30px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__core {
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__core {
|
|
|
border: 1px solid #75c0d6;
|
|
border: 1px solid #75c0d6;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
@@ -1237,6 +1178,7 @@ export default {
|
|
|
transition: border-color 0.3s, background-color 0.3s;
|
|
transition: border-color 0.3s, background-color 0.3s;
|
|
|
height: 20px;
|
|
height: 20px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__core::after {
|
|
.main-content .el-table .el-switch ::v-deep .el-switch__core::after {
|
|
|
border-radius: 100%;
|
|
border-radius: 100%;
|
|
|
top: 1px;
|
|
top: 1px;
|
|
@@ -1247,6 +1189,7 @@ export default {
|
|
|
transition: all 0.3s;
|
|
transition: all 0.3s;
|
|
|
height: 16px;
|
|
height: 16px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-switch.is-checked ::v-deep .el-switch__core::after {
|
|
.main-content .el-table .el-switch.is-checked ::v-deep .el-switch__core::after {
|
|
|
margin: 0 0 0 -18px;
|
|
margin: 0 0 0 -18px;
|
|
|
left: 100%;
|
|
left: 100%;
|
|
@@ -1259,6 +1202,7 @@ export default {
|
|
|
font-size: 0;
|
|
font-size: 0;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
.main-content .el-table .el-rate ::v-deep .el-rate__item .el-rate__icon {
|
|
.main-content .el-table .el-rate ::v-deep .el-rate__item .el-rate__icon {
|
|
|
margin: 0 3px;
|
|
margin: 0 3px;
|
|
|
display: inline-block;
|
|
display: inline-block;
|