JayChou 2 weeks ago
commit 4569477128
  1. 3
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java
  2. 4
      jeecgboot-vue3/.env.development
  3. BIN
      jeecgboot-vue3/src/assets/images/mainHome/aa.png
  4. BIN
      jeecgboot-vue3/src/assets/images/mainHome/declare.png
  5. BIN
      jeecgboot-vue3/src/assets/images/mainHome/h.png
  6. BIN
      jeecgboot-vue3/src/assets/images/mainHome/process.png
  7. 26
      jeecgboot-vue3/src/router/helper/mainOut.ts
  8. 250
      jeecgboot-vue3/src/views/demo/main-home/components/instrumentInfo/index.vue
  9. 198
      jeecgboot-vue3/src/views/demo/main-home/components/projectDeclaration/index.vue
  10. 5
      jeecgboot-vue3/src/views/demo/main-home/index.vue
  11. 87
      jeecgboot-vue3/src/views/expert/adminback/Expert.api.ts
  12. 84
      jeecgboot-vue3/src/views/expert/adminback/Expert.data.ts
  13. 305
      jeecgboot-vue3/src/views/expert/adminback/ExpertList.vue
  14. 26
      jeecgboot-vue3/src/views/expert/adminback/V20240926_1__menu_insert_Expert.sql
  15. 26
      jeecgboot-vue3/src/views/expert/adminback/V20240929_1__menu_insert_Expert.sql
  16. 26
      jeecgboot-vue3/src/views/expert/adminback/V20240930_1__menu_insert_Expert.sql
  17. 189
      jeecgboot-vue3/src/views/expert/adminback/components/ExpertForm.vue
  18. 77
      jeecgboot-vue3/src/views/expert/adminback/components/ExpertModal.vue
  19. 5
      jeecgboot-vue3/src/views/instrument/InstrumentList2.vue
  20. 2
      jeecgboot-vue3/vite.config.ts
  21. 5
      package.json

@ -390,8 +390,7 @@ public class InstrumentController extends JeecgController<Instrument, IInstrumen
if(instrument.getFlag().equals("1")){ if(instrument.getFlag().equals("1")){
instrument.setState("2"); instrument.setState("2");
instrument.setFlag("2"); instrument.setFlag("2");
} }else if(instrument.getFlag().equals("2")&&instrument.getState().equals("2")){
if(instrument.getFlag().equals("2")&&instrument.getState().equals("2")){
instrument.setState("3"); instrument.setState("3");
} }
//instrument.setFlag("2"); //instrument.setFlag("2");

@ -6,10 +6,10 @@ VITE_PUBLIC_PATH = /
# 跨域代理,您可以配置多个 ,请注意,没有换行符 # 跨域代理,您可以配置多个 ,请注意,没有换行符
VITE_PROXY = [["/jeecgboot","http://localhost:18086/jeecg-boot"],["/upload","http://localhost:3300/upload"]] VITE_PROXY = [["/jeecgboot","http://10.121.2.107:18086/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
#后台接口全路径地址(必填) #后台接口全路径地址(必填)
VITE_GLOB_DOMAIN_URL=http://localhost:18086/jeecg-boot VITE_GLOB_DOMAIN_URL=http://10.121.2.107:18086/jeecg-boot
#后台接口父地址(必填) #后台接口父地址(必填)
VITE_GLOB_API_URL=/jeecgboot VITE_GLOB_API_URL=/jeecgboot

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

@ -35,6 +35,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '首页', title: '首页',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -44,6 +46,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '仪器共享', title: '仪器共享',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -53,6 +57,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '项目申报', title: '项目申报',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -62,6 +68,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '专家管理', title: '专家管理',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -71,6 +79,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '新闻列表', title: '新闻列表',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -80,6 +90,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '新闻详情', title: '新闻详情',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -89,6 +101,8 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '栏目管理', title: '栏目管理',
ignoreAuth: true, ignoreAuth: true,
hidden: false
}, },
}, },
{ {
@ -98,6 +112,18 @@ export const mainOutRoutes: AppRouteModule[] = [
meta: { meta: {
title: '文章管理', title: '文章管理',
ignoreAuth: true, ignoreAuth: true,
hidden: false
},
},
{
path: '/main-home/instrumentInfo',
name: 'InstrumentInfo',
component: () => import('/@/views/demo/main-home/components/instrumentInfo/index.vue'),
meta: {
title: '',
ignoreAuth: true,
hidden:true
}, },
}, },
{ {

@ -0,0 +1,250 @@
<template>
<div class="container">
<div class="small">
<ul>
<li>首页</li>
<li>|</li>
<li>仪器共享</li>
<li>|</li>
<li>科研校园</li>
</ul>
</div>
<div class="header">
<div class="headerLeft">
<img src="@/assets/images/mainHome/aa.png" alt="">
</div>
<div class="headerRight">
<h3>组合型四级杆轨道离子阱质谱仪 Q Exactive Plus Hybrid <br>Quadrupole-Orbitrap Mass<br>Spectrometer</h3>
<div class="b">
<div class="bb">
<p>状态<br>型号<br>仪器分类<br>生产厂商<br>仪器类别</p>
</div>
<div class="bbb">-<br>Q Exactive Plus<br>分析仪器-质谱仪器-有机质谱仪器<br>杭州成功仪器质量高高科技有限公司<br>专用</div>
</div>
<div class="bbbb">
<div class="bbbbb">所在地点&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp*&nbsp黄淮国际教育学院实验室</div>
<button>立即预约</button>
</div>
</div>
</div>
<div class="center">
<div class="box1">技术指标</div>
<div class="box2">
1&nbsp离子源<br>1.1&nbsp配有独立的电喷雾式离子源(ESI)大气压化学离子源(APCI)<br>1.2&nbsp插拔式可互换ESI及APCI喷针无需任何工具可实现ESI源及APCI源快速更换<br>1.3&nbspESI&nbsp流速范围确保敏捷度不损失的前提下无需分流流速可达到2.5mL/min以上<br>1.4&nbsp离子源温度离子源内两路加热雾化气辅助加热器温度不低于700该最大温度可以在软件<br>界面下设置并运行
</div>
<div class="box1">2&nbsp离子源接口及传输系统</div>
<div class="box2">
2.1&nbsp离子传输通道(Q0)采用锥孔结构和饭吹气技术无毛细管类设计装置不会堵塞且能有效防止<br>生物样本中中性分子与不发挥缓冲盐由于真空压力梯度进入四级杆终身不必更换锥孔节约清洗离<br>子传输通道的毛细管类组件的费用<br>2.2&nbsp离子传输系统拥有高压离子聚焦技术压力至少达7.5mtorr,确保最佳的离子聚焦效果和离子传输<br>效率有效去除记忆效应交叉感染
</div>
<div class="box1">主要功能</div>
<div class="box2">
基于液相色谱-质谱联用技术以液相色谱作为分离系统质谱作为监测系统与配套的检测试剂共同使用在临床上用于对来源于人体样本<br>(如全血血浆血清尿液样本)中的内源性物质和外源性物质(如维生素激素)进行定性或定量检测<br>
服务内容<br>有机化合物成分定量分析(如内源性代谢产物药代动力学毒物分析等)血样组织细胞等的靶向代谢组学和靶向脂质分析成分分离分<br>方法开发等
</div>
<div class="box1">用户须知</div>
<div class="box2">预约时间为周一至周五上午8:00-12:00,下午2:30(3:00)-5:30(6:00)</div>
<div class="box1">参考收费标准</div>
<div class="box2">协议收费</div>
</div>
<div class="btn">
<div class="btnTop">
<h3>留言交流</h3>
<button>我要留言</button>
</div>
<div class="btnBtn">
<div class="left">
<div class="box">
<img width="90px" src="@/assets/images/mainHome/h.png" alt="">
</div>
游客123456
</div>
<div class="right">
<p>什么时候仪器空闲</p>
<p>麻烦联系123456789谢谢</p>
<div class="time">发布时间2024.10.16&nbsp&nbsp17:26</div>
</div>
</div>
<div class="btnBtn">
<div class="left">
<div class="box">
<img width="90px" src="@/assets/images/mainHome/h.png" alt="">
</div>
游客123456
</div>
<div class="right">
<p>什么时候仪器空闲</p>
<p>麻烦联系123456789谢谢</p>
<div class="time">发布时间2024.10.16&nbsp&nbsp17:26</div>
</div>
</div>
<div class="btnBtn">
<div class="left">
<div class="box">
<img width="90px" src="@/assets/images/mainHome/h.png" alt="">
</div>
游客123456
</div>
<div class="right">
<p>什么时候仪器空闲</p>
<p>麻烦联系123456789谢谢</p>
<div class="time">发布时间2024.10.16&nbsp&nbsp17:26</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
</script>
<style lang="less" scoped>
.container {
width: 1200px;
margin: 0 auto;
margin-top: 5px;
.small {
height: 35px;
line-height: 35px;
font-size: 11px;
}
.small li {
display: inline-block;
padding: 0 10px;
}
.header {
width: 100%;
height: 450px;
background-color: #ffffff;
display: flex;
justify-content: space-between;
padding: 60px 45px;
.headerLeft {
width: 310px;
background-color: #f3f6fb;
}
.headerRight {
width: 750px;
}
.headerRight h3 {
font-weight: 900;
font-size: 23px;
color: #333333;
}
.b {
margin-top: 20px;
width: 380px;
height: 160px;
display: flex;
justify-content: space-between;
color: #3f3f3f;
border: none;
}
.bb {
width: 80px;
}
.bbb {
width: 290px;
}
.bbbb {
width: 600px;
display: flex;
justify-content: space-between;
}
.bbbbb {
color: #7e7e7e;
}
button {
width: 170px;
height: 40px;
background-color: #002e97;
right: 30px;
color: #ffffff;
border-radius: 0.3cap;
font-size: 14px;
}
}
.center {
width: 100%;
height: 1050px;
background-color: #ffffff;
padding: 50px;
border-top: #ebebeb 1px solid;
border-bottom: #ebebeb 1px solid;
}
.box1 {
font-weight: 900;
color: #000000;
margin-bottom: 40px;
}
.box2 {
color: #1e1e1e;
margin-bottom: 40px;
}
.btn {
height: 500px;
padding: 20px 0px 10px 30px;
.btnTop{
display: flex;
justify-content: space-between;
margin-bottom: 25px;
h3{
font-weight: 900;
font-size: 19px;
color: #000000;
}
button {
width: 170px;
height: 40px;
background-color: #002e97;
right: 30px;
color: #ffffff;
border-radius: 0.4cap;
font-size: 14px;
font-weight: 300;
}
}
}
.btnBtn{
height: 110px;
width: 1170px;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
.left{
width: 100px;
}
.right{
position: relative;
width: 1000px;
height: 110px;
background-color: #ffffff;
padding: 10px 10px 10px 30px;
.time{
position: absolute;
right: 20px;
bottom: 10px;
color: #b2b2b2;
}
}
}
}
</style>

@ -1,52 +1,178 @@
<template> <template>
<div class="container"> <div class="container">
<div class="top-filter"> <div class="top-filter">
<div :class="activeIndex === index ? 'active item' : 'item'" @click="activeIndex = index" class="item " v-for="(item, index) in filterList" :key="index" <div :class="activeIndex === index ? 'active item' : 'item'" @click="activeIndex = index" class="item "
><component :is="item.icon"></component><div style="margin-left: 10px">{{ item.label }}</div></div v-for="(item, index) in filterList" :key="index">
> <component :is="item.icon"></component>
<div style="margin-left: 10px">{{ item.label }}</div>
</div>
</div>
<div class="mainTop">
<div class="resultShow">
<div class="top">
<div class="a">结果公示</div>
<div class="aa">更多</div>
</div>
<div class="buttom">
<ul>
<li>浙江省科学技术厅2023年度浙江省科学技术奖提名受理情况公示</li>
<li>浙江省科学技术厅关于绍兴黄酒重大科技项目立项</li>
<li>浙江省科学技术厅关于拟下达2024年浙江省中央引导地方科技发展资金...</li>
<li>关于浙江省人民政府重大委托课题确定中标对象的公示</li>
<li>省级部门2023年度预期尚未支付中小企业款项信息公开公示</li>
<li>浙江省科学技术厅关于2023年度省级新型研发机构拟认定名单的公示</li>
<li>浙江省科学技术厅关于2023年省级新产品试制计划(第二批)拟立项目...</li>
</ul>
</div>
</div>
<div class="userInto">
<h2>用户登录</h2>
<div class="more">个人登录</div>
<div class="more">法人登录</div>
<div class="more">主管部门登录</div>
<div class="more">省科技厅登录</div>
</div>
</div>
<div class="mainCenter">
<h2>项目申报流程</h2>
<img src="@/assets/images/mainHome/process.png" alt="">
</div>
<div class="mainCenter1">
<h2>计划项目及申报流程示意图</h2>
<img src="@/assets/images/mainHome/declare.png" alt="">
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import { PartitionOutlined, DollarCircleOutlined } from '@ant-design/icons-vue'; import { PartitionOutlined, DollarCircleOutlined } from '@ant-design/icons-vue';
const activeIndex = ref(0); const activeIndex = ref(0);
const filterList = ref([ const filterList = ref([
{ label: '科技省厅', icon: PartitionOutlined }, { label: '科技省厅', icon: PartitionOutlined },
{ label: '管理制度', icon: DollarCircleOutlined }, { label: '管理制度', icon: DollarCircleOutlined },
{ label: '申报项目', icon: DollarCircleOutlined }, { label: '申报项目', icon: DollarCircleOutlined },
{ label: '项目受理', icon: DollarCircleOutlined }, { label: '项目受理', icon: DollarCircleOutlined },
{ label: '立项信息', icon: DollarCircleOutlined }, { label: '立项信息', icon: DollarCircleOutlined },
{ label: '验收情况', icon: DollarCircleOutlined }, { label: '验收情况', icon: DollarCircleOutlined },
{ label: '创新券', icon: DollarCircleOutlined }, { label: '创新券', icon: DollarCircleOutlined },
]); ]);
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.container { .container {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
margin-top: 20px; margin-top: 20px;
.top-filter {
.top-filter {
display: flex;
justify-content: space-between;
.item {
display: flex;
justify-content: center;
width: 167px;
height: 70px;
text-align: center;
line-height: 70px;
cursor: pointer;
border-radius: 8px;
box-shadow: 1px 0px 9px 0px rgba(100, 100, 111, 0.1);
}
.active {
color: #fff;
background-color: #002e97;
}
}
}
.mainTop {
width: 1200px;
height: 315px;
margin: 25px auto;
margin-top: 40px;
display: flex;
justify-content: space-between;
.resultShow {
height: 100%;
width: 770px;
.top{
height: 40px;
line-height: 40PX;
padding: 0 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.item { border-bottom: 1px solid #dbdcdd;
display: flex; }
justify-content: center; .buttom{
margin:10px 0 0 25px ;
width: 167px;
height: 70px;
text-align: center;
line-height: 70px;
cursor: pointer;
border-radius: 8px;
box-shadow: 1px 0px 9px 0px rgba(100, 100, 111, 0.1);
}
.active {
color: #fff;
background-color: #002e97;
}
} }
.buttom ul li{
padding: 5px 0 ;
list-style-type:disc;
}
}
.userInto {
height: 100%;
width: 350px;
background-color: #ffffff;
border-radius: 1.5cap;
h2 {
margin-top: 20px;
font-weight: 900;
text-align: center;
}
.more {
text-align: center;
width: 240px;
height: 40px;
line-height: 40px;
background-color: #0763e4;
color: #e3ebf8;
border-radius: 1cap;
margin: 15px 58px;
}
}
}
.mainCenter{
width: 1200px;
height: 350px;
background-color: #fff;
text-align: center;
padding-top:30px ;
h2{
font-weight: 900;
font-size: 30px;
color: #333333;
}
img{
width: 900px;
}
}
.mainCenter1{
width: 1200px;
height: 800px;
background-color: #f3f6fb;
text-align: center;
padding-top: 50px;
h2 {
font-weight: 900;
font-size: 30px;
color: #333333;
margin-bottom: 30px;
}
img {
width: 1100px;
} }
}
</style> </style>

@ -36,7 +36,7 @@
<div class="shortcut"> <div class="shortcut">
<div class="wrapper"> <div class="wrapper">
<ul> <ul>
<li :class="activeIndex === index ? 'active' : ''" @click="goTo(item,index)" v-for="(item, index) in mainOutRoutes[1].children" :key="index">{{ item.meta.title }}</li> <li :class="activeIndex === index ? 'active' : ''" @click="goTo(item,index)" v-for="(item, index) in navList" :key="index">{{ item.meta.title }}</li>
<!-- <li>仪器共享</li> <!-- <li>仪器共享</li>
<li>项目申报</li> <li>项目申报</li>
<li>专家管理</li> <li>专家管理</li>
@ -98,6 +98,9 @@
activeIndex.value = index; activeIndex.value = index;
router.push(item.path); router.push(item.path);
}; };
const navList = mainOutRoutes[1].children?.filter(item => !item.meta.hidden)
console.log(navList,'navList');
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -0,0 +1,87 @@
import { defHttp } from '/src/utils/http/axios';
import { useMessage } from "/src/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/expert/expert/listadmin',
save='/expert/expert/add',
edit='/expert/expert/edit',
deleteOne = '/expert/expert/delete',
deleteBatch = '/expert/expert/deleteBatch',
importExcel = '/expert/expert/importExcel',
exportXls = '/expert/expert/exportXls',
handleadminback = '/expert/expert/handleadminback',
handleadminup = '/expert/expert/handleadminup',
}
/**
* 导出api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* 导入api
*/
export const getImportUrl = Api.importExcel;
/**
* 列表接口
* @param params
*/
export const handleadminup = (params) => defHttp.get({ url: Api.handleadminup, params });
/**
* 管理员驳回
* @param params
*/
export const handleadminback = (params) => defHttp.get({ url: Api.handleadminback, params });
/**
* 管理员通过审核
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
/**
* 删除单个
* @param params
* @param handleSuccess
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
* 批量删除
* @param params
* @param handleSuccess
*/
export const batchDelete = (params, handleSuccess) => {
createConfirm({
iconType: 'warning',
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
* 保存或者更新
* @param params
* @param isUpdate
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

@ -0,0 +1,84 @@
import {BasicColumn} from '/src/components/Table';
import {FormSchema} from '/src/components/Table';
import { rules} from '/src/utils/helper/validator';
import { render } from '/src/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/src/utils';
//
export const columns: BasicColumn[] = [
{
title: '用户名',
align: "center",
dataIndex: 'seusername'
},
{
title: '毕业院校',
align: "center",
dataIndex: 'colleges'
},
{
title: '专业',
align: "center",
dataIndex: 'major'
},
{
title: '研究方向',
align: "center",
dataIndex: 'directioncal_dictText'
},
{
title: '研究类型',
align: "center",
dataIndex: 'research'
},
{
title: '学历',
align: "center",
dataIndex: 'educationcal'
},
{
title: '专家简介',
align: "center",
dataIndex: 'expinfo'
},
{
title: '部门审核',
align: "center",
dataIndex: 'compopen_dictText'
},
{
title: '管理员审核',
align: "center",
dataIndex: 'adminopen_dictText'
},
{
title: '是否完善信息',
align: "center",
dataIndex: 'isdone',
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
},
},
{
title: '专家状态',
align: "center",
dataIndex: 'expsture',
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
},
},
];
//
export const superQuerySchema = {
seusername: {title: '用户名',order: 0,view: 'text', type: 'string',},
colleges: {title: '毕业院校',order: 1,view: 'text', type: 'string',},
major: {title: '专业',order: 2,view: 'text', type: 'string',},
directioncal: {title: '研究方向',order: 3,view: 'text', type: 'string',},
research: {title: '研究类型',order: 4,view: 'text', type: 'string',},
educationcal: {title: '学历',order: 5,view: 'text', type: 'string',},
expinfo: {title: '专家简介',order: 6,view: 'text', type: 'string',},
compopen: {title: '部门审核',order: 7,view: 'switch', type: 'string',},
adminopen: {title: '管理员审核',order: 8,view: 'switch', type: 'string',},
};

@ -0,0 +1,305 @@
<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="seusername">
<template #label><span title="用户名">用户名</span></template>
<a-input placeholder="请输入用户名" v-model:value="queryParam.seusername" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="directioncal">
<template #label><span title="研究方向">研究方向</span></template>
<a-input placeholder="请输入研究方向" v-model:value="queryParam.directioncal" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="adminopen">
<template #label><span title="管理员审核">管理员审</span></template>
<j-select-multiple placeholder="请选择管理员审核" v-model:value="queryParam.adminopen" dictCode="examstures" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="research">
<template #label><span title="研究类型">研究类型</span></template>
<a-input placeholder="请输入研究类型" v-model:value="queryParam.research" allow-clear ></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
</a>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<ExpertModal ref="registerModal" @success="handleSuccess"></ExpertModal>
</div>
</template>
<script lang="ts" name="expert-expert" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/src/components/Table';
import { useListPage } from '/src/hooks/system/useListPage';
import { columns, superQuerySchema } from './Expert.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,handleadminup,handleadminback } from './Expert.api';
import { downloadFile } from '/src/utils/common/renderUtils';
import ExpertModal from './components/ExpertModal.vue'
import { useUserStore } from '/src/store/modules/user';
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import JSelectMultiple from '/src/components/Form/src/jeecg/components/JSelectMultiple.vue';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '专家管理',
api: list,
columns,
canResize:false,
useSearchForm: false,
actionColumn: {
width: 120,
fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
},
exportConfig: {
name: "专家管理",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
});
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const labelCol = reactive({
xs:24,
sm:4,
xl:6,
xxl:4
});
const wrapperCol = reactive({
xs: 24,
sm: 20,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 删除事件
*/
async function handlebackadmin(record) {
await handleadminback({ id: record.id }, handleSuccess);
}
/**
* 删除事件
*/
async function handleupadmin(record) {
await handleadminup({ id: record.id }, handleSuccess);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 操作栏
*/
function getTableAction(record) {
return [
{
label: '专家状态',
onClick: handleEdit.bind(null, record),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
}, {
label: '通过审核',
popConfirm: {
title: '是否通过审核',
confirm: handleupadmin.bind(null, record),
placement: 'topLeft',
},
}, {
label: '驳回审核',
popConfirm: {
title: '是否v',
confirm: handlebackadmin.bind(null, record),
placement: 'topLeft',
},
}
]
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/expert文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2024092603239210260', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210261', '2024092603239210260', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210262', '2024092603239210260', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210263', '2024092603239210260', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210264', '2024092603239210260', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210265', '2024092603239210260', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092603239210266', '2024092603239210260', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/expert文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2024092910425270310', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270311', '2024092910425270310', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270312', '2024092910425270310', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270313', '2024092910425270310', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270314', '2024092910425270310', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270315', '2024092910425270310', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024092910425270316', '2024092910425270310', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/expert文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2024093009506560560', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560561', '2024093009506560560', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560562', '2024093009506560560', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560563', '2024093009506560560', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560564', '2024093009506560560', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560565', '2024093009506560560', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2024093009506560566', '2024093009506560560', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,189 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ExpertForm">
<a-row>
<a-col :span="24">
<a-form-item label="专家状态" v-bind="validateInfos.expsture" id="ExpertForm-expsture" name="expsture">
<j-switch v-model:value="formData.expsture" ></j-switch>
</a-form-item>
</a-col>
<a-col :span="24" v-if="formData.expsture === 'Y'">
<a-form-item label="异常备注" v-bind="validateInfos.errinfo" id="ExpertForm-errinfo" name="errinfo">
<a-input v-model:value="formData.errinfo" placeholder="请输入异常备注" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24" v-if="formData.adminopen === '3' || formData.compopen === '3'">
<a-form-item label="异常备注" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入异常备注" allow-clear ></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectDept from '/src/components/Form/src/jeecg/components/JSelectDept.vue';
import JImageUpload from '/src/components/Form/src/jeecg/components/JImageUpload.vue';
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/src/utils/http/axios';
import { useMessage } from '/src/hooks/web/useMessage';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import { getValueType } from '/src/utils';
import { saveOrUpdate } from '../Expert.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/src/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
seusername: '',
psd: '',
sepsd: '',
realname: '',
workon: '',
sex: '',
ssdep: '',
topPic: '',
phone: '',
emails: '',
colleges: '',
major: '',
directioncal: '',
research: '',
educationcal: '',
expinfo: '',
compopen: '',
adminopen: '',
backinfo: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
psd: [{ required: true, message: '请输入密码!'},],
sepsd: [{ required: true, message: '请输入确认密码!'},],
workon: [{ required: true, message: '请输入工号!'},],
ssdep: [{ required: true, message: '请输入部门!'},],
emails: [{ required: true, message: '请输入邮箱!'},],
phone: [{ required: true, message: '请输入电话!'},],
seusername: [{ required: true, message: '请输入用户名!'},],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

@ -0,0 +1,77 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ExpertForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ExpertForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ExpertForm from './ExpertForm.vue'
import JModal from '/src/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

@ -250,6 +250,7 @@
* 操作栏 * 操作栏
*/ */
function getTableAction(record) { function getTableAction(record) {
const oct = userStore.loginInfo.departs[0].orgCategory;
const actions = [ const actions = [
{ {
label: '详情', label: '详情',
@ -257,7 +258,7 @@
} }
]; ];
if(record.state==="1"||record.state==="2"){ if((oct==="3"&&record.state==="1")||(record.state==="2"&&oct!=="3")){
actions.unshift({ actions.unshift({
label: '通过', label: '通过',
popConfirm: { popConfirm: {
@ -266,7 +267,7 @@
} }
}); });
} }
if(record.state==="1"||record.state==="2"){ if((oct==="3"&&record.state==="1")||(record.state==="2"&&oct!=="3")){
actions.unshift({ actions.unshift({
label: '驳回', label: '驳回',
popConfirm: { popConfirm: {

@ -67,7 +67,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
https: false, https: false,
port: VITE_PORT, port: VITE_PORT,
// Load proxy configuration from .env // Load proxy configuration from .env
proxy: createProxy(VITE_PROXY), // proxy: createProxy(VITE_PROXY),
}, },
build: { build: {
minify: 'esbuild', minify: 'esbuild',

@ -0,0 +1,5 @@
{
"dependencies": {
"vue3-scroll-seamless": "^1.0.6"
}
}
Loading…
Cancel
Save