朱思禹提交:教师信息vue项目

init
Administrator 4 years ago
parent 0391da74c8
commit 27b4049b51

@ -3,7 +3,10 @@
<div class="app-style" ref="app">
<Menu @onLoad="menuOnLoad" @menuChange="menuChanged"/>
<div class="content-style">
<component :is="getCom" v-bind="getParams" style="width: 100%;background-color: white;height: 100%"/>
<div v-if="selectedMenu && (selectedMenu.id === 'infoUpload' || selectedMenu.id === 'teacherInfoManagement')" class="no-form-tips">
对不起当前没有启用的类目{{selectedMenu.id === 'infoUpload'?"联系管理员":"先在系统设置中"}}进行类目设置
</div>
<component v-else :is="getCom" v-bind="getParams" style="width: 100%;background-color: white;height: 100%"/>
</div>
<div v-if="!is_loaded_data" class="spin-container-style">
<a-spin>
@ -109,6 +112,16 @@ export default {
min-width: calc(100% - 272px);
padding: 0 8px;
background-color: #f2f2f2;
.no-form-tips{
width: 100%;
height: 100%;
display: flex;
padding-top: 10rem;
justify-items: center;
justify-content: center;
background-color: white;
font-size: 1.5rem;
}
}
.spin-container-style{
position: absolute;

@ -1,6 +1,7 @@
<template>
<div v-if="pageType === 1" style="font-size: 0.875rem">
<div class="title-line-outer">
<div v-if="!is_loading_formData && columnData.length === 0" class="no-form-tip-style"></div>
<div class="title-line-outer" v-if="!is_loading_formData && columnData.length > 0">
<div class="title-line-inner">
<span>部门选择</span>
<single-or-all-depart-select :can-clear="false" :disabled="is_loading ||is_loading_formData || columnData.length === 0"
@ -30,7 +31,6 @@
<i class="office-operate-download operate-style" title="下载" @click="onExport(3,record.person_id)"></i>
</div>
</a-table>
<div v-else class="no-form-tip-style">暂无包含证书的任何类目</div>
</template>
</div>
<a-pagination v-if="!is_loading_formData" :current="page_number" :pageSize="page_size" :hideOnSinglePage="true" :total="total_row" class="pagination-style" @change="pageChange"/>
@ -306,13 +306,12 @@
}
}
.no-form-tip-style{
height: 37.5rem;
height: 100%;
display: flex;
align-content: center;
align-items: center;
padding-top: 10rem;
justify-content: center;
justify-items: center;
font-size: 1rem;
font-size: 1.5rem;
}
.operate-style{
font-size: 1rem;

@ -1,5 +1,5 @@
<template>
<div v-if="data.props.type === 1" style="width: 100%;">
<div v-if="data.props.type === 1" class="divider-div-style">
<a-divider v-if="data.props.value === ''" :dashed="data.props.dashed"
:style="{marginTop:data.props.marginTop + 'px',marginBottom:data.props.marginBottom + 'px'}"/>
<a-divider v-else :dashed="data.props.dashed" :orientation="data.props.orientation"
@ -7,7 +7,7 @@
{{data.props.value}}
</a-divider>
</div>
<div v-else :style="{width:'100%',height:data.props.height + 'px'}"></div>
<div v-else :style="{height:data.props.height + 'px'}" class="divider-div-style"></div>
</template>
<script>
@ -31,7 +31,10 @@
}
</script>
<style scoped>
<style scoped lang="scss">
.divider-div-style{
width: 100%;
}
/*.divider-container-style{*/
/* min-height: 2.5rem;*/
/* display: flex;*/

@ -21,7 +21,7 @@
</template>
<script>
import {Row,Icon,Col} from 'ant-design-vue'
import {Row,Icon,Col,Modal} from 'ant-design-vue'
import _ from 'lodash'
import Common from '../../../utils/common'
import draggable from 'vuedraggable'
@ -80,6 +80,14 @@
},
deleteRowData:function(col,data){
let item = data[0];
if (CommonOperate.checkHasChangelessField(item)){
Modal.warning({
title:"删除失败",
centered:true,
content:"当前字段包含类目固定字段(教师编号,教师姓名,单位(部门)),故无法删除,请将固定字段从此字段中移除,再进行删除操作"
})
return;
}
let index = col.data.findIndex((field)=>{return field.id === item.id})
if (col.data.length > 1){
if (index === col.data.length - 1){

@ -26,7 +26,7 @@
import Common from '../../../utils/common'
import FieldItem from '../systemConfig/FieldItem'
import {EventConfig} from '../../../utils/eventConfig'
import {Checkbox} from 'ant-design-vue'
import {Checkbox,Modal} from 'ant-design-vue'
import _ from 'lodash'
import CommonOperate from '../utils/commonOperate'
export default {
@ -65,6 +65,14 @@
},
deleteRowData: function (data) {
let item = data[0];
if (CommonOperate.checkHasChangelessField(item)){
Modal.warning({
title:"删除失败",
centered:true,
content:"当前字段包含类目固定字段(教师编号,教师姓名,单位(部门)),故无法删除,请将固定字段从此字段中移除,再进行删除操作"
})
return;
}
let index = this.data.props.data.findIndex((field)=>{return field.id === item.id})
if (this.data.props.data.length > 1){
if (index === this.data.props.data.length - 1){

@ -41,7 +41,7 @@
import Common from '../../../utils/common';
import draggable from 'vuedraggable'
import FieldItem from '../systemConfig/FieldItem'
import {Dropdown,Menu,Icon} from 'ant-design-vue';
import {Dropdown,Menu,Icon,Modal} from 'ant-design-vue';
import {curItem,commonConfig} from '../systemConfig/fieldAndFormConfig'
import _ from 'lodash'
import CommonOperate from '../utils/commonOperate';
@ -88,6 +88,14 @@
this.$bus.emit("clickItem",itemCopy)
},
deleteRowData:function(td,dataIndex){
if (CommonOperate.checkHasChangelessField(td.data[dataIndex])){
Modal.warning({
title:"删除失败",
centered:true,
content:"当前字段包含类目固定字段(教师编号,教师姓名,单位(部门)),故无法删除,请将固定字段从此字段中移除,再进行删除操作"
})
return;
}
if (td.data.length > 1){
if (dataIndex === td.data.length - 1){
this.curItem.item = td.data[dataIndex - 1];

@ -42,16 +42,69 @@
letMenuIndex:0,//
towLevelIndexPath:-1,//
openList:["0"],//
menu_code:"001002027",
purview_id:1437,
// menu_code:"",
// purview_id:"",
// menu_code:"001002027",
// purview_id:1437,
crmData:[],
menu_code:"",
purview_id:"",
}
},
mounted:function(){
this.$bus.on("menuChang",this.onMenuChange)
this.getMenu()
},
beforeDestroy:function(){
this.$bus.off("menuChang",this.onMenuChange)
},
methods:{
onMenuChange:function(){
this.copyData = _.cloneDeep(this.crmData);
this.deleteOperateData(this.copyData)//
let param = {
org_id:this.BaseConfig.person_info_my.bureau_id,
system_id:10,
person_id:BaseConfig.userInfo.person_id_cookie
}
this.InterfaceConfig.callInterface([{
url:"intellioa/teacher/informationManagement/getSystemFunctionList",
method:"get",
params:param,
isTestLogin:true
}],(result)=>{
let data = result[0].data;
if (data.code === 2000){
this.copyData.forEach((menu,index)=>{
if (menu.id === "teacherInfoManagement" || menu.id === "infoUpload"){
menu.children = [];
if (data.data.all_form_list && data.data.all_form_list.length > 0){//
data.data.all_form_list.forEach((item)=>{
menu.children.push({purview_id:item.form_id,purview_name:item.form_name,parentId:menu.id,var3:"",data_num_type:item.data_num_type})
})
}
}else if (menu.id === "teacherInfoSearch" && OfficeMenuConfig.menuIsExist(["teacherInfoSearch","categorySummary"]) &&
!OfficeMenuConfig.menuIsExist(["teacherInfoSearch","categorySummary"],"orgRange")){
if (!data.data.view_form_list || data.data.view_form_list.length === 0){//
menu.children.splice(menu.children.findIndex((child)=>{return child.id === "categorySummary"}),1)
if (menu.children.length === 0){
this.copyData.splice(index,1)
}
}
}
})
if (data.data.check_form_list && data.data.check_form_list.length > 0){//
let menu = {purview_id:"teacherInfoApprove",purview_name:"教师信息审批",parentId:"",var3:"",icon_css:"operate-edit1",id:"teacherInfoApprove",children:[]}
data.data.check_form_list.forEach((item)=>{
menu.children.push({purview_id:item.form_id,purview_name:item.form_name,parentId:menu.id,var3:"",data_num_type:item.data_num_type})
})
this.copyData.push(menu)
}
this.leftMenu = this.copyData;
}
})
},
getMenu:function () {
if (this.purview_id === "" && this.menu_code === ""){
this.purview_id = StaticParams.getUrlParamsByName(window.location.href,"purview_id");
@ -61,6 +114,7 @@
OfficeMenuConfig.initMenu({purview_id:this.purview_id,menu_code:this.menu_code},this.menuDataHandle,2)
},
menuDataHandle:function (data) {
this.crmData = data;
this.copyData = _.cloneDeep(data);
this.deleteOperateData(this.copyData)//
let param = {

@ -262,6 +262,7 @@
this.page_number -= 1;
}
this.getList();
this.$bus.emit("menuChang",null);
}
}
})
@ -304,7 +305,8 @@
let data = result[0].data;
if (data.code === 2000){
if(dom.formData){
this.$toast('编辑类目成功')
this.$toast('编辑类目成功');
this.$bus.emit("menuChang");
}else{
this.$toast('增加类目成功')
}

@ -335,6 +335,14 @@ export default {
},
deleteRowData: function (data) {
let item = data[0];
if (CommonOperate.checkHasChangelessField(item)){
Modal.warning({
title:"删除失败",
centered:true,
content:"当前字段包含类目固定字段(教师编号,教师姓名,单位(部门)),故无法删除,请将固定字段从此字段中移除,再进行删除操作"
})
return;
}
let index = this.fieldsList.findIndex((field)=>{return field.id === item.id})
if (this.fieldsList.length > 1){
if (index === this.fieldsList.length - 1){

@ -16,7 +16,7 @@
</div>
</div>
<div class="table-container-style">
<a-table :loading="dataLoading" :columns="getColumns" :dataSource="personDataList" rowKey="value_id" :scroll="{x:true}" :pagination="false">
<a-table :loading="dataLoading" :columns="getColumns" :dataSource="personDataList" :rowKey="data_num_type === 1 ?'value_id':'person_id'" :scroll="{x:true}" :pagination="false">
<span slot="dictionary" slot-scope="value"><!--字典类型字段-->
{{getDictionaryValue(value)}}
</span>

@ -3,8 +3,8 @@
<a-spin :spinning="isLoading" tip="正在加载数据,请稍候..." size="large" style="position: absolute;top: 50%;left: 50%">
</a-spin>
<template v-if="!isLoadingForm">
<div v-if="formList.length === 0" style="line-height: 10rem;font-size: 1rem;text-align: center">
对不起暂无类目
<div v-if="formList.length === 0" style="line-height: 23rem;font-size: 1.5rem;text-align: center">
对不起当前没有启用的类目请先在系统设置中进行类目设置
</div>
<template v-else>
<div class="title-line-outer">

@ -1,6 +1,9 @@
<template>
<div class="personal-info-style" ref="parent">
<div class="title-line-outer">
<div v-if="!isLoadingForm && formList.length === 0" style="line-height: 23rem;font-size: 1.5rem;text-align: center">
对不起当前没有启用的类目请联系管理员进行类目设置
</div>
<div class="title-line-outer" v-if="!isLoadingForm && formList.length > 0">
<div class="title-line-inner">
<template v-if="isAdmin">
<span>人员选择</span>
@ -19,32 +22,27 @@
</div>
<a-spin :spinning="isLoading" tip="正在加载数据,请稍候..." size="large">
<div class="data-container-style" ref="dataContainer">
<template v-if="!isLoadingForm">
<div v-if="formList.length === 0" style="line-height: 10rem;font-size: 1rem;text-align: center">
对不起暂无任何个人信息类目
<template v-if="!isLoadingForm && formList.length > 0">
<div class="form-container-style">
<FormList type="vertical" :list="formList" @formChange="onFormChange" :selectedData="selectedForm"/>
</div>
<template v-else>
<div class="form-container-style">
<FormList type="vertical" :list="formList" @formChange="onFormChange" :selectedData="selectedForm"/>
</div>
<vue-scroll v-if="!isLoading" class="data-container-style clearfix" :ops="ops" style="height: 100%; width: 80%">
<div class="form-name-style">{{selectedForm.form_name}}</div>
<EditAndViewForm v-if="selectedForm.data_num_type === 2" :data-info="personInfoData" :data-num-type="2" class="data-info-style" style="height: calc(100% - 3rem);"
:page-type="3" :show-operate-list="false" :form_id="selectedForm.form_id" :businessType="2" :personInfo="selectedPersonObj"/>
<vue-scroll v-if="!isLoading" class="data-container-style clearfix" :ops="ops" style="height: 100%; width: 80%">
<div class="form-name-style">{{selectedForm.form_name}}</div>
<EditAndViewForm v-if="selectedForm.data_num_type === 2" :data-info="personInfoData" :data-num-type="2" class="data-info-style" style="height: calc(100% - 3rem);"
:page-type="3" :show-operate-list="false" :form_id="selectedForm.form_id" :businessType="2" :personInfo="selectedPersonObj"/>
<template v-else>
<div v-if="!personInfoData.form_data_list || personInfoData.form_data_list.length === 0" style="line-height: 10rem;font-size: 1rem;text-align: center"></div>
<template v-else>
<div v-if="!personInfoData.form_data_list || personInfoData.form_data_list.length === 0" style="line-height: 10rem;font-size: 1rem;text-align: center"></div>
<template v-else>
<template v-for="item,index in personInfoData.form_data_list">
<div :key="item.value_id + 'index'" class="item-index-style">
<span style="background-color: white;z-index: 10">条目{{index + 1}}</span>
</div>
<EditAndViewForm :data-info="getDataInfo(item)" :data-num-type="1" class="data-info-style" :key="item.value_id + 'info'" :showScroll="false" style="height: auto;"
:page-type="3" :show-operate-list="false" :form_id="selectedForm.form_id" :businessType="2" :personInfo="selectedPersonObj"/>
</template>
<template v-for="item,index in personInfoData.form_data_list">
<div :key="item.value_id + 'index'" class="item-index-style">
<span style="background-color: white;z-index: 10">条目{{index + 1}}</span>
</div>
<EditAndViewForm :data-info="getDataInfo(item)" :data-num-type="1" class="data-info-style" :key="item.value_id + 'info'" :showScroll="false" style="height: auto;"
:page-type="3" :show-operate-list="false" :form_id="selectedForm.form_id" :businessType="2" :personInfo="selectedPersonObj"/>
</template>
</template>
</vue-scroll>
</template>
</template>
</vue-scroll>
</template>
</div>
</a-spin>
@ -246,6 +244,8 @@
this.getPersonInfoList();
}
})
}else{
this.isLoading = false;
}
}
})

@ -74,6 +74,55 @@ export default {
curData.id = curData.tag + "_" + Common.getRandom(12);
})
}
}
},
/*
* 检查是否有固定字段
* */
checkHasChangelessField(field){
if (field.tag === "grid"){
for (let i =0; i < field.props.cols.length; i++){
let col = field.props.cols[i];
for (let j = 0; j < col.data.length; j++){
let data = col.data[j]
if (data.tag === "grid" || data.tag === "table" || data.tag === "son_form"){
if (this.checkHasChangelessField(data) === true){
return true;
}
}else if(data.tag === "input" && data.props.field_input_type === 2){
return true;
}
}
}
}else if (field.tag === "table"){
for (let i = 0; i < field.props.tr.length; i ++){
let tr = field.props.tr[i];
for(let j = 0; j < tr.td.length; j++){
let td = tr.td[j];
for(let k = 0; k < td.data.length; k ++){
let data = td.data[k];
if (data.tag === "grid" || data.tag === "table" || data.tag === "son_form"){
if (this.checkHasChangelessField(data) === true){
return true;
}
}else if(data.tag === "input" && data.props.field_input_type === 2){
return true;
}
}
}
}
}else{
for(let i = 0; i < field.props.data; i++){
let data = field.props.data[i];
if (data.tag === "grid" || data.tag === "table" || data.tag === "son_form"){
if (this.checkHasChangelessField(data) === true){
return true;
}
}else if(data.tag === "input" && data.props.field_input_type === 2){
return true;
}
}
}
return false;
}
}

Loading…
Cancel
Save