|
|
|
@ -1,32 +1,17 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div v-if="attribute.tag === 'input' && attribute.props.field_input_type === 2" class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">输入方式</div>
|
|
|
|
|
<a-radio-group button-style="solid" v-model="attribute.props.field_input_type" @change="fieldTypeChange">
|
|
|
|
|
<!-- <a-radio-button :value="1" class="radio-button-style">用户输入</a-radio-button>-->
|
|
|
|
|
<a-radio-button :value="2" class="radio-button-style">自动填充</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="attribute.tag === 'input' && attribute.props.field_input_type === 2" class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">填充内容</div>
|
|
|
|
|
<a-radio-group button-style="solid" v-model="attribute.props.filed_auto_input_info">
|
|
|
|
|
<a-radio-button value="person_num" class="radio-button-style">编号</a-radio-button>
|
|
|
|
|
<a-radio-button value="person_name" class="radio-button-style">姓名</a-radio-button>
|
|
|
|
|
<a-radio-button value="org_dept_name" class="radio-button-style">单位(部门)</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<template v-if="attribute.tag === 'input' && attribute.props.field_input_type === 1">
|
|
|
|
|
<template v-if="attribute.field_type === 27">
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">内容更新数据来源表单</div>
|
|
|
|
|
<a-spin :spinning="form_loading" :delay="100" size="small" tip="正在加载表单数据,请稍候...">
|
|
|
|
|
<a-select style="margin-top: 0.5rem;width: 100%" :allowClear="true" :defaultActiveFirstOption="false"
|
|
|
|
|
placeholder="请选择数据来源表单" :showSearch="true" v-model="attribute.props.data_source_form_id"
|
|
|
|
|
optionFilterProp="children" @change="resourceFormChange">
|
|
|
|
|
<a-select-option v-for="form in formList" :key="form.form_id" :value="form.form_id">
|
|
|
|
|
{{ form.form_name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-spin>
|
|
|
|
|
<a-select style="margin-top: 0.5rem;width: 100%" :allowClear="true" :defaultActiveFirstOption="false"
|
|
|
|
|
placeholder="请选择数据来源表单" :showSearch="true" v-model="attribute.props.data_source_form_id"
|
|
|
|
|
optionFilterProp="children" @change="resourceFormChange">
|
|
|
|
|
<a-select-option v-for="form in formList" :key="form.form_id" :value="form.form_id">
|
|
|
|
|
{{ form.form_name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">内容更新数据来源字段</div>
|
|
|
|
@ -34,7 +19,7 @@
|
|
|
|
|
<a-select style="margin-top: 0.5rem;width: 100%" :allowClear="true" :defaultActiveFirstOption="false"
|
|
|
|
|
:disabled="!attribute.props.data_source_form_id || attribute.props.data_source_form_id === ''"
|
|
|
|
|
placeholder="请选择数据来源字段" :showSearch="true" v-model="attribute.props.data_source_field_id"
|
|
|
|
|
optionFilterProp="children">
|
|
|
|
|
optionFilterProp="children" @change="resourceFieldChange">
|
|
|
|
|
<a-select-option v-for="field in fieldList" :key="field.field_id" :value="field.field_id">
|
|
|
|
|
{{ field.field_name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
@ -43,7 +28,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">内容更新关联数据规则</div>
|
|
|
|
|
<a-radio-group v-model="attribute.props.compare_standard" :disabled="!attribute.props.data_source_form_id || attribute.props.data_source_form_id === ''">
|
|
|
|
|
<a-radio-group v-model="attribute.props.compare_standard">
|
|
|
|
|
<a-radio class="radioStyle" :value="1">
|
|
|
|
|
始终显示最早录入字段
|
|
|
|
|
</a-radio>
|
|
|
|
@ -59,20 +44,37 @@
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">占位内容</div>
|
|
|
|
|
<a-input placeholder="占位内容,最多10个字符" v-model="attribute.props.placeholder" :maxLength="10" :allowClear="true"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">默认值</div>
|
|
|
|
|
<a-input placeholder="默认值,最多50个字符" v-model="attribute.props.value" :maxLength="50" :allowClear="true"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style" style="position: relative">
|
|
|
|
|
<div class="attribute-title">内容长度限制</div>
|
|
|
|
|
<a-switch size="small" :checked="getChecked()" @change="switchChange"
|
|
|
|
|
style="position: absolute;right: 0;top: 0.3rem" unCheckedChildren="不限制"/>
|
|
|
|
|
<a-input-number :min="1" :step="1" :disabled="attribute.props.max_length === 'text'" :value="getNum()" @change="numChange"/>
|
|
|
|
|
</div>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<div v-if="attribute.tag === 'input' && attribute.props.field_input_type === 2" class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">输入方式</div>
|
|
|
|
|
<a-radio-group button-style="solid" v-model="attribute.props.field_input_type" @change="fieldTypeChange">
|
|
|
|
|
<!-- <a-radio-button :value="1" class="radio-button-style">用户输入</a-radio-button>-->
|
|
|
|
|
<a-radio-button :value="2" class="radio-button-style">自动填充</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="attribute.tag === 'input' && attribute.props.field_input_type === 2" class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">填充内容</div>
|
|
|
|
|
<a-radio-group button-style="solid" v-model="attribute.props.filed_auto_input_info">
|
|
|
|
|
<a-radio-button value="person_num" class="radio-button-style">编号</a-radio-button>
|
|
|
|
|
<a-radio-button value="person_name" class="radio-button-style">姓名</a-radio-button>
|
|
|
|
|
<a-radio-button value="org_dept_name" class="radio-button-style">单位(部门)</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">占位内容</div>
|
|
|
|
|
<a-input placeholder="占位内容,最多10个字符" v-model="attribute.props.placeholder" :maxLength="10" :allowClear="true"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style">
|
|
|
|
|
<div class="attribute-title">默认值</div>
|
|
|
|
|
<a-input placeholder="默认值,最多50个字符" v-model="attribute.props.value" :maxLength="50" :allowClear="true"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="single-attribute-container-style" style="position: relative">
|
|
|
|
|
<div class="attribute-title">内容长度限制</div>
|
|
|
|
|
<a-switch size="small" :checked="getChecked()" @change="switchChange"
|
|
|
|
|
style="position: absolute;right: 0;top: 0.3rem" unCheckedChildren="不限制"/>
|
|
|
|
|
<a-input-number :min="1" :step="1" :disabled="attribute.props.max_length === 'text'" :value="getNum()" @change="numChange"/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -107,7 +109,7 @@
|
|
|
|
|
ASelectOption:Select.Option
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
if (this.attribute.props.field_input_type === 1){//用户手动输入
|
|
|
|
|
if (this.attribute.field_type === 27){//用户手动输入
|
|
|
|
|
this.getFormList()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -122,11 +124,10 @@
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
resourceFormChange:function(){
|
|
|
|
|
this.attribute.props.data_source_field_id = undefined;
|
|
|
|
|
// this.attribute.props.compare_standard = 1;
|
|
|
|
|
if (this.attribute.props.data_source_form_id && this.attribute.props.data_source_form_id !== ""){
|
|
|
|
|
this.getFieldList()
|
|
|
|
|
}else{
|
|
|
|
|
this.attribute.props.data_source_field_id = undefined;
|
|
|
|
|
this.attribute.props.compare_standard = undefined;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getFieldList:function(){
|
|
|
|
@ -163,7 +164,10 @@
|
|
|
|
|
this.form_loading = false;
|
|
|
|
|
let data = result[0].data;
|
|
|
|
|
if (data.code === 2000){
|
|
|
|
|
this.formList = data.data.form_list
|
|
|
|
|
this.formList = data.data.form_list;
|
|
|
|
|
if (this.attribute.props.data_source_form_id && this.attribute.props.data_source_form_id !== ""){
|
|
|
|
|
this.getFieldList();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|