|
|
|
|
@ -71,10 +71,12 @@
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleQuery"
|
|
|
|
|
>搜索</el-button
|
|
|
|
|
>搜索
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>重置
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
@ -88,7 +90,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
v-hasPermi="['energy:ShuiMeasurement:add']"
|
|
|
|
|
>新增</el-button
|
|
|
|
|
>新增
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
@ -98,7 +101,8 @@
|
|
|
|
|
icon="el-icon-sort"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="toggleExpandAll"
|
|
|
|
|
>展开/折叠</el-button
|
|
|
|
|
>展开/折叠
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
@ -109,7 +113,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['energy:ShuiMeasurement:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
共{{ list.length }}条
|
|
|
|
|
@ -205,7 +210,8 @@
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['energy:ShuiMeasurement:edit']"
|
|
|
|
|
>修改</el-button
|
|
|
|
|
>修改
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
@ -213,7 +219,8 @@
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
@click="handleAdd(scope.row)"
|
|
|
|
|
v-hasPermi="['energy:ShuiMeasurement:add']"
|
|
|
|
|
>新增</el-button
|
|
|
|
|
>新增
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
@ -221,7 +228,8 @@
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['energy:ShuiMeasurement:remove']"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -240,7 +248,8 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-button type="primary" @click="selectDevice"
|
|
|
|
|
>选择采集设备</el-button
|
|
|
|
|
>选择采集设备
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -286,7 +295,8 @@
|
|
|
|
|
<el-form-item label="电表类型" prop="electricityMeterType">
|
|
|
|
|
<el-select v-model="form.electricityMeterType" clearable placeholder="请选择电表类型" style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in dict.type.electricity_type" :value="item.value+''" :key="item.value+''" :label="item.label" >
|
|
|
|
|
v-for="item in dict.type.electricity_type" :value="item.value+''" :key="item.value+''"
|
|
|
|
|
:label="item.label">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -296,7 +306,8 @@
|
|
|
|
|
v-for="dict in dict.type.monitorStatus"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="parseInt(dict.value)"
|
|
|
|
|
>{{ dict.label }}</el-radio
|
|
|
|
|
>{{ dict.label }}
|
|
|
|
|
</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -325,13 +336,15 @@
|
|
|
|
|
<el-tree
|
|
|
|
|
class="tree-border"
|
|
|
|
|
:data="subentryOptions"
|
|
|
|
|
accordion
|
|
|
|
|
show-checkbox
|
|
|
|
|
:check-strictly="true"
|
|
|
|
|
:default-expanded-keys="twoKeys"
|
|
|
|
|
:default-expanded-keys="[...subentryExpandedKeys]"
|
|
|
|
|
ref="subentry"
|
|
|
|
|
node-key="id"
|
|
|
|
|
empty-text="加载中,请稍候"
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
@check="handleCheckSubentryOptions"
|
|
|
|
|
></el-tree>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="业态类型" prop="businessId">
|
|
|
|
|
@ -372,7 +385,8 @@
|
|
|
|
|
v-for="dict in dict.type.public_share_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="parseInt(dict.value)"
|
|
|
|
|
>{{ dict.label }}</el-radio
|
|
|
|
|
>{{ dict.label }}
|
|
|
|
|
</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -446,10 +460,12 @@
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleQuery1"
|
|
|
|
|
>搜索</el-button
|
|
|
|
|
>搜索
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
|
|
|
|
|
>重置</el-button
|
|
|
|
|
>重置
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
@ -602,6 +618,7 @@ export default {
|
|
|
|
|
businessOptions: [],
|
|
|
|
|
// 二级展示节点
|
|
|
|
|
twoKeys: [],
|
|
|
|
|
subentryExpandedKeys: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
@ -645,16 +662,6 @@ export default {
|
|
|
|
|
children: node.children,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
/** 查询计量设备信息下拉树结构 */
|
|
|
|
|
getTreeselect() {
|
|
|
|
|
this.queryParams.monitorType = 2;
|
|
|
|
|
listShuiMeasurement(this.queryParams).then((response) => {
|
|
|
|
|
this.ShuiMeasurementOptions = [];
|
|
|
|
|
const data = { objid: 0, monitorName: "顶级节点", children: [] };
|
|
|
|
|
data.children = this.handleTree(response.data, "objid", "parentId");
|
|
|
|
|
this.ShuiMeasurementOptions.push(data);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
@ -802,7 +809,8 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮-------------------------------------------
|
|
|
|
|
/** 选择采集设备操作 */
|
|
|
|
|
@ -863,9 +871,32 @@ export default {
|
|
|
|
|
/** 查询部门类型树结构 */
|
|
|
|
|
getSubentrySelect() {
|
|
|
|
|
subentryTreeSelect().then((response) => {
|
|
|
|
|
this.subentryOptions = response.data;
|
|
|
|
|
this.setSubentryOptions(response.data, 0);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
setSubentryOptions(data, level) {
|
|
|
|
|
data.forEach(item => {
|
|
|
|
|
if (item.children && item.children.length > 0) {
|
|
|
|
|
this.$set(item, 'disabled', true);
|
|
|
|
|
}
|
|
|
|
|
if (item.children) {
|
|
|
|
|
this.setSubentryOptions(item.children, level + 1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (level != 0) return
|
|
|
|
|
this.subentryOptions = data
|
|
|
|
|
this.subentryExpandedKeys =[].concat([this.form.subentryId])
|
|
|
|
|
},
|
|
|
|
|
handleCheckSubentryOptions(data, checkedStatus) {
|
|
|
|
|
const isParent = data.children && data.children.length > 0
|
|
|
|
|
if (isParent) {
|
|
|
|
|
this.$refs.subentry.setChecked(data.id, false)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (checkedStatus.checkedKeys.includes(data.id)) {
|
|
|
|
|
this.$refs.subentry.setCheckedKeys([data.id])
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 查询业态类型树结构 */
|
|
|
|
|
getBusinessSelect() {
|
|
|
|
|
businessTreeSelect().then((response) => {
|
|
|
|
|
@ -916,8 +947,8 @@ export default {
|
|
|
|
|
getAllTree(objid) {
|
|
|
|
|
return treeselect(objid).then((response) => {
|
|
|
|
|
this.buildOptions = response.builds;
|
|
|
|
|
this.subentryOptions = response.subentrys;
|
|
|
|
|
this.businessOptions = response.business;
|
|
|
|
|
this.setSubentryOptions(response.subentrys, 0);
|
|
|
|
|
return response;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
@ -930,3 +961,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
/* 隐藏带 is-disabled 类名的复选框 */
|
|
|
|
|
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
|
|
|
|
|
display: none !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|