ソースを参照

Merge branch 'dev-xuzhao'

Luka 22 時間 前
コミット
6c6cbbfd76
2 ファイル変更41 行追加33 行削除
  1. 26 23
      src/views/addressBook/components/detail.vue
  2. 15 10
      src/views/addressBook/index.vue

+ 26 - 23
src/views/addressBook/components/detail.vue

@@ -73,11 +73,13 @@
 										/>
 									</template>
 									<template v-if="item.type === 'msgRecipient'">
-										<el-radio-group :disabled="item.disabled" v-model="formData[item.prop]">
-											<el-radio :key="vax.value" v-for="vax in bj_msg_recipient" :value="vax.value">{{
-												vax.label
-											}}</el-radio>
+										<el-radio-group v-model="formData.msgRecipient">
+											<el-radio value="1">是</el-radio>
+											<el-radio value="2">否</el-radio>
 										</el-radio-group>
+										<!-- <el-radio-group v-model="formData[item.prop]">
+											<el-radio v-for="vax in bj_msg_recipient" :value="vax.value">{{ vax.label }}</el-radio>
+										</el-radio-group> -->
 									</template>
 									<template v-if="item.type === 'contactName'">
 										<el-select
@@ -234,25 +236,26 @@ async function setDialogVisible(isNew: boolean = true, check: boolean = false) {
 }
 // 点击确定
 function handleConfirmClick(formEl: FormInstance | undefined) {
-	if (!formEl) return;
-	formEl.validate((valid, fields) => {
-		if (valid) {
-			dialogVisible.value = false;
-			let data = { ...formData.value };
-			if (props.otherInfo) {
-				data = { ...data, ...props.otherInfo };
-			}
-			if (!isEdit.value) {
-				systemStore.newPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
-			} else {
-				if (pageOperateType.value === 'edit') {
-					systemStore.editPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
-				}
-			}
-		} else {
-			console.log('error submit!', fields);
-		}
-	});
+	console.log(formData.msgRecipient);
+	// if (!formEl) return;
+	// formEl.validate((valid, fields) => {
+	// 	if (valid) {
+	// 		dialogVisible.value = false;
+	// 		let data = { ...formData.value };
+	// 		if (props.otherInfo) {
+	// 			data = { ...data, ...props.otherInfo };
+	// 		}
+	// 		if (!isEdit.value) {
+	// 			systemStore.newPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+	// 		} else {
+	// 			if (pageOperateType.value === 'edit') {
+	// 				systemStore.editPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+	// 			}
+	// 		}
+	// 	} else {
+	// 		console.log('error submit!', fields);
+	// 	}
+	// });
 }
 // 取消
 function handleExcel(formEl: FormInstance | undefined) {

+ 15 - 10
src/views/addressBook/index.vue

@@ -43,11 +43,9 @@
 							<el-button type="primary" @click="onExport()">导出</el-button>
 						</template>
 						<template #operate="scope">
-							<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"> 编辑 </el-button>
-							<el-button type="primary" link @click="handleCheck(scope.row.rentalCompanyId)">
-								查看
-							</el-button>
-							<el-button type="primary" link @click="onDelete(scope.row.rentalCompanyId)"> 删除 </el-button>
+							<el-button type="primary" link @click="handleEdit(scope.row.liaisonId)"> 编辑 </el-button>
+							<el-button type="primary" link @click="handleCheck(scope.row.liaisonId)"> 查看 </el-button>
+							<el-button type="primary" link @click="onDelete(scope.row.liaisonId)"> 删除 </el-button>
 						</template>
 					</pageContent>
 				</div>
@@ -78,9 +76,6 @@ const bj_ab_status: any = outTypeList('bj_ab_status'); //通讯录状态
 // 使用pinia数据
 const systemStore = useSystemStore();
 const { pageDetailInfo, searchObj } = storeToRefs(systemStore);
-watch(searchObj, newval => {
-	console.log('=====' + JSON.stringify(newval));
-});
 
 const total = ref(0);
 const pageSize = ref([10, 20, 30]);
@@ -114,8 +109,18 @@ const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick,
 	usePageModal();
 
 const getTreeCheck = async data => {
-	if (searchTableRef.value) {
-		searchTableRef.value[0].searchForm.belongsDept = data.join();
+	console.log(data);
+	// console.log(searchObj);
+	if (tableListRef.value) {
+		if (activeTab.value == '1') {
+			console.log(data.join());
+			searchConfig.pageListParams.belongsDept = data.join();
+			console.log(searchConfig);
+		} else {
+			searchNonIndustryConfig.pageListParams.belongsDept = data.join();
+		}
+
+		await tableListRef.value[0].fetchPageListData({ belongsDept: data.join() });
 	}
 };
 const treeSelectdRef = ref<InstanceType<typeof TreeSelect>>();