|
@@ -39,14 +39,23 @@
|
|
|
>
|
|
>
|
|
|
<el-form-item label="机构编码:">
|
|
<el-form-item label="机构编码:">
|
|
|
<el-input
|
|
<el-input
|
|
|
- clearable
|
|
|
|
|
|
|
+ clearable
|
|
|
v-model="peopledeptid"
|
|
v-model="peopledeptid"
|
|
|
placeholder="请输入机构编码"
|
|
placeholder="请输入机构编码"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="来源:">
|
|
<el-form-item label="来源:">
|
|
|
- <el-select v-model="managementSource" placeholder="选择来源" clearable>
|
|
|
|
|
- <el-option v-for="val in organizationSourceoptions" :key="val.dictValue" :label="val.dictTag" :value="val.dictValue"></el-option>
|
|
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="managementSource"
|
|
|
|
|
+ placeholder="选择来源"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="val in organizationSourceoptions"
|
|
|
|
|
+ :key="val.dictValue"
|
|
|
|
|
+ :label="val.dictTag"
|
|
|
|
|
+ :value="val.dictValue"
|
|
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -82,7 +91,12 @@
|
|
|
>
|
|
>
|
|
|
<el-table-column prop="name" label="部门管理" width="300">
|
|
<el-table-column prop="name" label="部门管理" width="300">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="deptCount" label="部门数量" width="80" align="center">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="deptCount"
|
|
|
|
|
+ label="部门数量"
|
|
|
|
|
+ width="80"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="id" label="ID" width="150" align="center">
|
|
<el-table-column prop="id" label="ID" width="150" align="center">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -130,13 +144,22 @@
|
|
|
width="150"
|
|
width="150"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <KtButton :perms="'sys:institution:edit'" :size="'medium'" :type="'text'" :label="'编辑'"
|
|
|
|
|
- @click.native.stop="handleEdit(scope.row)"
|
|
|
|
|
|
|
+ <KtButton
|
|
|
|
|
+ :perms="'sys:institution:edit'"
|
|
|
|
|
+ :size="'medium'"
|
|
|
|
|
+ :type="'text'"
|
|
|
|
|
+ :label="'编辑'"
|
|
|
|
|
+ @click.native.stop="handleEdit(scope.row)"
|
|
|
@findPage="findSubDeptPage"
|
|
@findPage="findSubDeptPage"
|
|
|
- ></KtButton>
|
|
|
|
|
- <KtButton :perms="'sys:institution:delete'" v-show="scope.row.parentId != '0'" :size="'medium'" :type="'text'" :label="'删除'"
|
|
|
|
|
- @click.native.stop="deleteMechanism(scope.row)"
|
|
|
|
|
- ></KtButton>
|
|
|
|
|
|
|
+ ></KtButton>
|
|
|
|
|
+ <KtButton
|
|
|
|
|
+ :perms="'sys:institution:delete'"
|
|
|
|
|
+ v-show="scope.row.parentId != '0'"
|
|
|
|
|
+ :size="'medium'"
|
|
|
|
|
+ :type="'text'"
|
|
|
|
|
+ :label="'删除'"
|
|
|
|
|
+ @click.native.stop="deleteMechanism(scope.row)"
|
|
|
|
|
+ ></KtButton>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -617,7 +640,7 @@ export default {
|
|
|
comleveloptions: [],
|
|
comleveloptions: [],
|
|
|
comattributeoptions: [],
|
|
comattributeoptions: [],
|
|
|
comtypeoptions: [],
|
|
comtypeoptions: [],
|
|
|
- organizationSourceoptions:[],
|
|
|
|
|
|
|
+ organizationSourceoptions: [],
|
|
|
//------------下拉框数据 end-----------------
|
|
//------------下拉框数据 end-----------------
|
|
|
|
|
|
|
|
//---dialog begin ----
|
|
//---dialog begin ----
|
|
@@ -813,12 +836,11 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
getDicType(type) {
|
|
getDicType(type) {
|
|
|
- this.$api.insCompany.dicType(type).then(res => {
|
|
|
|
|
|
|
+ this.$api.insCompany.dicType(type).then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- this[type + 'options'] = res.data.ddList;
|
|
|
|
|
|
|
+ this[type + "options"] = res.data.ddList;
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
//获取省市区树数据
|
|
//获取省市区树数据
|
|
|
getQueryTree() {
|
|
getQueryTree() {
|
|
@@ -1076,22 +1098,24 @@ export default {
|
|
|
},
|
|
},
|
|
|
//删除机构或部门
|
|
//删除机构或部门
|
|
|
deleteMechanism(data) {
|
|
deleteMechanism(data) {
|
|
|
- if (data.parentId == '0') {
|
|
|
|
|
|
|
+ if (data.parentId == "0") {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: "总部不可删除",
|
|
message: "总部不可删除",
|
|
|
type: "warning",
|
|
type: "warning",
|
|
|
duration: 1000,
|
|
duration: 1000,
|
|
|
});
|
|
});
|
|
|
- return
|
|
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- this.$prompt('请输入密码', '提示', {
|
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- inputPattern: /.+/,
|
|
|
|
|
- inputType:'password',
|
|
|
|
|
- inputErrorMessage: '请输入密码'
|
|
|
|
|
- }).then(({ value }) => {
|
|
|
|
|
- this.$api.dept.deptDelete({password:value ,deptId:data.id}).then((res) => {
|
|
|
|
|
|
|
+ this.$prompt("请输入密码", "提示", {
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ inputPattern: /.+/,
|
|
|
|
|
+ inputType: "password",
|
|
|
|
|
+ inputErrorMessage: "请输入密码",
|
|
|
|
|
+ }).then(({ value }) => {
|
|
|
|
|
+ this.$api.dept
|
|
|
|
|
+ .deptDelete({ password: value, deptId: data.id })
|
|
|
|
|
+ .then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
this.findSubDeptPage();
|
|
this.findSubDeptPage();
|
|
|
this.findTreeData();
|
|
this.findTreeData();
|
|
@@ -1100,15 +1124,14 @@ export default {
|
|
|
type: "success",
|
|
type: "success",
|
|
|
message: "删除成功!",
|
|
message: "删除成功!",
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: "error",
|
|
type: "error",
|
|
|
message: res.msg,
|
|
message: res.msg,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
// let that = this;
|
|
// let that = this;
|
|
|
// that
|
|
// that
|
|
|
// .$confirm("此操作将删除该数据, 是否继续?", "提示", {
|
|
// .$confirm("此操作将删除该数据, 是否继续?", "提示", {
|