|
@@ -250,13 +250,18 @@ function setDeptUser(item:any){
|
|
|
//批量设置负责人
|
|
//批量设置负责人
|
|
|
|
|
|
|
|
function manySetDeptUser(){
|
|
function manySetDeptUser(){
|
|
|
-
|
|
|
|
|
- deptIdList.value=checkTableIdList.value
|
|
|
|
|
- deptDialogVisible.value=true
|
|
|
|
|
|
|
+ if(checkTableIdList.value.length>0){
|
|
|
|
|
+ deptIdList.value=checkTableIdList.value
|
|
|
|
|
+ deptDialogVisible.value=true
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ElMessage.warning("请选择机构后,再进行设置负责人")
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function confirmCharge(){
|
|
function confirmCharge(){
|
|
|
deptDialogVisible.value=false
|
|
deptDialogVisible.value=false
|
|
|
|
|
+ getInstitutionList(); //机构列表
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -338,7 +343,7 @@ const typeformatter = (row: any, column: any, cellValue: any) => {
|
|
|
};
|
|
};
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{ prop: "name", label: "机构名称" },
|
|
{ prop: "name", label: "机构名称" },
|
|
|
- { prop: "Phone", label: "人数" },
|
|
|
|
|
|
|
+ { prop: "userCount", label: "人数" },
|
|
|
{ prop: "comType", label: "机构类型", formatter: typeformatter },
|
|
{ prop: "comType", label: "机构类型", formatter: typeformatter },
|
|
|
{
|
|
{
|
|
|
prop: "comAttribute",
|
|
prop: "comAttribute",
|
|
@@ -387,6 +392,7 @@ function selectChange(list:any){
|
|
|
const isDisabledId = ref("");
|
|
const isDisabledId = ref("");
|
|
|
const addChild = (item: any) => {
|
|
const addChild = (item: any) => {
|
|
|
// form.id=item.id
|
|
// form.id=item.id
|
|
|
|
|
+ console.log(item)
|
|
|
form.parentId = item.id;
|
|
form.parentId = item.id;
|
|
|
isDisabledId.value = item.id;
|
|
isDisabledId.value = item.id;
|
|
|
dialogVisible.value = true;
|
|
dialogVisible.value = true;
|
|
@@ -396,7 +402,7 @@ const addChild = (item: any) => {
|
|
|
// pageInfo.pageSize=item.pageSize
|
|
// pageInfo.pageSize=item.pageSize
|
|
|
};
|
|
};
|
|
|
const editor = (item: any) => {
|
|
const editor = (item: any) => {
|
|
|
- console.log(item);
|
|
|
|
|
|
|
+
|
|
|
// form={...item}
|
|
// form={...item}
|
|
|
for (let key in item) {
|
|
for (let key in item) {
|
|
|
form[key] = item[key];
|
|
form[key] = item[key];
|
|
@@ -537,7 +543,7 @@ const getInstitutionList = () => {
|
|
|
|
|
|
|
|
// }
|
|
// }
|
|
|
tableData.value = res.data;
|
|
tableData.value = res.data;
|
|
|
- console.log(tableData.value);
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
// pageInfo.pageSize=item.pageSize
|
|
// pageInfo.pageSize=item.pageSize
|
|
|
};
|
|
};
|
|
@@ -561,7 +567,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
const obj = { ...form };
|
|
const obj = { ...form };
|
|
|
delete obj.area;
|
|
delete obj.area;
|
|
|
-
|
|
|
|
|
|
|
+ console.log(obj)
|
|
|
if (operationType.value == "add") {
|
|
if (operationType.value == "add") {
|
|
|
api.institutionApi
|
|
api.institutionApi
|
|
|
.institutionAdd({
|
|
.institutionAdd({
|
|
@@ -570,7 +576,7 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|
|
province: form.area[0],
|
|
province: form.area[0],
|
|
|
city: form.area[1],
|
|
city: form.area[1],
|
|
|
area: form.area[2],
|
|
area: form.area[2],
|
|
|
- parentId:obj.parentId[obj.parentId.length-1]
|
|
|
|
|
|
|
+ parentId:typeof obj.parentId=='string' ? obj.parentId:obj.parentId[obj.parentId.length-1]
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
@@ -587,11 +593,11 @@ const confirm = async (formEl: FormInstance | undefined) => {
|
|
|
province: form.area[0],
|
|
province: form.area[0],
|
|
|
city: form.area[1],
|
|
city: form.area[1],
|
|
|
area: form.area[2],
|
|
area: form.area[2],
|
|
|
- parentId:obj.parentId[obj.parentId.length-1]
|
|
|
|
|
|
|
+ parentId:typeof obj.parentId=='string' ? obj.parentId:obj.parentId[obj.parentId.length-1]
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
ElMessage.success("操作成功");
|
|
ElMessage.success("操作成功");
|
|
|
dialogVisible.value = false;
|
|
dialogVisible.value = false;
|