mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +08:00
培训发生组织ui更改
This commit is contained in:
@@ -4,12 +4,9 @@
|
||||
<div class="filter" style="min-width: 1380px; margin: 20px;" >
|
||||
<a-form layout="inline">
|
||||
<a-form-item class="select">
|
||||
<div style="width: 276px; height: 40px; border-radius: 8px" >
|
||||
<ProjectManager v-model:value="searchParam.teacherNo"
|
||||
v-model:name="searchParam.teacherName"
|
||||
placeholder="请输入工号/讲师姓名进行检索"
|
||||
@onChange="managerChange" mode="multiple"></ProjectManager>
|
||||
</div>
|
||||
<div>
|
||||
<a-input style="width: 276px; height: 40px; border-radius: 8px" v-model:value="searchParam.name" placeholder="请输入工号/讲师姓名进行检索" />
|
||||
</div>
|
||||
</a-form-item>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<a-button @click="searchSubmit()" type="primary" class="resetbtn">查询 </a-button>
|
||||
@@ -84,69 +81,91 @@
|
||||
<a-form :model="formParam" :rules="rules" layout="vertical" ref="formRef">
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="24">
|
||||
<span class="line"></span><span>讲师体系基本信息</span>
|
||||
<!-- <span class="line"></span><span>讲师体系基本信息</span> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<!-- <a-col :span="12">
|
||||
<a-form-item label="归属组织编号" name="trainorgId">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="培训发生组织编号:" name="trainorgId">
|
||||
<a-input disabled v-model:value="formParam.trainorgId" class="draitem"
|
||||
placeholder="" allowClear showSearch>
|
||||
placeholder="请输入讲师体系编号" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="归属组织名称" name="trainorgName">
|
||||
<a-form-item label="培训发生组织名称:" name="trainorgName">
|
||||
<a-input v-model:value="formParam.trainorgName" class="draitem"
|
||||
placeholder="" allowClear showSearch>
|
||||
placeholder="请输入讲师体系名称" allowClear showSearch>
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="组织负责人" name="zzfzr">
|
||||
<a-form-item label="是否为根节点:" name="zzfzr">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<a-radio-group style="min-width:126px;" @change="selectRadio" v-model:value="selectValue" name="radioGroup">
|
||||
<a-radio :value="0">否</a-radio>
|
||||
<a-radio :value="1">是</a-radio>
|
||||
</a-radio-group>
|
||||
<a-select v-model:value="formParam.zzfzr" placeholder="请选择组织负责人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="组织担当:" name="zzfzr">
|
||||
<a-select v-model:value="formParam.zzfzr" placeholder="请选择组织负责人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16" v-if="!selectValue">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="一级审批人" name="yjspr">
|
||||
<a-select v-model:value="formParam.yjspr" placeholder="请选择一级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="二级审批人" name="zzfzr">
|
||||
<a-select v-model:value="formParam.zzfzr" placeholder="请选择二级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12" v-if="!selectValue">
|
||||
<a-form-item label="三级审批人" name="sjspr">
|
||||
<a-select v-model:value="formParam.sjspr" placeholder="请选择三级审批人"
|
||||
:options="PlaceOfPayList" allowClear showSearch/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="备注" name="sjspr">
|
||||
<a-input v-model:value="formParam.remark" showCount :maxlength="200"
|
||||
style="width: 100%; height: 40px; border-radius: 8px" placeholder="请输入" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-item label="选中组织">
|
||||
<a-form-item label="选择管理组织">
|
||||
<a-row :gutter="50" style="margin-bottom: 10px;">
|
||||
<a-col :span="2">
|
||||
<a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag>
|
||||
<!-- <a-tag color="blue" style="line-height: 40px; ">管理业务</a-tag> -->
|
||||
<a-button type="primary" @click="addContentData" style="width: 100px; height: 40px;border-radius: 8px">添加组织</a-button>
|
||||
</a-col>
|
||||
<a-col :span="20">
|
||||
<!-- <a-col :span="20">
|
||||
<div class="add_content" @click="addContentData" >+</div>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-form-item>
|
||||
<!-- 备注 remark -->
|
||||
<a-row :gutter="16">
|
||||
<a-row :gutter="16" style="padding-bottom: 60px;">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注">
|
||||
<a-textarea v-model:value="formParam.remark" showCount :maxlength="200"
|
||||
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" />
|
||||
<a-form-item label="">
|
||||
<!-- <a-textarea v-model:value="formParam.remark" showCount :maxlength="200"
|
||||
style="width: 100%; height: 100px; border-radius: 8px" placeholder="请输入" /> -->
|
||||
<a-table :dataSource="dataSource" :columns="orgColumns"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -195,6 +214,8 @@ export default{
|
||||
setup() {
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
dataSource: [],
|
||||
selectValue: 0,
|
||||
vf:true,
|
||||
showContent: false,
|
||||
tableLoading:false,
|
||||
@@ -203,9 +224,7 @@ vf:true,
|
||||
teacherdialogtitle:null,
|
||||
delId:null,
|
||||
searchParam: {
|
||||
trainorgId: null,
|
||||
userNo:null,
|
||||
trainorgName:null,
|
||||
name:null,
|
||||
pageNo: "1",
|
||||
pageSize: "10"
|
||||
},
|
||||
@@ -214,12 +233,9 @@ vf:true,
|
||||
trainorgName:null,
|
||||
remark:null
|
||||
}
|
||||
})
|
||||
function managerChange(e, l, d, t, orgName) {
|
||||
console.log(e, l);
|
||||
state.searchParam.teacherNo = d;
|
||||
state.searchParam.teacherName = t;
|
||||
state.searchParam.trainorgName=orgName
|
||||
})
|
||||
const selectRadio = (val)=>{
|
||||
console.log(val.target.value,'val')
|
||||
}
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -280,6 +296,23 @@ vf:true,
|
||||
align: "right",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
])
|
||||
const orgColumns = ref([
|
||||
{
|
||||
title: '组织名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '是否被培训发生组织选择',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: '担当',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
},
|
||||
])
|
||||
//列表数据
|
||||
const tableData = ref([
|
||||
@@ -304,7 +337,6 @@ const getTableDate = (obj) => {
|
||||
const searchReset = () => {
|
||||
state.searchParam = {
|
||||
name:null,
|
||||
userNo: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
@@ -371,8 +403,26 @@ const getTableDate = (obj) => {
|
||||
kid:null
|
||||
}
|
||||
}
|
||||
async function validateField(name) {
|
||||
return new Promise((resolve) => {
|
||||
formRef.value.validateFields([name])
|
||||
.then(() => {
|
||||
resolve(false);
|
||||
})
|
||||
.catch(() => {
|
||||
resolve(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
//保存
|
||||
const createTeacherDialog = () => {
|
||||
const createTeacherDialog = async () => {
|
||||
const formItemNames = Object.keys(rules);
|
||||
for(let i=0;i<formItemNames.length;i++){
|
||||
const result = await validateField(formItemNames[i]);
|
||||
if (result) {
|
||||
return message.error(rules[formItemNames[i]][0].log)
|
||||
}
|
||||
}
|
||||
formRef.value
|
||||
.validate()
|
||||
.then(() => {
|
||||
@@ -399,12 +449,12 @@ const getTableDate = (obj) => {
|
||||
});
|
||||
};
|
||||
const rules = {
|
||||
trainorgId: [{ required: true, message: '归属组织编号不能为空' }],
|
||||
trainorgName: [{ required: true, message: '归属组织名称不能为空' }],
|
||||
zzfzr: [{ required: true, message: '组织负责人不能为空' }],
|
||||
yjspr: [{ required: true, message: '"一级审批人不能为空' }],
|
||||
zzfzr: [{ required: true, message: '二级审批人不能为空' }],
|
||||
sjspr: [{ required: true, message: '三级审批人不能为空' }],
|
||||
trainorgId: [{ required: true, message: '',log:'归属组织编号不能为空' }],
|
||||
trainorgName: [{ required: true, message: '',log:'归属组织名称不能为空' }],
|
||||
zzfzr: [{ required: true, message: '',log:'组织负责人不能为空' }],
|
||||
yjspr: [{ required: true, message: '"',log:'一级审批人不能为空' }],
|
||||
zzfzr: [{ required: true, message: '',log:'二级审批人不能为空' }],
|
||||
sjspr: [{ required: true, message: '',log:'三级审批人不能为空' }],
|
||||
|
||||
|
||||
}
|
||||
@@ -412,11 +462,12 @@ const getTableDate = (obj) => {
|
||||
...toRefs(state),
|
||||
rules,
|
||||
formRef,
|
||||
managerChange,
|
||||
columns,
|
||||
orgColumns,
|
||||
tableData,
|
||||
getTableDate,
|
||||
searchSubmit,
|
||||
selectRadio,
|
||||
searchReset,
|
||||
deleteModal,
|
||||
cancelTeacherDialog,
|
||||
@@ -427,6 +478,7 @@ const getTableDate = (obj) => {
|
||||
changePagination,
|
||||
TeacherSystem,
|
||||
createTeacherDialog,
|
||||
validateField,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user