|
@@ -88,7 +88,7 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" v-if="form.parentId !== 0">
|
|
<el-col :span="24" v-if="form.parentId !== 0">
|
|
<el-form-item label="上级部门" prop="parentId">
|
|
<el-form-item label="上级部门" prop="parentId">
|
|
- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
|
|
|
|
|
|
+ <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" @select="selectDepart" placeholder="选择上级部门" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -116,6 +116,53 @@
|
|
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
|
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12" v-show="false">
|
|
|
|
+ <el-form-item label="jiBie " prop="jiBie">
|
|
|
|
+ <el-input v-model="form.jiBie" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="油站地址" prop="deptAddress">
|
|
|
|
+ <el-input v-model="form.deptAddress" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="油枪数量" prop="oilGunNum">
|
|
|
|
+ <el-input v-model="form.oilGunNum" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="油站照片" prop="stationPic">
|
|
|
|
+ <el-input v-model="form.stationPic" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="油站经度" prop="stationLatitude">
|
|
|
|
+ <el-input v-model="form.stationLatitude" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="油站纬度" prop="stationLongitude">
|
|
|
|
+ <el-input v-model="form.stationLongitude" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="商户号" prop="mno">
|
|
|
|
+ <el-input v-model="form.mno" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="小程序appID" prop="appId">
|
|
|
|
+ <el-input v-model="form.appId" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" v-show=isShow>
|
|
|
|
+ <el-form-item label="小程序appSecret" prop="appSecret">
|
|
|
|
+ <el-input v-model="form.appSecret" maxlength="50" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item label="部门状态">
|
|
<el-form-item label="部门状态">
|
|
<el-radio-group v-model="form.status">
|
|
<el-radio-group v-model="form.status">
|
|
@@ -159,6 +206,7 @@ export default {
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
|
|
+ isShow: false,
|
|
// 状态数据字典
|
|
// 状态数据字典
|
|
statusOptions: [],
|
|
statusOptions: [],
|
|
// 查询参数
|
|
// 查询参数
|
|
@@ -203,6 +251,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
/** 查询部门列表 */
|
|
/** 查询部门列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -212,11 +261,19 @@ export default {
|
|
// this.loading = false;
|
|
// this.loading = false;
|
|
// });
|
|
// });
|
|
listDept(this.queryParams).then(response => {
|
|
listDept(this.queryParams).then(response => {
|
|
- console.log("组织机构树:",response);
|
|
|
|
this.deptList = this.handleTree(response.data, "deptId");
|
|
this.deptList = this.handleTree(response.data, "deptId");
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ selectDepart(val) {
|
|
|
|
+ this.form.jiBie=parseInt(val.jiBie)+1;
|
|
|
|
+ if(val.jiBie==1){
|
|
|
|
+ console.log("123123123");
|
|
|
|
+ this.isShow=true;
|
|
|
|
+ }else{
|
|
|
|
+ this.isShow=false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/** 转换部门数据结构 */
|
|
/** 转换部门数据结构 */
|
|
normalizer(node) {
|
|
normalizer(node) {
|
|
if (node.children && !node.children.length) {
|
|
if (node.children && !node.children.length) {
|
|
@@ -235,6 +292,7 @@ export default {
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.isShow=false;
|
|
this.reset();
|
|
this.reset();
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
@@ -265,6 +323,11 @@ export default {
|
|
this.reset();
|
|
this.reset();
|
|
if (row != undefined) {
|
|
if (row != undefined) {
|
|
this.form.parentId = row.deptId;
|
|
this.form.parentId = row.deptId;
|
|
|
|
+ //判断级别 1是集团,如果是集团展示的是油站的所有数据
|
|
|
|
+ if(row.jiBie==1){
|
|
|
|
+ this.form.jiBie=parseInt(row.jiBie)+1;
|
|
|
|
+ this.isShow=true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加部门";
|
|
this.title = "添加部门";
|
|
@@ -283,6 +346,10 @@ export default {
|
|
listDeptExcludeChild(row.deptId).then(response => {
|
|
listDeptExcludeChild(row.deptId).then(response => {
|
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
|
});
|
|
});
|
|
|
|
+ //判断级别 1是集团,如果是集团展示的是油站的所有数据
|
|
|
|
+ if(row.jiBie==2){
|
|
|
|
+ this.isShow=true;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm: function() {
|
|
submitForm: function() {
|
|
@@ -292,12 +359,15 @@ export default {
|
|
updateDept(this.form).then(response => {
|
|
updateDept(this.form).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.isShow=false;
|
|
this.getList();
|
|
this.getList();
|
|
|
|
+
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
addDept(this.form).then(response => {
|
|
addDept(this.form).then(response => {
|
|
this.msgSuccess("新增成功");
|
|
this.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.isShow=false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
}
|
|
}
|