'修改图片参数转换处理'

This commit is contained in:
esacpe
2025-09-26 10:50:15 +08:00
parent 204a199990
commit 141c0d5962
12 changed files with 78 additions and 28 deletions

View File

@ -87,7 +87,7 @@ const pageData = reactive({
},
total: 0,
pageConfiger: {
sfcjpx: 1, // 是否参加培训
sfxxpx: '02', // 是否参加培训
pageSize: 20,
pageCurrent: 1
},

View File

@ -99,6 +99,14 @@ const close = () => {
const open = (row = {}, type = 'add') => {
disabled.value = false
dialogVisible.value = true
const fieldsToSplit = ['sfzzm', 'sfzfm', 'tjbg', 'fzjlzm'];
fieldsToSplit.forEach(field => {
row[field] = typeof row[field] === 'string'
? row[field].split(',')
: [];
});
formData.value = { ...row }
if (type === 'add') {
title.value = '新增从业人员'
@ -111,10 +119,18 @@ const open = (row = {}, type = 'add') => {
}
const save = () => {
const params = { ...formData.value }
const fieldsToSplit = ['sfzzm', 'sfzfm', 'tjbg', 'fzjlzm'];
fieldsToSplit.forEach(field => {
params[field] = params[field]
? params[field].join(',')
: '';
});
FormRef.value.submit(() => {
loading.value = true;
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
qcckPost(formData.value, url).then(() => {
qcckPost(params, url).then(() => {
loading.value = false;
proxy.$message.success("保存成功");
emits("refresh");

View File

@ -73,7 +73,7 @@ const searchConfiger = ref([
]);
const pageData = reactive({
tableData: [{}],
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
@ -120,7 +120,7 @@ const getList = async () => {
const res = await qcckPost({
...pageData.pageConfiger,
...queryFrom.value,
sfcjpx: 0
sfxxpx: '01'
}, `/mosty-base/baxx/pxry/page`)
if(res) {
@ -139,7 +139,7 @@ const handleSubmitTraining = async (row) => {
try {
await qcckPost({
...row,
sfcjpx: 1
sfxxpx: '02'
}, "/mosty-base/baxx/pxry/edit")
proxy.$modal.msgSuccess("提交培训成功");
await getList();

View File

@ -73,7 +73,7 @@ const pageData = reactive({
total: 0,
tableHeight: 300,
pageConfiger: {
sfcjpx: 1,
sfxxpx: '02',
pageSize: 10,
pageCurrent: 1
},