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

init
Administrator 4 years ago
parent 27b4049b51
commit 4b90bb63fc

@ -61,13 +61,13 @@
this.$set(col.data[e.newIndex].props,"is_table_field",false)
}else{
this.curItem.item.id = this.curItem.item.tag + "_" + Common.getRandom(12);
if(this.curItem.item.tag !== "label"){
// if(this.curItem.item.tag !== "label"){
Object.keys(this.commonConfig).forEach((prop)=>{
this.$set(this.curItem.item.props,prop,this.commonConfig[prop])
});
}else{
this.$set(this.curItem.item.props,"label_alignment",this.commonConfig["label_alignment"])
}
// }else{
// this.$set(this.curItem.item.props,"label_alignment",this.commonConfig["label_alignment"])
// }
if (this.curItem.item.field_type <=24 && this.curItem.item.field_type >= 21){
this.curItem.item.props.show_title = false;

@ -98,7 +98,7 @@
}else{
this.curItem.item.id = this.curItem.item.tag + "_" + Common.getRandom(12);
this.$set(this.curItem.item.props,"is_sonForm_field",true)
if(this.curItem.item.tag !== "label"){
// if(this.curItem.item.tag !== "label"){
Object.keys(this.commonConfig).forEach((prop)=>{
if (prop === "label_alignment"){
this.$set(this.curItem.item.props,"label_alignment",this.data.props.son_label_alignment)
@ -106,9 +106,9 @@
this.$set(this.curItem.item.props,prop,this.commonConfig[prop])
}
});
}else{
this.$set(this.curItem.item.props,"label_alignment",this.data.props.son_label_alignment)
}
// }else{
// this.$set(this.curItem.item.props,"label_alignment",this.data.props.son_label_alignment)
// }
this.$bus.emit("clickItem",this.curItem.item)
}
},

@ -4,8 +4,8 @@
{{data.props.label_prefix + data.field_name + data.props.label_suffix}}
</div>
<div v-if="canEdit && (data.props.add || data.props.multiple)" class="operate-container-style">
<a-button v-if="data.props.add" type="primary" class="btn-style" @click="addRecord"></a-button>
<a-button v-if="data.props.multiple" type="primary" class="btn-style" @click="onDeleteRecords"></a-button>
<a-button v-if="data.props.add" type="link" class="btn-style" @click="addRecord"></a-button>
<a-button v-if="data.props.multiple" type="link" class="btn-style" @click="onDeleteRecords"></a-button>
</div>
<a-table class="table-style" :rowSelection="canEdit && data.props.multiple && this.fieldData.props.data.length > 0?{selectedRowKeys:selectedRowKeys,columnWidth:60,
onChange:onSelectedChange,getCheckboxProps:setCheckboxProps}:null" :columns="columns" :pagination="false" :dataSource="tableData" rowKey="value_id"
@ -213,8 +213,9 @@
ary.push({title:"序号",customRender:(text,record,index)=>{return index + 1},align:'center',width:60})
}
this.fieldData.props.data.forEach((item)=>{
let obj = {align:"center",title:item.props.label_prefix + item.field_name + item.props.label_suffix,dataIndex:item.id + "_json_copy",
scopedSlots:{customRender:"col"},slots:{title:"headerTitle"},width:item.field_type === 11?300:150};
let obj = {align:item.props.label_alignment === "flex-start"?"left":(item.props.label_alignment === "center"?"center":"right"),
title:item.props.label_prefix + item.field_name + item.props.label_suffix,dataIndex:item.id + "_json_copy",
scopedSlots:{customRender:"col"},slots:{title:"headerTitle"},width:item.field_type === 11?300:150,};
ary.push(obj)
})
@ -247,16 +248,16 @@
}
.operate-container-style{
width: 100%;
height: 2.5rem;
/*height: 2.5rem;*/
display: flex;
align-content: center;
align-items: center;
justify-items: flex-end;
justify-content: flex-end;
.btn-style{
margin-left: 0.5rem;
/*margin-left: 0.5rem;*/
font-size: 0.875rem;
height: 2rem;
height: 1.5rem;
}
}
.operate-btn-style{

@ -123,13 +123,13 @@
this.$set(this.curItem.item.props,"titleDivider",this.data.props.titleDivider);
this.$set(this.curItem.item.props,"borderColor",this.data.props.borderColor);
this.$set(this.curItem.item.props,"borderSize",this.data.props.borderSize);
if(this.curItem.item.tag !== "label"){
// if(this.curItem.item.tag !== "label"){
Object.keys(this.commonConfig).forEach((prop)=>{
this.$set(this.curItem.item.props,prop,this.commonConfig[prop])
});
}else{
this.$set(this.curItem.item.props,"label_alignment",this.commonConfig["label_alignment"])
}
// }else{
// this.$set(this.curItem.item.props,"label_alignment",this.commonConfig["label_alignment"])
// }
if (this.curItem.item.field_type <=24 && this.curItem.item.field_type >= 21){
this.curItem.item.props.show_title = false;

@ -677,7 +677,7 @@
json.form_id = field.form_id;
json.child_form_id = field.child_form_id;
let field_type = parseInt(json.field_type);
if (json.field_type === 1 && json.field_input_type === 2){//
if (field_type === 1 && json.field_input_type === 2){//
if (json.filed_auto_input_info === "person_num"){
json.props.value = this.workers_no?this.workers_no:"";
}else if (json.filed_auto_input_info === "person_name"){
@ -687,36 +687,26 @@
}
}else if(json.is_input_field === 1){//
this.organizeData(json,data)
}else if(field_type > 200){//
json.field_type = parseInt(field_type.toString().substr(0,2))
if(parseInt(field_type.toString().substr(2,1)) === 1){//
if (data){//
this.sonFormCount += 1;
this.getChildFormData(json,data.data_id,data.version_no)
}else{//
if (json.tag === "son_form"){//
json.props.tableData = [];
if (json.props.defaultLineCount > 0){//1
for(let i = 0; i < json.props.defaultLineCount; i++){
let data = {value_id:GUID_UUID.guid()}
json.props.data.forEach((item)=>{
// if (item.column_name && item.column_name !== ""){
// data[item.column_name + "_json"] = _.cloneDeep(item)
// }else{
data[item.id + "_json"] = _.cloneDeep(item);
data[item.id + "_json_copy"] = _.cloneDeep(item)
// }
})
json.props.tableData.push(data)
}
}
}else if(json.tag === "son_form"){//
if (data && data.value_id){//
this.sonFormCount += 1;
this.getChildFormData(json,data.data_id,data.version_no)
}else{//
json.props.tableData = [];
if (json.props.defaultLineCount > 0){//1
for(let i = 0; i < json.props.defaultLineCount; i++){
let data = {value_id:GUID_UUID.guid()}
json.props.data.forEach((item)=>{
data[item.id + "_json"] = _.cloneDeep(item);
data[item.id + "_json_copy"] = _.cloneDeep(item);
})
json.props.tableData.push(data)
}
}
}
}
this.field_list.push(json);
})
// this.field_list = field_list;
this.mainFormErgodicComplete = true;//
if (this.sonFormCount === this.hasGetFormDataCount){//
this.deleteNotMainField();

@ -213,9 +213,10 @@
changeMenu:function () {
if(this.towLevelIndexPath !== -1){//
let twoLevelIndex = parseInt(this.towLevelIndexPath.split("-")[1]);
this.letMenuIndex = parseInt(this.towLevelIndexPath.split("-")[0]);
this.selectedMenu = (this.leftMenu[parseInt(this.letMenuIndex)].children)[twoLevelIndex];
StaticParams.menuLocation[0] = this.leftMenu[parseInt(this.letMenuIndex)].purview_name;
StaticParams.menuLocation[1] = this.selectedMenu.purview_name
StaticParams.menuLocation[1] = this.selectedMenu.purview_name;
}else{
this.selectedMenu = this.leftMenu[parseInt(this.letMenuIndex)];
StaticParams.menuLocation[0] = this.selectedMenu.purview_name;

@ -35,7 +35,7 @@
<template v-if="data.tag !== 'col'">
<div class="single-attribute-container-style">
<div class="attribute-title">展示方式</div>
<a-checkbox v-if="[21,22,23,24].every((num)=>{return num !== data.field_type})" v-model="data.props.is_read_only"></a-checkbox>
<!-- <a-checkbox v-if="[21,22,23,24].every((num)=>{return num !== data.field_type})" v-model="data.props.is_read_only"></a-checkbox>-->
<a-checkbox v-if="[21,22,23,24].every((num)=>{return num !== data.field_type})" v-model="data.props.is_disabled"></a-checkbox>
<a-checkbox v-model="data.props.is_hidden"></a-checkbox>
</div>

@ -16,14 +16,15 @@
'calc((100% - ' + fieldData.props.label_width + 'rem) * ' + fieldData.props.content_width / 100 +')'),paddingLeft:design ||
fieldData.props.showTitle === false || [21,22,23,24,210,211,230,231,240,241].some((num)=>{return num === fieldData.field_type})?null:'0.5rem',marginBottom:design ||
(design === false && fieldData.props.is_table_field === true)?null:'0.5rem',paddingRight:!design && fieldData.props.is_table_field === true?'0.5rem':null,
pointerEvents:(design && (fieldData.tag !== 'son_form' && fieldData.tag !== 'grid' && fieldData.tag !== 'table')) || (edit === false && (fieldData.field_type !== 9 && fieldData.field_type !== 10))?'none':null,borderLeft:design ||
pointerEvents:(design && (fieldData.tag !== 'son_form' && fieldData.tag !== 'grid' && fieldData.tag !== 'table')) ||
(edit === false && (fieldData.field_type !== 9 && fieldData.field_type !== 10))?'none':null,borderLeft:design ||
fieldData.props.show_title === false || [21,22,23,24,230,231,210,211,240,241].some((num)=>{return num === fieldData.field_type}) || fieldData.props.is_sonForm_field === true ||
(fieldData.props.is_table_field && fieldData.props.titleDivider === false)?null:'1px solid #e5e5e5',
borderLeftColor:fieldData.props.is_table_field && fieldData.props.titleDivider === true?fieldData.props.borderColor:'#e5e5e5',
borderLeftWidth:fieldData.props.is_table_field && fieldData.props.titleDivider === true?fieldData.props.borderSize + 'px':'1px'}">
<!--表单设计-->
<template v-if="design">
<component :is="com" :field="fieldData" :disabled="true" :is_edit="false" :style="{width:fieldData.props.is_table_field === true?'100%':null}"/>
<component :is="com" :field="fieldData" :disabled="true" :is_edit="edit" :style="{width:fieldData.props.is_table_field === true?'100%':null}"/>
</template>
<!--表单新建/查看/编辑-->
<template v-else>

@ -247,7 +247,7 @@ export default {
})
}else{
StaticParams.showPopModal(this,'预览','views/teacherInfo/formCommon/ViewForm.vue',
{"fieldsList":_.cloneDeep(this.fieldsList),"form_width":this.form_width},false,true,null,"80%","preview-style")
{"fieldsList":_.cloneDeep(this.fieldsList),"form_width":this.form_width},false,true,null,"calc(55% + 48px)","preview-style")
}
},
returnList:function(){

@ -75,7 +75,7 @@ export const baseFields = [
]
export const advancedFields = [
{ field_type: 8, field_name: '证件照',tag:"portrait",icon:"icon-yuangong-01",showTitle:true,content_width:100,props:{max_length:"text"}},
// { field_type: 8, field_name: '证件照',tag:"portrait",icon:"icon-yuangong-01",showTitle:true,content_width:100,props:{max_length:"text"}},
{ field_type: 9, field_name: '图片上传',tag:"img",el:"FileUpload.vue",attributeUrl:"FileUploadAttribute",icon:"icon-Img",
props:{value:[],max_length:"text",can_search:false,is_search:false,type:2,title:'上传图片',option:{no_user:""},can_downLoad:true,multiple:true,is_certificate:false,can_delete:true}},

Loading…
Cancel
Save