拆分详情新增
This commit is contained in:
@@ -10,300 +10,302 @@
|
||||
@close="onClose"
|
||||
width="900"
|
||||
>
|
||||
<a-form>
|
||||
<a-form-model
|
||||
class="split-content"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="splitEditForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<div v-for="(item,index) in dataList" :key="index">
|
||||
<a-spin :spinning="loading">
|
||||
<a-form>
|
||||
<a-form-model
|
||||
class="split-content"
|
||||
:model="formInline"
|
||||
:rules="rules"
|
||||
ref="splitEditForm"
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<div v-for="(item,index) in dataList" :key="index">
|
||||
|
||||
<a-col :span="12" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-if="item.field_show_type === '1' || item.field_show_type === '11'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '2'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '2'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input-number class="box-input"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :min="1" :max="99999999"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-input-number class="box-input"
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :min="1" :max="99999999"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '3'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '3'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '4'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '4'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '5'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '5'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="dateChange(item)"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"/>
|
||||
<!-- :disabledDate="disabledDate"-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="dateChange(item)"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"/>
|
||||
<!-- :disabledDate="disabledDate"-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '6'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</a-col>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '6'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-range-picker class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '7'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '7'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload(item)">
|
||||
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
|
||||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||
<!-- </span>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-button type="primary" class="button-text"
|
||||
@click="clickButtonToUpload(item)">
|
||||
{{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||
|
||||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||
<!-- </span>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '8'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '8'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-textarea
|
||||
:placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '9' || item.field_show_type == 'sel_user'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '9' || item.field_show_type == 'sel_user'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<PersonnelSelection :query="item"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<PersonnelSelection :query="item"
|
||||
:personneQuery="formInline"
|
||||
@change="PersonnelSelectionChange"
|
||||
:disabled="disabled"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '10'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="24" v-else-if="item.field_show_type === '10'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<Standardselection :query="item"
|
||||
@change="StandardselectionChange"
|
||||
:disabled="disabled"
|
||||
:standard="formInline"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<Standardselection :query="item"
|
||||
@change="StandardselectionChange"
|
||||
:disabled="disabled"
|
||||
:standard="formInline"
|
||||
v-model="formInline[item.db_field_name]"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'RADIO'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'RADIO'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('selectStatus')"
|
||||
:type="'radio'" :triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-dict-select-tag v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@input="handleInput(item.db_field_name)"
|
||||
:placeholder="$t('selectStatus')"
|
||||
:type="'radio'" :triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '0'">
|
||||
<div class="box-title-text" :title="item.db_field_txt">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === '0'">
|
||||
<div class="box-title-text" :title="item.db_field_txt">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-tree-select
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<a-tree-select
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:maxTagCount="1"
|
||||
style="width: 100%"
|
||||
:tree-data="item.tree"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'CHECKBOX'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
<a-col :span="12" v-else-if="item.field_show_type === 'CHECKBOX'">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('selectStatus')" :type="'checkbox'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('selectStatus')" :type="'checkbox'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-col>
|
||||
</div>
|
||||
</a-row>
|
||||
|
||||
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
|
||||
|
||||
<!-- 条款号-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseNo')" prop="number">-->
|
||||
<!-- <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 条款名称–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseName')" prop="name">-->
|
||||
<!-- <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 功能领域–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('functionalAreas')" prop="funArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 技术领域–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('technicalField')" prop="tecArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 信息类别–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('informationCategory')" prop="infoType">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- 内容简介-->
|
||||
<span class="con-divider">{{$t('contentValidity')}}</span>
|
||||
<a-divider dashed />
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="splitAdd('-1')">
|
||||
<a-icon type="plus" />
|
||||
{{$t('Add')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="index">
|
||||
<div class="split-row">
|
||||
<div class="row-left">
|
||||
<a-textarea v-if="item.type==='TEXT'" v-model="item.itemContent" :placeholder="$t('pleaseEnter')+$t('content')" auto-size />
|
||||
<img v-if="item.type==='IMG'" :src="item.itemContent" alt="" @click="preImg(item)">
|
||||
<div v-if="item.type==='TABLE'" v-html="item.content" class="item-table"></div>
|
||||
</div>
|
||||
<div class="row-right">
|
||||
<a-button class="row-btn-add" @click="splitAdd(index)">{{$t('Add')}}</a-button>
|
||||
<a-button @click="splitDelete">{{$t('delete')}}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
|
||||
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||
|
||||
|
||||
<!-- 条款号-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseNo')" prop="number">-->
|
||||
<!-- <a-input v-model="form.number" :placeholder="$t('pleaseEnter')+$t('clauseNo')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 条款名称–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('clauseName')" prop="name">-->
|
||||
<!-- <a-input v-model="form.name" :placeholder="$t('pleaseEnter')+$t('clauseName')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 功能领域–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('functionalAreas')" prop="funArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.funArea" dictCode="function_territory" :placeholder="$t('pleaseSelect')+$t('functionalAreas')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!--<!– 技术领域–>-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('technicalField')" prop="tecArea">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.tecArea" dictCode="technology_territory" :placeholder="$t('pleaseSelect')+$t('technicalField')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!--<!– 信息类别–>-->
|
||||
<!-- <a-row :gutter="24">-->
|
||||
<!-- <a-col :span="12">-->
|
||||
<!-- <a-form-model-item :label="$t('informationCategory')" prop="infoType">-->
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.infoType" dictCode="xxx" :placeholder="$t('pleaseSelect')+$t('informationCategory')" />-->
|
||||
<!-- </a-form-model-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<!-- 内容简介-->
|
||||
<span class="con-divider">{{$t('contentValidity')}}</span>
|
||||
<a-divider dashed />
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="splitAdd('-1')">
|
||||
<a-icon type="plus" />
|
||||
{{$t('Add')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="index">
|
||||
<div class="split-row">
|
||||
<div class="row-left">
|
||||
<a-textarea v-if="item.type==='TEXT'" v-model="item.textContent" :placeholder="$t('pleaseEnter')+$t('content')" auto-size />
|
||||
<img v-if="item.type==='IMG'" :src="item.src" alt="" @click="preImg(item)">
|
||||
<div v-if="item.type==='TABLE'" v-html="item.content" class="item-table"></div>
|
||||
</div>
|
||||
<div class="row-right">
|
||||
<a-button class="row-btn-add" @click="splitAdd(index)">{{$t('Add')}}</a-button>
|
||||
<a-button @click="splitDelete">{{$t('delete')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
<div class="split-form-footer">
|
||||
<a-button type="primary" class="footer-btn-save" @click="splitSave">{{$t('preservation')}}</a-button>
|
||||
<a-button type="primary" @click="splitCancel">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
<div class="split-form-footer">
|
||||
<a-button type="primary" class="footer-btn-save" @click="splitSave">{{$t('preservation')}}</a-button>
|
||||
<a-button type="primary" @click="splitCancel">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</a-spin>
|
||||
<!-- 图片预览-->
|
||||
<a-modal
|
||||
:title="TitlePreImg"
|
||||
@@ -383,7 +385,10 @@
|
||||
import SplitUpload from '@/components/SplitUpload/index'
|
||||
import UEditor from '@/components/ueditor/index'
|
||||
import moment from 'moment'
|
||||
import axios from 'axios'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import eventBUs from '../../../../common/event'
|
||||
// import eventBUs from '../../common/event'
|
||||
export default {
|
||||
name: 'splitAddForm',
|
||||
@@ -400,18 +405,7 @@
|
||||
titleColRow:this.$t('tableRowsColumns'),
|
||||
title:this.$t('newClause'),
|
||||
TitlePreImg:'',
|
||||
contentList:[
|
||||
{
|
||||
id:'001',
|
||||
type:'TEXT',
|
||||
textContent:'本标准规定了车辆正面碰撞时前排外侧座椅乘员保护方面的术语和定义、要求和试验方法。'
|
||||
},
|
||||
{
|
||||
id:'002',
|
||||
type:'TEXT',
|
||||
textContent:'本标准适用于M1类汽车和最大设计总质量不大于2500kg的N1类汽车,以及多用途货车。'
|
||||
}
|
||||
],
|
||||
contentList:[],
|
||||
content:{},
|
||||
selected:1,
|
||||
selectedNum:true,
|
||||
@@ -545,7 +539,6 @@
|
||||
rowCount:'', //行数
|
||||
formInline: {},
|
||||
isFormInline: false,
|
||||
rules: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
@@ -560,6 +553,9 @@
|
||||
confirmLoading: false,
|
||||
uploadName: '',
|
||||
type: 'add',
|
||||
loading:false,
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
submitFlag:false,
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -579,6 +575,22 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
infoId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
menuId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
itemId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
item:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
selected(val){
|
||||
@@ -591,9 +603,23 @@
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.addVisible
|
||||
|
||||
this.formInline=this.item
|
||||
console.log('form',this.formInline,this.item)
|
||||
this.loadData()
|
||||
},
|
||||
methods:{
|
||||
loadData(){
|
||||
this.loading=true
|
||||
getAction(`split/sarFileSplitItemsVal/getItemsValList`,{itemId:this.itemId}).then(res=>{
|
||||
if(res.success){
|
||||
this.contentList=[...res.result]
|
||||
|
||||
console.log('res',res.result)
|
||||
}
|
||||
}).finally(()=>{
|
||||
this.loading=false
|
||||
})
|
||||
},
|
||||
afterVisibleChange(){
|
||||
|
||||
},
|
||||
@@ -616,10 +642,70 @@
|
||||
},
|
||||
//保存
|
||||
splitSave(){
|
||||
console.log('formInline',this.formInline)
|
||||
// console.log('formInline',this.formInline)
|
||||
this.$refs.splitEditForm.validate(valid=>{
|
||||
if(valid){
|
||||
this.submitFlag=true
|
||||
this.confirmLoading = true
|
||||
if(this.submitFlag){
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.updateInfo
|
||||
} else {
|
||||
url = this.url.addInfo
|
||||
}
|
||||
let params = JSON.parse(JSON.stringify(this.formInline))
|
||||
// console.log('item',this.item,JSON.stringify(this.item)=="{}")
|
||||
if(JSON.stringify(this.item)=="{}"){
|
||||
params.info_id=this.infoId
|
||||
params.menu_id=this.menuId
|
||||
}
|
||||
// params.menuId=this.menuId
|
||||
params.itemValEOList=this.contentList
|
||||
// console.log('paramsformInline',params)
|
||||
|
||||
axios({
|
||||
url: url,
|
||||
method: 'post',
|
||||
data: params,
|
||||
headers: {
|
||||
'X-Access-Token':this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible=false
|
||||
// this.$emit('closeVisible',false)
|
||||
eventBUs.$emit('searchReset')
|
||||
}else{
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
}).finally(()=>{
|
||||
this.confirmLoading=false
|
||||
this.submitFlag=false
|
||||
})
|
||||
}
|
||||
|
||||
// postAction(url, params).then((res) => {
|
||||
// if (res.success) {
|
||||
// this.confirmLoading = false
|
||||
// this.$message.success(this.$t('OperationSuccessful'))
|
||||
// eventBUs.$emit('searchReset')
|
||||
// this.$emit('addFormClick')
|
||||
// } else {
|
||||
// this.confirmLoading = false
|
||||
// if (res.message.indexOf('发布日期不能大于') >= 0) {
|
||||
// this.$message.warning(res.message)
|
||||
// } else {
|
||||
// this.$message.warning(this.$t('operationFailed'))
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -638,9 +724,9 @@
|
||||
}
|
||||
for(let j=0;j<this.textNumber;j++){
|
||||
this.contentList[++this.addIndex]={
|
||||
id:'003',
|
||||
id:'',
|
||||
type:'TEXT',
|
||||
textContent:''
|
||||
itemContent:''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,7 +738,7 @@
|
||||
this.tableColVisible=true
|
||||
|
||||
}
|
||||
// console.log('conteend',this.contentList)
|
||||
console.log('conteend',this.contentList)
|
||||
},
|
||||
handleCancel(){
|
||||
this.addConVisible=false
|
||||
@@ -670,8 +756,9 @@
|
||||
if(imgs && imgs.length > 0){
|
||||
imgs.forEach(item => {
|
||||
this.contentList[++this.addIndex]={
|
||||
id:'',
|
||||
type:'IMG',
|
||||
src:item.thumbUrl
|
||||
itemContent:item.thumbUrl
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -679,7 +766,7 @@
|
||||
},
|
||||
//点击图片预览
|
||||
preImg(item){
|
||||
this.itemSrc=item.src
|
||||
this.itemSrc=item.itemContent
|
||||
this.preImgVisible=true
|
||||
},
|
||||
//关闭预览图片
|
||||
@@ -845,7 +932,7 @@
|
||||
}
|
||||
})
|
||||
this.$set(this, 'rules', rules)
|
||||
console.log(this.rules)
|
||||
// console.log('rules',this.rules)
|
||||
this.isFormInline = true
|
||||
this.confirmLoading = false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user