转群功能优化

This commit is contained in:
zyh 2025-08-19 18:00:27 +08:00
parent 9a1eff0fc6
commit 1fd3521d34

View File

@ -38,11 +38,11 @@
<el-option v-for="type in sheepTypeOptions" :key="type.id" :label="type.name" :value="type.id" />
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" style="width: 150px;" placeholder="请选择状态" clearable>
<el-option v-for="dict in status" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
@ -85,20 +85,20 @@
<el-table-column label="羊只类别" align="center" prop="sheepTypeName" />
<el-table-column label="转群原因" align="center" prop="reasonText" min-width="120" />
<el-table-column label="技术员" align="center" prop="technician" />
<el-table-column label="状态" align="center" prop="status">
<!-- <el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="status" :value="scope.row.status" />
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="备注" align="center" prop="comment" min-width="120" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="160" fixed="right">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleApprove(scope.row)"
<!-- <el-button link type="primary" icon="Edit" @click="handleApprove(scope.row)"
v-hasPermi="['trans_group:trans_group:approve']">
审批
</el-button>
</el-button> -->
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['trans_group:trans_group:remove']">
删除
@ -178,7 +178,7 @@
</el-dialog>
<!-- 审批对话框 -->
<el-dialog :title="'审批转群记录'" v-model="approveDialog" width="500px" append-to-body>
<!-- <el-dialog :title="'审批转群记录'" v-model="approveDialog" width="500px" append-to-body>
<el-form ref="approveFormRef" :model="approveForm" label-width="120px">
<el-form-item label="耳号">
<el-input v-model="displayManageTags" disabled />
@ -214,7 +214,7 @@
<el-button type="danger" @click="handleApproveReject">驳回</el-button>
</div>
</template>
</el-dialog>
</el-dialog> -->
</div>
</template>
@ -240,9 +240,9 @@ const title = ref('');
const daterangeTransDate = ref([]);
const daterangeCreateTime = ref([]);
const eventTypeOptions = trans_group_event_type || [];
const approveDialog = ref(false);
const approveForm = ref({});
const displayManageTags = ref('');
// const approveDialog = ref(false);
// const approveForm = ref({});
// const displayManageTags = ref('');
const sheepOptions = ref([]);
const sheepfoldOptions = ref([]);
const sheepfoldNameMap = ref({});
@ -699,38 +699,38 @@ function handleExport() {
}
//
function handleApprove(row) {
approveForm.value = { ...row };
approveDialog.value = true;
displayManageTags.value = row.manageTags;
}
//function handleApprove(row) {
// approveForm.value = { ...row };
// approveDialog.value = true;
// displayManageTags.value = row.manageTags;
// }
//
function handleApproveAgree() {
if (typeof approveForm.value.foldTo !== 'number') {
approveForm.value.foldTo = Number(approveForm.value.foldTo);
}
// function handleApproveAgree() {
// if (typeof approveForm.value.foldTo !== 'number') {
// approveForm.value.foldTo = Number(approveForm.value.foldTo);
// }
approveForm.value.status = 1;
approveScTransGroup(approveForm.value).then(() => {
approveDialog.value = false;
proxy.$modal.msgSuccess('审批通过,羊只所在羊舍已更新');
getList();
}).catch(error => {
proxy.$modal.msgError(`审批失败:${error.message}`);
});
}
// approveForm.value.status = 1;
// approveScTransGroup(approveForm.value).then(() => {
// approveDialog.value = false;
// proxy.$modal.msgSuccess('');
// getList();
// }).catch(error => {
// proxy.$modal.msgError(`${error.message}`);
// });
// }
function handleApproveReject() {
approveForm.value.status = 2;
approveScTransGroup(approveForm.value).then(() => {
approveDialog.value = false;
proxy.$modal.msgSuccess('审批已驳回');
getList();
}).catch(error => {
proxy.$modal.msgError(`审批失败:${error.message}`);
});
}
// function handleApproveReject() {
// approveForm.value.status = 2;
// approveScTransGroup(approveForm.value).then(() => {
// approveDialog.value = false;
// proxy.$modal.msgSuccess('');
// getList();
// }).catch(error => {
// proxy.$modal.msgError(`${error.message}`);
// });
// }
//
function loadSheepfold() {