|
|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-row :gutter="20">
|
|
|
+ <!-- <el-row :gutter="20"> -->
|
|
|
<!--机构数据-->
|
|
|
- <el-col :span="4" :xs="24">
|
|
|
- <div class="head-container">
|
|
|
+ <!-- <el-col :span="4" :xs="24"> -->
|
|
|
+ <!-- <div class="head-container">
|
|
|
<el-input
|
|
|
v-model="deptName"
|
|
|
placeholder="请输入机构名称"
|
|
|
@@ -12,9 +12,9 @@
|
|
|
prefix-icon="el-icon-search"
|
|
|
style="margin-bottom: 20px"
|
|
|
/>
|
|
|
- </div>
|
|
|
- <div class="tree-container">
|
|
|
- <div style="margin-bottom: 10px">
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <!-- <div style="margin-bottom: 10px">
|
|
|
<el-checkbox v-model="queryParams.checkSub" @change="changeCheckBox"
|
|
|
>关联下级</el-checkbox
|
|
|
>
|
|
|
@@ -29,12 +29,23 @@
|
|
|
:default-expanded-keys="defaultKeys"
|
|
|
:default-checked-keys="defaultKeys"
|
|
|
@node-click="handleNodeClick"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
+ /> -->
|
|
|
+ <!-- <div class="tree-container"> -->
|
|
|
+ <layoutCom>
|
|
|
+ <org-tree
|
|
|
+ slot="leftBar"
|
|
|
+ v-model="queryParams.orgId"
|
|
|
+ @defaultKey="defaultKeys"
|
|
|
+ @checkChange="checkChange"
|
|
|
+ @click="handleNodeClick"
|
|
|
+ ></org-tree>
|
|
|
+ <!-- </div> -->
|
|
|
+ <!-- </el-col> -->
|
|
|
<!--用户数据-->
|
|
|
- <el-col :span="20" :xs="24">
|
|
|
+ <!-- <el-col :span="20" :xs="24"> -->
|
|
|
<!-- 搜索条件 -->
|
|
|
+ <el-row slot="rightBar">
|
|
|
+ <el-col>
|
|
|
<el-form
|
|
|
:model="queryParams"
|
|
|
ref="queryForm"
|
|
|
@@ -166,9 +177,14 @@
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
prop="weatherCityCode"
|
|
|
- label="天气区域编码"
|
|
|
+ label="城市天气区域"
|
|
|
width="150"
|
|
|
- ></el-table-column>
|
|
|
+ >
|
|
|
+ <template slot-scope="r">
|
|
|
+ <span>{{getCode(r.row.weatherCityCode)}}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column prop="address" label="地址"></el-table-column> -->
|
|
|
<!-- <el-table-column label="负责人" align="center">
|
|
|
<template v-slot:default="scope">
|
|
|
@@ -243,7 +259,8 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row>
|
|
|
+ </layoutCom>
|
|
|
|
|
|
<!-- 添加或修改机构对话框 -->
|
|
|
<DialogCom
|
|
|
@@ -276,7 +293,7 @@
|
|
|
<el-input
|
|
|
v-model="form.name"
|
|
|
placeholder="请输入机构名称"
|
|
|
- :readonly="form.source == 1"
|
|
|
+ :disabled="form.source == 1"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -310,7 +327,7 @@
|
|
|
v-model="form.manager"
|
|
|
placeholder="请输入负责人"
|
|
|
maxlength="20"
|
|
|
- :readonly="form.source == 1"
|
|
|
+ :disabled="form.source == 1"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -323,7 +340,7 @@
|
|
|
v-model="form.managerPhone"
|
|
|
placeholder="请输入负责人电话"
|
|
|
maxlength="16"
|
|
|
- :readonly="form.source == 1"
|
|
|
+ :disabled="form.source == 1"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -394,10 +411,12 @@ import { deptTreeSelect } from "@/api/system/public";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import DialogEdit from "@/views/system/dept/dialog.edit.vue";
|
|
|
+import {findAreaList} from "@/api/core/weather";
|
|
|
+import OrgTree from "@/components/orgTree";
|
|
|
export default {
|
|
|
name: "Dept",
|
|
|
dicts: ["sys_normal_disable", "sys_org_type"],
|
|
|
- components: { Treeselect, DialogEdit },
|
|
|
+ components: { Treeselect, DialogEdit,OrgTree },
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
@@ -474,6 +493,7 @@ export default {
|
|
|
},
|
|
|
//默认选中节点
|
|
|
defaultKeys: [],
|
|
|
+ areaList:[],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -486,8 +506,22 @@ export default {
|
|
|
created() {
|
|
|
this.getDeptTree();
|
|
|
this.getList();
|
|
|
+ this.getAreaList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCode(item){
|
|
|
+ if(item!=null&&item.length>0){
|
|
|
+ let area = this.areaList.find(v=>v.key === item);
|
|
|
+ if(area){
|
|
|
+ return area.value;
|
|
|
+ }else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
closeHandler() {
|
|
|
// alert(11111)
|
|
|
},
|
|
|
@@ -521,6 +555,11 @@ export default {
|
|
|
this.handleQuery();
|
|
|
});
|
|
|
},
|
|
|
+ getAreaList() {
|
|
|
+ findAreaList({}).then(response => {
|
|
|
+ this.areaList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 筛选节点
|
|
|
filterNode(value, data) {
|
|
|
if (!value) return true;
|
|
|
@@ -531,6 +570,11 @@ export default {
|
|
|
this.queryParams.parentId = data.id;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
+ //单选框状态改变
|
|
|
+ checkChange(state) {
|
|
|
+ this.queryParams.checkSub = state;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
/** 查询机构列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|