lcw
This commit is contained in:
@ -182,7 +182,17 @@ export const publicRoutes = [
|
||||
icon: "personnel"
|
||||
}
|
||||
},
|
||||
{
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/njxx",
|
||||
name: "njxx",
|
||||
meta: {
|
||||
title: "年检信息",
|
||||
icon: "personnel"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/training/annualInspectionTraining",
|
||||
name: "annualInspectionTraining",
|
||||
component: () => import("@/views/Training/AnnualInspectionTraining/index"),
|
||||
@ -211,255 +221,255 @@ export const publicRoutes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/systemConfig",
|
||||
name: "systemConfigModel",
|
||||
meta: {
|
||||
title: "系统管理",
|
||||
icon: "personnel"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/user/department-ist",
|
||||
name: "departmentList",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/department-list/index"
|
||||
),
|
||||
meta: {
|
||||
title: "部门管理",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/userList",
|
||||
name: "userList",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/user-list/index"),
|
||||
meta: {
|
||||
title: "用户管理",
|
||||
icon: "role"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/role",
|
||||
name: "userRoleIndex",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/role-list/index"),
|
||||
meta: {
|
||||
title: "角色列表",
|
||||
icon: "role"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/menuList",
|
||||
name: "menuList",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
|
||||
meta: {
|
||||
title: "菜单管理",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/publicSecurity",
|
||||
name: "publicSecurity",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/publicSecurity/index"
|
||||
),
|
||||
meta: {
|
||||
title: "公安机关要素",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/dict/detail",
|
||||
name: "dictDetail",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
meta: {
|
||||
title: "字典数据"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/dict/index",
|
||||
name: "dictIndex",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
meta: {
|
||||
title: "字典列表",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/job",
|
||||
name: "userJob",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/job-list/index"),
|
||||
meta: {
|
||||
title: "岗位列表",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/deptAllocationUser/:id",
|
||||
name: "deptAllocationUser",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "管理用户"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/allocationUser/:id",
|
||||
name: "allocationUser",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/role-list/allocationUser"
|
||||
),
|
||||
meta: {
|
||||
title: "分配用户"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/sys/systemFxMx",
|
||||
name: "systemFxMx",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/systemFxMx/index"),
|
||||
meta: {
|
||||
title: "系统分析模型",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: "/sys/ysjq",
|
||||
// name: "ysjq",
|
||||
// component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"),
|
||||
// meta: {
|
||||
// title: "演示警情",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: "/user/systemConfig",
|
||||
name: "systemConfig",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/system-config-list/index"
|
||||
),
|
||||
meta: {
|
||||
title: "系统配置",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: "/systemConfig",
|
||||
// name: "systemConfigModel",
|
||||
// meta: {
|
||||
// title: "系统管理",
|
||||
// icon: "personnel"
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "/user/department-ist",
|
||||
// name: "departmentList",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/department-list/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "部门管理",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/userList",
|
||||
// name: "userList",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/user-list/index"),
|
||||
// meta: {
|
||||
// title: "用户管理",
|
||||
// icon: "role"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/role",
|
||||
// name: "userRoleIndex",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/role-list/index"),
|
||||
// meta: {
|
||||
// title: "角色列表",
|
||||
// icon: "role"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/menuList",
|
||||
// name: "menuList",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/menu-list/index"),
|
||||
// meta: {
|
||||
// title: "菜单管理",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/publicSecurity",
|
||||
// name: "publicSecurity",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/publicSecurity/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "公安机关要素",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/dict/detail",
|
||||
// name: "dictDetail",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/dict/detail"),
|
||||
// meta: {
|
||||
// title: "字典数据"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/dict/index",
|
||||
// name: "dictIndex",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/dict/index"),
|
||||
// meta: {
|
||||
// title: "字典列表",
|
||||
// icon: "article-ranking"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/job",
|
||||
// name: "userJob",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/job-list/index"),
|
||||
// meta: {
|
||||
// title: "岗位列表",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/deptAllocationUser/:id",
|
||||
// name: "deptAllocationUser",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/department-list/deptAllocationUser"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "管理用户"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/allocationUser/:id",
|
||||
// name: "allocationUser",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/role-list/allocationUser"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "分配用户"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/sys/systemFxMx",
|
||||
// name: "systemFxMx",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/systemFxMx/index"),
|
||||
// meta: {
|
||||
// title: "系统分析模型",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// // {
|
||||
// // path: "/sys/ysjq",
|
||||
// // name: "ysjq",
|
||||
// // component: () => import("@/views/backOfficeSystem/systemConfig/ysjq/index"),
|
||||
// // meta: {
|
||||
// // title: "演示警情",
|
||||
// // icon: "personnel-manage"
|
||||
// // }
|
||||
// // },
|
||||
// {
|
||||
// path: "/user/systemConfig",
|
||||
// name: "systemConfig",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/system-config-list/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "系统配置",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
path: "/user/systemVersion",
|
||||
name: "systemVersion",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/system-version-list/index"
|
||||
),
|
||||
meta: {
|
||||
title: "系统版本管理",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/useQk",
|
||||
name: "useQk",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/useQk/index"),
|
||||
meta: {
|
||||
title: "系统使用情况",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/zdqyFz",
|
||||
name: "zdqyFz",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/zdqyFz/index"),
|
||||
meta: {
|
||||
title: "重点区域分值",
|
||||
icon: "personnel-manage"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: "/user/systemVersion",
|
||||
// name: "systemVersion",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/system-version-list/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "系统版本管理",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/useQk",
|
||||
// name: "useQk",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/useQk/index"),
|
||||
// meta: {
|
||||
// title: "系统使用情况",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/zdqyFz",
|
||||
// name: "zdqyFz",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/zdqyFz/index"),
|
||||
// meta: {
|
||||
// title: "重点区域分值",
|
||||
// icon: "personnel-manage"
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
path: "/user/log",
|
||||
name: "/user/log",
|
||||
meta: {
|
||||
title: "日志",
|
||||
icon: "article"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/user/operateLog",
|
||||
name: "/user/operateLog",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index"
|
||||
),
|
||||
meta: {
|
||||
title: "操作日志",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/user/loginLog",
|
||||
name: "/user/loginLog",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index"
|
||||
),
|
||||
meta: {
|
||||
title: "登录日志",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/developer",
|
||||
name: "developer",
|
||||
component: () => import("@/views/developer/index"),
|
||||
meta: {
|
||||
title: "开发者中心",
|
||||
icon: "article-ranking"
|
||||
}
|
||||
},
|
||||
{
|
||||
//如果三级 需要把路由注册出来
|
||||
path: "/user/operateLog",
|
||||
name: "/user/operateLog",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index"
|
||||
)
|
||||
},
|
||||
{
|
||||
path: "/user/loginLog",
|
||||
name: "/user/loginLog",
|
||||
component: () =>
|
||||
import(
|
||||
"@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index"
|
||||
)
|
||||
},
|
||||
{
|
||||
path: "/tool/gen-edit/index/:tableId",
|
||||
name: "gen-edit",
|
||||
component: () =>
|
||||
import("@/views/backOfficeSystem/systemConfig/gen/editTable"),
|
||||
meta: {
|
||||
title: "代码生成编辑"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: "/user/log",
|
||||
// name: "/user/log",
|
||||
// meta: {
|
||||
// title: "日志",
|
||||
// icon: "article"
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: "/user/operateLog",
|
||||
// name: "/user/operateLog",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "操作日志",
|
||||
// icon: "article-ranking"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: "/user/loginLog",
|
||||
// name: "/user/loginLog",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index"
|
||||
// ),
|
||||
// meta: {
|
||||
// title: "登录日志",
|
||||
// icon: "article-ranking"
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: "/developer",
|
||||
// name: "developer",
|
||||
// component: () => import("@/views/developer/index"),
|
||||
// meta: {
|
||||
// title: "开发者中心",
|
||||
// icon: "article-ranking"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// //如果三级 需要把路由注册出来
|
||||
// path: "/user/operateLog",
|
||||
// name: "/user/operateLog",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/log-manage/operateLog/index"
|
||||
// )
|
||||
// },
|
||||
// {
|
||||
// path: "/user/loginLog",
|
||||
// name: "/user/loginLog",
|
||||
// component: () =>
|
||||
// import(
|
||||
// "@/views/backOfficeSystem/systemConfig/log-manage/loginLog/index"
|
||||
// )
|
||||
// },
|
||||
// {
|
||||
// path: "/tool/gen-edit/index/:tableId",
|
||||
// name: "gen-edit",
|
||||
// component: () =>
|
||||
// import("@/views/backOfficeSystem/systemConfig/gen/editTable"),
|
||||
// meta: {
|
||||
// title: "代码生成编辑"
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: "/basicsmanage",
|
||||
// name: "/basicsmanage",
|
||||
|
||||
@ -3,25 +3,23 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useRouter,useRoute } from "vue-router";
|
||||
import {
|
||||
setItem,
|
||||
getItem,
|
||||
removeItem
|
||||
} from "@/utils/storage";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { setItem, getItem, removeItem } from "@/utils/storage";
|
||||
const loginDialog = ref(false);
|
||||
const deptList = ref([]);
|
||||
const url = ref("/");
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
function redirectAuth() {
|
||||
// 从路由参数中获取token
|
||||
const route = useRoute();
|
||||
let token = route.query.token || null;
|
||||
url.value = route.query.url || "/";
|
||||
|
||||
if (token != null) {
|
||||
token = token.replace(/\ +/g, "");
|
||||
setItem("SSOTOKEN", token)
|
||||
handleLogin({ token: token});
|
||||
setItem("SSOTOKEN", token);
|
||||
handleLogin({ token: token });
|
||||
} else {
|
||||
window.location.href = `http://155.240.22.188:9020`;
|
||||
}
|
||||
@ -29,14 +27,9 @@ function redirectAuth() {
|
||||
|
||||
const handleLogin = (e) => {
|
||||
store.dispatch("user/oatuhLogin", e).then((res) => {
|
||||
const FounderUrl = getItem("FounderUrl") || '/';
|
||||
console.log(FounderUrl,"FounderUrl");
|
||||
|
||||
// 登录后操作
|
||||
if (res.deptList.length === 1) {
|
||||
// window.location.href = FounderUrl
|
||||
removeItem("FounderUrl");
|
||||
router.push(FounderUrl);
|
||||
router.push(url.value);
|
||||
} else {
|
||||
deptList.value = [...res.deptList];
|
||||
loginDialog.value = true;
|
||||
|
||||
@ -56,6 +56,12 @@ const rules = {
|
||||
const open = (row = {}, type = 'updata') => {
|
||||
visible.value = true
|
||||
disabled.value = false
|
||||
|
||||
const fieldsToSplit = ['kszp'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string' ? row[field].split(',') : [];
|
||||
});
|
||||
|
||||
formData.value = { ...row }
|
||||
if (type === 'updata') {
|
||||
title.value = '上传成绩'
|
||||
@ -71,11 +77,14 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
let params = { ...formData.value }
|
||||
params.kszp = params.kszp ? params.kszp.join(','):''
|
||||
|
||||
try {
|
||||
loading.value = true
|
||||
await FormRef.value.submit(async () => {
|
||||
const { pxryid = "" } = formData.value
|
||||
await qcckPost({ ...formData.value, pxryid }, `mosty/base/baxx/pxry/lrcj`)
|
||||
const { pxryid = "" } = params
|
||||
await qcckPost({ ...params, pxryid }, `mosty/base/baxx/pxry/lrcj`)
|
||||
proxy.$message.success('上传成绩成功')
|
||||
emits('refresh')
|
||||
visible.value = false
|
||||
|
||||
@ -64,7 +64,7 @@ const searchConfiger = ref([
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [{}],
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
|
||||
@ -9,9 +9,9 @@
|
||||
</div>
|
||||
<div class="cntinfo">
|
||||
<FormMessage ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" :labelWidth='120'>
|
||||
<!-- <template #xtCjsj>
|
||||
<el-input v-model="formData.xtCjsj" placeholder="请输入申请时间" />
|
||||
</template> -->
|
||||
<template #sqrq>
|
||||
<el-date-picker type="datetime" v-model="formData.sqrq" placeholder="请输入申请时间" />
|
||||
</template>
|
||||
</FormMessage>
|
||||
</div>
|
||||
</div>
|
||||
@ -60,7 +60,7 @@ const formList = reactive([
|
||||
],
|
||||
[
|
||||
{ label: "居住地址", prop: "jzdz", type: "input" },
|
||||
{ label: "申请时间", prop: "xtCjsj", type: "date" },
|
||||
{ label: "申请时间", prop: "sqrq", type: "slot" },
|
||||
{ label: "岗位", prop: "gw", type: "select", options: D_BAXX_GWLX },
|
||||
],
|
||||
[
|
||||
@ -131,6 +131,14 @@ const close = () => {
|
||||
const open = (row = {}, type = 'add') => {
|
||||
disabled.value = false
|
||||
dialogVisible.value = true
|
||||
|
||||
const fieldsToSplit = ['ryzpzm', 'ryzpfm', 'tjbg', 'wfzzmjl'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string'
|
||||
? row[field].split(',')
|
||||
: row[field];
|
||||
});
|
||||
|
||||
formData.value = { ...row }
|
||||
if (type === 'add') {
|
||||
title.value = '新增申请人员'
|
||||
@ -146,8 +154,17 @@ const open = (row = {}, type = 'add') => {
|
||||
const save = () => {
|
||||
FormRef.value.submit(() => {
|
||||
loading.value = true;
|
||||
const url = !formData.value?.id ? `/bagl/mosty-base/baxx/basq/add` : `/bagl/mosty-base/baxx/basq/edit`;
|
||||
qcckPost(formData.value, url).then(() => {
|
||||
const url = !formData.value?.id ? `/mosty-base/baxx/basq/add` : `/mosty-base/baxx/basq/edit`;
|
||||
|
||||
const params = { ...formData.value }
|
||||
const fieldsToSplit = ['ryzpzm', 'ryzpfm', 'tjbg', 'wfzzmjl'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
params[field] = params[field]
|
||||
? params[field].join(',')
|
||||
: '';
|
||||
});
|
||||
|
||||
qcckPost(params, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
emits("refresh");
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<el-dialog class="dialogWerapper" width="30%" v-model="modelValue" :title="title" @close="handleClose">
|
||||
<form-message ref="FormRef" :disabled="disabled" v-model="formData" :rules="rules" :formList="formList" />
|
||||
|
||||
<template #footer>
|
||||
<el-button type="primary" v-if="!disabled" :loading="loading" @click="handleSubmit">确定</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, reactive, getCurrentInstance } from 'vue';
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BAXX_DWLX } = proxy.$dict("D_BAXX_DWLX")
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'refresh'])
|
||||
|
||||
const visible = computed({
|
||||
get() {
|
||||
return props.modelValue
|
||||
},
|
||||
set(val) {
|
||||
emits('update:modelValue', val)
|
||||
}
|
||||
})
|
||||
|
||||
const title = ref('上传资料')
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const FormRef = ref(null)
|
||||
const formData = ref({})
|
||||
|
||||
const formList = reactive([
|
||||
[
|
||||
{ label: "上传资料", prop: "zl", type: "upload", limit: 3 },
|
||||
],
|
||||
])
|
||||
|
||||
const rules = {
|
||||
zl: [{ required: true, message: "请上传资料", trigger: "change" }],
|
||||
}
|
||||
|
||||
const open = (row = {}, type = 'updata') => {
|
||||
visible.value = true
|
||||
disabled.value = false
|
||||
formData.value = { ...row }
|
||||
}
|
||||
|
||||
const handleClose = () => {
|
||||
FormRef.value?.reset()
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
await FormRef.value.submit(async () => {
|
||||
await qcckPost({ ...formData.value }, `/mosty-base/baxx/basq/edit`)
|
||||
proxy.$message.success('上传资料成功')
|
||||
emits('refresh')
|
||||
visible.value = false
|
||||
})
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
proxy.$message.error('上传资料失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@ -81,7 +81,7 @@ const searchConfiger = ref([
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [{}],
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
@ -99,7 +99,7 @@ const pageData = reactive({
|
||||
{ label: "证件号码", prop: "zjhm" },
|
||||
{ label: "联系方式", prop: "lxdh" },
|
||||
{ label: "岗位", prop: "gw", showSolt: true },
|
||||
{ label: "申请时间", prop: "xtCjsj" },
|
||||
{ label: "申请时间", prop: "sqrq" },
|
||||
{ label: "是否上传资料", prop: "pxgs", showSolt: true },
|
||||
{ label: "是否线上培训", prop: "sfpx", showSolt: true },
|
||||
]
|
||||
|
||||
@ -89,8 +89,14 @@ const close = () => {
|
||||
const open = (row = {}, type = 'add') => {
|
||||
dialogVisible.value = true
|
||||
disabled.value = false
|
||||
row.tp = row.tp ? row.tp.split(','):[]
|
||||
row.bazzp = row.bazzp ? row.bazzp.split(','):[]
|
||||
|
||||
const fieldsToSplit = ['tp', 'bazzp'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string'
|
||||
? row[field].split(',')
|
||||
: row[field];
|
||||
});
|
||||
|
||||
formData.value = { ...row }
|
||||
if (type === 'add') {
|
||||
title.value = '新增从业人员'
|
||||
|
||||
@ -65,9 +65,8 @@ const searchConfiger = ref([
|
||||
{
|
||||
label: "所属保安公司",
|
||||
prop: "ssbags",
|
||||
placeholder: "请选择所属保安公司",
|
||||
showType: "select",
|
||||
options: D_BAXX_DWLX
|
||||
placeholder: "请输入所属保安公司",
|
||||
showType: "input",
|
||||
},
|
||||
{
|
||||
label: "提交日期",
|
||||
@ -87,7 +86,7 @@ const pageData = reactive({
|
||||
},
|
||||
total: 0,
|
||||
pageConfiger: {
|
||||
sfcjpx: 1, // 是否参加培训
|
||||
sfxxpx: '02', // 是否参加培训
|
||||
pageSize: 20,
|
||||
pageCurrent: 1
|
||||
},
|
||||
|
||||
@ -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 ? `/bagl/mosty-base/baxx/cyry/add` : `/bagl/mosty-base/baxx/cyry/edit`;
|
||||
qcckPost(formData.value, url).then(() => {
|
||||
const url = !formData.value?.id ? `/mosty-base/baxx/cyry/add` : `/mosty-base/baxx/cyry/edit`;
|
||||
qcckPost(params, url).then(() => {
|
||||
loading.value = false;
|
||||
proxy.$message.success("保存成功");
|
||||
emits("refresh");
|
||||
|
||||
@ -73,7 +73,7 @@ const searchConfiger = ref([
|
||||
]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [{}],
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
@ -120,8 +120,8 @@ const getList = async () => {
|
||||
const res = await qcckPost({
|
||||
...pageData.pageConfiger,
|
||||
...queryFrom.value,
|
||||
sfcjpx: 0
|
||||
}, `/bagl/mosty-base/baxx/pxry/page`)
|
||||
sfxxpx: '01'
|
||||
}, `/mosty-base/baxx/pxry/page`)
|
||||
|
||||
if(res) {
|
||||
pageData.tableData = res.records || [];
|
||||
@ -139,8 +139,8 @@ const handleSubmitTraining = async (row) => {
|
||||
try {
|
||||
await qcckPost({
|
||||
...row,
|
||||
sfcjpx: 1
|
||||
}, "/bagl/mosty-base/baxx/pxry/edit")
|
||||
sfxxpx: '02'
|
||||
}, "/mosty-base/baxx/pxry/edit")
|
||||
proxy.$modal.msgSuccess("提交培训成功");
|
||||
await getList();
|
||||
} catch (error) {
|
||||
|
||||
@ -73,7 +73,7 @@ const pageData = reactive({
|
||||
total: 0,
|
||||
tableHeight: 300,
|
||||
pageConfiger: {
|
||||
sfcjpx: 1,
|
||||
sfxxpx: '02',
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
},
|
||||
|
||||
@ -114,6 +114,15 @@ const close = () => {
|
||||
const open = (row = {}, type = 'add') => {
|
||||
disabled.value = false
|
||||
dialogVisible.value = true
|
||||
|
||||
// 统一处理所有需拆分的字段
|
||||
const fieldsToSplit = ['cszp', 'frSfzZm', 'frSfzFm', 'fzrSfzZm', 'fzrSfzFm', 'yyzzzp', 'jyxkz'];
|
||||
fieldsToSplit.forEach(field => {
|
||||
row[field] = typeof row[field] === 'string'
|
||||
? row[field].split(',')
|
||||
: row[field];
|
||||
});
|
||||
|
||||
formData.value = { ...row }
|
||||
if (type === 'view') {
|
||||
title.value = '查看详情'
|
||||
|
||||
@ -44,7 +44,7 @@ const detailsRef = ref(null);
|
||||
const D_BZ_BXDLX = ref([]);
|
||||
|
||||
const pageData = reactive({
|
||||
tableData: [{}],
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
|
||||
Reference in New Issue
Block a user