Merge remote-tracking branch 'origin/master'
This commit is contained in:
-4
@@ -46,15 +46,11 @@ public class ProjectLibraryBase implements Serializable {
|
||||
private java.lang.String studioEngineer;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String studioEngineerName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String studioEngineerEnName;
|
||||
|
||||
/**认证工程师*/
|
||||
private java.lang.String certificationEngineer;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String certificationEngineerName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String certificationEngineerEnName;
|
||||
|
||||
/**车型平台*/
|
||||
@Dict(dicCode = "vehicle_platform")
|
||||
|
||||
-7
@@ -45,25 +45,18 @@ public class ProjectRelatedPersonnel implements Serializable {
|
||||
private java.lang.String lawEngineer;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String lawEngineerName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String lawEngineerEnName;
|
||||
|
||||
|
||||
/**工程接口人*/
|
||||
@Excel(name = "工程接口人", width = 30,orderNum = "3")
|
||||
private java.lang.String engineeringInterfacePerson;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String engineeringInterfacePersonName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String engineeringInterfacePersonEnName;
|
||||
|
||||
/**认证工程师*/
|
||||
@Excel(name = "认证工程师", width = 30,orderNum = "4")
|
||||
private java.lang.String certificationEngineer;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String certificationEngineerName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String certificationEngineerEnName;
|
||||
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 50,orderNum = "5")
|
||||
|
||||
+1
-2
@@ -29,8 +29,7 @@
|
||||
plb.target_market,
|
||||
plb.project_status,
|
||||
plb.studio_engineer,
|
||||
studiouser.realname as studio_engineer_name,
|
||||
studiouser.username as studio_engineer_en_name,
|
||||
studiouser.username as studio_engineer_name,
|
||||
plb.certification_engineer,
|
||||
plb.vehicle_platform,
|
||||
plb.digital_platform,
|
||||
|
||||
-7
@@ -19,8 +19,6 @@
|
||||
prp.project_id,
|
||||
prp.duty_territory,
|
||||
prp.law_engineer,
|
||||
lawuser.username,
|
||||
enguser.username,
|
||||
prp.engineering_interface_person,
|
||||
prp.certification_engineer,
|
||||
prp.remark,
|
||||
@@ -32,11 +30,8 @@
|
||||
<select id="queryPageList" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
|
||||
SELECT
|
||||
<include refid="select_item"/>
|
||||
|
||||
FROM
|
||||
project_related_personnel AS prp
|
||||
LEFT JOIN sys_user AS lawuser ON prp.law_engineer = lawuser.id
|
||||
LEFT JOIN sys_user AS enguser ON prp.engineering_interface_person = enguser.id
|
||||
<where>
|
||||
<if test="params.projectId != null and params.projectId != ''">
|
||||
prp.project_id=#{params.projectId}
|
||||
@@ -50,8 +45,6 @@
|
||||
<include refid="select_item"/>
|
||||
FROM
|
||||
project_related_personnel AS prp
|
||||
LEFT JOIN sys_user AS lawuser ON prp.law_engineer = lawuser.id
|
||||
LEFT JOIN sys_user AS enguser ON prp.engineering_interface_person = enguser.id
|
||||
<where>
|
||||
prp.id=#{id}
|
||||
</where>
|
||||
|
||||
+15
-26
@@ -151,41 +151,30 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
for (ProjectLibraryBase projectLibraryBase:records) {
|
||||
List<SysUser> sysUsers = new ArrayList<>();
|
||||
//认证工程师多个id查询
|
||||
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
|
||||
if (CollectionUtils.isNotEmpty(certificationEngineerIdList)) {
|
||||
certificationEngineerIdList=certificationEngineerIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", certificationEngineerIdList);
|
||||
sysUsers = sysUserMapper.selectList(userqueryWrapper);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(projectLibraryBase.getCertificationEngineer())) {
|
||||
List<String> certificationEngineerIdList = Arrays.asList(projectLibraryBase.getCertificationEngineer().split(","));
|
||||
if (CollectionUtils.isNotEmpty(certificationEngineerIdList)) {
|
||||
certificationEngineerIdList = certificationEngineerIdList.stream().distinct().collect(Collectors.toList());
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", certificationEngineerIdList);
|
||||
sysUsers = sysUserMapper.selectList(userqueryWrapper);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)) {
|
||||
if (CollectionUtils.isNotEmpty(sysUsers)) {
|
||||
String certificationEngineerId = projectLibraryBase.getCertificationEngineer();
|
||||
String certificationEngineerName=null;
|
||||
String certificationEngineerEnName=null;
|
||||
StringBuilder certificationName=new StringBuilder();
|
||||
|
||||
for (String data:certificationEngineerIdList){
|
||||
String certificationEngineerName = null;
|
||||
|
||||
for (String data : certificationEngineerIdList) {
|
||||
if (StringUtils.isNotEmpty(certificationEngineerId)) {
|
||||
certificationEngineerName = sysUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getRealname()).collect(Collectors.joining(","));
|
||||
certificationEngineerEnName = sysUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
|
||||
}
|
||||
|
||||
certificationName.append(certificationEngineerName).append("(").append(certificationEngineerEnName).append(")").append(" ");
|
||||
|
||||
}
|
||||
projectLibraryBase.setCertificationEngineerName(certificationName.toString());
|
||||
|
||||
projectLibraryBase.setCertificationEngineerName(certificationEngineerName);
|
||||
}
|
||||
StringBuilder studioCnName= new StringBuilder(projectLibraryBase.getStudioEngineerName());
|
||||
StringBuilder studioEnName= new StringBuilder(projectLibraryBase.getStudioEngineerEnName());
|
||||
String studioName = studioCnName.append("(").append(studioEnName).append(")").toString();
|
||||
projectLibraryBase.setStudioEngineerName(studioName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-24
@@ -157,21 +157,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
if(CollectionUtils.isNotEmpty(lawEngineerUsers)) {
|
||||
String lawEngineerId = projectRelatedPersonnel.getLawEngineer();
|
||||
String lawEngineerName = null;
|
||||
String lawEngineerEnName = null;
|
||||
StringBuilder certificationName = new StringBuilder();
|
||||
|
||||
for (String data : lawEngineerIdList) {
|
||||
if (StringUtils.isNotEmpty(lawEngineerId)) {
|
||||
lawEngineerName = lawEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getRealname()).collect(Collectors.joining(","));
|
||||
lawEngineerEnName = lawEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
|
||||
certificationName.append(lawEngineerName).append("(").append(lawEngineerEnName).append(")").append(" ");
|
||||
|
||||
}
|
||||
projectRelatedPersonnel.setLawEngineerName(certificationName.toString());
|
||||
projectRelatedPersonnel.setLawEngineerName(lawEngineerName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,21 +181,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
if (CollectionUtils.isNotEmpty(engineeringInterfacePersonUsers)) {
|
||||
String engineeringInterfacePersonId = projectRelatedPersonnel.getEngineeringInterfacePerson();
|
||||
String engineeringInterfacePersonName = null;
|
||||
String engineeringInterfacePersonEnName = null;
|
||||
StringBuilder certificationName = new StringBuilder();
|
||||
|
||||
for (String data : engineeringInterfacePersonIdList) {
|
||||
if (StringUtils.isNotEmpty(engineeringInterfacePersonId)) {
|
||||
engineeringInterfacePersonName = engineeringInterfacePersonUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getRealname()).collect(Collectors.joining(","));
|
||||
engineeringInterfacePersonEnName = engineeringInterfacePersonUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
|
||||
certificationName.append(engineeringInterfacePersonName).append("(").append(engineeringInterfacePersonEnName).append(")").append(" ");
|
||||
|
||||
}
|
||||
projectRelatedPersonnel.setEngineeringInterfacePersonName(certificationName.toString());
|
||||
projectRelatedPersonnel.setEngineeringInterfacePersonName(engineeringInterfacePersonName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,21 +205,14 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
|
||||
if(CollectionUtils.isNotEmpty(certificationEngineerUsers)) {
|
||||
String certificationEngineerId = projectRelatedPersonnel.getCertificationEngineer();
|
||||
String certificationEngineerName = null;
|
||||
String certificationEngineerEnName = null;
|
||||
StringBuilder certificationName = new StringBuilder();
|
||||
|
||||
for (String data : certificationEngineerIdList) {
|
||||
if (StringUtils.isNotEmpty(certificationEngineerId)) {
|
||||
certificationEngineerName = certificationEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getRealname()).collect(Collectors.joining(","));
|
||||
certificationEngineerEnName = certificationEngineerUsers.stream().filter(e -> data.equals(e.getId()))
|
||||
.map(sysUser -> sysUser.getUsername()).collect(Collectors.joining(","));
|
||||
}
|
||||
|
||||
certificationName.append(certificationEngineerName).append("(").append(certificationEngineerEnName).append(")").append(" ");
|
||||
|
||||
}
|
||||
projectRelatedPersonnel.setCertificationEngineerName(certificationName.toString());
|
||||
projectRelatedPersonnel.setCertificationEngineerName(certificationEngineerName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -682,4 +682,7 @@ module.exports = {
|
||||
taskList:'Task list',
|
||||
TaskParameterCollection:'Task parameter collection',
|
||||
nonConformance:'Non conformance',
|
||||
deadlineForConfirmationOfDesignCompliance:'Deadline for confirmation of design compliance',
|
||||
prehomoConfirmationDeadline:'Prehomo confirmation deadline',
|
||||
verificationComplianceConfirmationDeadline:'Verification compliance confirmation deadline',
|
||||
}
|
||||
@@ -686,4 +686,7 @@ module.exports = {
|
||||
taskList:'任务清单',
|
||||
TaskParameterCollection:'任务参数收集',
|
||||
nonConformance:'未符合项',
|
||||
deadlineForConfirmationOfDesignCompliance:'设计符合性确认截止时间',
|
||||
prehomoConfirmationDeadline:'PreHomo确认截止时间',
|
||||
verificationComplianceConfirmationDeadline:'验证符合性确认截止时间',
|
||||
}
|
||||
@@ -1366,4 +1366,9 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 32px;
|
||||
height: 32px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1252,7 +1252,7 @@
|
||||
}
|
||||
.ant-tree-title{
|
||||
span{
|
||||
display: block;
|
||||
//display: block;
|
||||
width: auto;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
@@ -1263,7 +1263,7 @@
|
||||
.ant-tree-child-tree{
|
||||
.ant-tree-title{
|
||||
span{
|
||||
display: block;
|
||||
//display: block;
|
||||
width: auto;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<!-- <j-form-container :disabled="formDisabled">-->
|
||||
<div class="form-tag">
|
||||
<!-- <j-form-container :disabled="formDisabled">-->
|
||||
<div class="form-tag">
|
||||
<a-form>
|
||||
<a-form-model
|
||||
class="tag-content"
|
||||
@@ -11,498 +11,492 @@
|
||||
:label-col="labelCol"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-row>
|
||||
<p class="tag-info">{{$t('essentialInformation')}}</p>
|
||||
<a-divider dashed />
|
||||
<!-- 所属模块-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('Module')" prop="isModel">
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.isModel" dictCode="module" :placeholder="$t('PleaseSelectModule')" />-->
|
||||
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel" @change="handleChange" :disabled="disableEdit">
|
||||
<a-select-option :key="'1'" :value="'1'">
|
||||
{{$t('DocumentLibrary')}}
|
||||
</a-select-option>
|
||||
<a-select-option :key="'0'" :value="'0'">
|
||||
{{$t('DocumentSplitting')}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeName')" prop="dbFieldTxt">
|
||||
<a-input v-model="form.dbFieldTxt" :placeholder="$t('PleaseEnterPropertyName')" :maxLength="120" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 英文名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('enName')" prop="dbFieldEnName">
|
||||
<a-input v-model="form.dbFieldEnName" :placeholder="$t('PleaseEnterYourEnglishName')" :maxLength="120" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性类型-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" >
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" :disabled="disabledEdit" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
<a-form-model-item :label="$t('OptionContent')" prop="dictId">
|
||||
<template>
|
||||
<a-select :placeholder="$t('PleaseSelectOptionContent')" v-model="form.dictId" @change="handleChange">
|
||||
<a-select-option v-for="(item,index) in contentOption" :key="item.id" :value="item.id">
|
||||
{{item.dictName}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.dictName" dictCode="" placeholder="请选择选项内容" />-->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isLength">
|
||||
<a-form-model-item :label="$t('FieldLength')" prop="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('PleaseEnterFieldLength')" style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('Required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn" :placeholder="$t('selectWhetherRequired')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<p class="tag-info">{{submitKey == 1 ? $t('DocumentLibraryModuleDisplay'):$t('documentSplitDisplay')}}</p>
|
||||
<a-divider dashed />
|
||||
<a-col :span="24">
|
||||
<!-- 文档库列表展示-->
|
||||
<a-form-model-item :label="$t('DocumentLibraryListDisplay')" prop="isShowList" v-if="submitKey == 1">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
<a-row>
|
||||
<p class="tag-info">{{$t('essentialInformation')}}</p>
|
||||
<a-divider dashed />
|
||||
<!-- 所属模块-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('Module')" prop="isModel">
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.isModel" dictCode="module" :placeholder="$t('PleaseSelectModule')" />-->
|
||||
<a-select :placeholder="$t('PleaseSelectModule')" v-model="form.isModel" @change="handleChange" :disabled="disableEdit">
|
||||
<a-select-option :key="'1'" :value="'1'">
|
||||
{{$t('DocumentLibrary')}}
|
||||
</a-select-option>
|
||||
<a-select-option :key="'0'" :value="'0'">
|
||||
{{$t('DocumentSplitting')}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeName')" prop="dbFieldTxt">
|
||||
<a-input v-model="form.dbFieldTxt" :placeholder="$t('PleaseEnterPropertyName')" :maxLength="120" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 英文名称-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('enName')" prop="dbFieldEnName">
|
||||
<a-input v-model="form.dbFieldEnName" :placeholder="$t('PleaseEnterYourEnglishName')" :maxLength="120" ></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 属性类型-->
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('AttributeType')" prop="fieldShowType" >
|
||||
<j-dict-select-tag type="list" v-model="form.fieldShowType" dictCode="field_show_type" :placeholder="$t('PleaseSelectAttributeType')" :disabled="disabledEdit" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isTagContent">
|
||||
<a-form-model-item :label="$t('OptionContent')" prop="dictId">
|
||||
<template>
|
||||
<a-select :placeholder="$t('PleaseSelectOptionContent')" v-model="form.dictId" @change="handleChange">
|
||||
<a-select-option v-for="(item,index) in contentOption" :key="item.id" :value="item.id">
|
||||
{{item.dictName}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.dictName" dictCode="" placeholder="请选择选项内容" />-->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isLength">
|
||||
<a-form-model-item :label="$t('FieldLength')" prop="dbLength">
|
||||
<a-input-number v-model="form.dbLength" :min="1" :max="200" :placeholder="$t('PleaseEnterFieldLength')" style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('DisplayOrder')" prop="orderNum">
|
||||
<a-input-number v-model="form.orderNum" :placeholder="$t('PleaseEnterDisplayOrder')" style="width: 100%" :min="1" :formatter="limitNumber" :parser="limitNumber" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('Required')" prop="fieldMustInput">
|
||||
<j-dict-select-tag type="list" v-model="form.fieldMustInput" dictCode="yn" :placeholder="$t('selectWhetherRequired')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<p class="tag-info">{{submitKey == 1?$t('DocumentLibraryModuleDisplay'):$t('documentSplitDisplay')}}</p>
|
||||
<a-divider dashed />
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :label="$t('DocumentLibraryListDisplay')" prop="isShowList" v-if="submitKey == 1">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
|
||||
</a-form-model-item>
|
||||
<!-- 文档拆分列表展示-->
|
||||
<a-form-model-item :label="$t('documentSplitList')" prop="isShowList" v-if="submitKey == 2">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<!-- 展示区域-->
|
||||
<a-form-model-item :label="$t('DisplayArea')" prop="showArea">
|
||||
<a-select :placeholder="$t('SelectDisplayArea')" v-model="form.showArea" @change="handleChange">
|
||||
<a-select-option v-for="(item,index) in areaOptions" :key="item.id" :value="item.id">
|
||||
{{item.showArea}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.showArea" dictCode="" placeholder="请选择展示区域" />-->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isSearch">
|
||||
<a-form-model-item :label="$t('Search')" prop="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn" :placeholder="$t('SelectWhetherToSearch')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :label="$t('documentSplitList')" prop="isShowList" v-if="submitKey == 2">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowList" dictCode="yn"
|
||||
:placeholder="$t('selectDisplayList')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<a-form-model-item :label="$t('DisplayArea')" prop="showArea">
|
||||
<a-select :placeholder="$t('SelectDisplayArea')" v-model="form.showArea" @change="handleChange">
|
||||
<a-select-option v-for="(item,index) in areaOptions" :key="item.id" :value="item.id">
|
||||
{{item.showArea}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- <j-dict-select-tag type="list" v-model="form.showArea" dictCode="" placeholder="请选择展示区域" />-->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isSearch">
|
||||
<a-form-model-item :label="$t('Search')" prop="isQuery">
|
||||
<j-dict-select-tag type="list" v-model="form.isQuery" dictCode="yn" :placeholder="$t('SelectWhetherToSearch')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
|
||||
<p class="tag-info" v-if="moduleShow">{{$t('DisplayOtherModules')}}</p>
|
||||
<a-divider dashed v-if="moduleShow" />
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<a-form-model-item :label="$t('RegulationsListDisplay')" prop="isShowLawsList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn" :placeholder="$t('selectDisplayListRegulations')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<a-form-model-item :label="$t('SearchCenterDisplay')" prop="isShowSearch">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn" :placeholder="$t('selectSearchCenterDisplayed')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">-->
|
||||
<!-- <a-button @click="submitForm">提 交</a-button>-->
|
||||
<!-- </a-col>-->
|
||||
</a-row>
|
||||
<p class="tag-info" v-if="moduleShow">{{$t('DisplayOtherModules')}}</p>
|
||||
<a-divider dashed v-if="moduleShow" />
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<a-form-model-item :label="$t('RegulationsListDisplay')" prop="isShowLawsList">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowLawsList" dictCode="yn" :placeholder="$t('selectDisplayListRegulations')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="moduleShow">
|
||||
<a-form-model-item :label="$t('SearchCenterDisplay')" prop="isShowSearch">
|
||||
<j-dict-select-tag type="list" v-model="form.isShowSearch" dictCode="yn" :placeholder="$t('selectSearchCenterDisplayed')" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">-->
|
||||
<!-- <a-button @click="submitForm">提 交</a-button>-->
|
||||
<!-- </a-col>-->
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- </j-form-container>-->
|
||||
</div>
|
||||
<!-- </j-form-container>-->
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { httpAction, getAction, postAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
import { httpAction, getAction, postAction } from '@/api/manage'
|
||||
import pick from 'lodash.pick'
|
||||
import { validateDuplicateValue } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'TagForm',
|
||||
components: {
|
||||
export default {
|
||||
name: 'TagForm',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
//流程表单data
|
||||
formData: {
|
||||
type: Object,
|
||||
default: ()=>{},
|
||||
required: false
|
||||
},
|
||||
props: {
|
||||
//流程表单data
|
||||
formData: {
|
||||
type: Object,
|
||||
default: ()=>{},
|
||||
required: false
|
||||
//表单模式:true流程表单 false普通表单
|
||||
formBpm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
drawerVisible:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
editData:{
|
||||
type: Object,
|
||||
default:{}
|
||||
},
|
||||
editId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
submitEdit:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
disableEdit:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
submitKey:{
|
||||
type:String,
|
||||
default:'1'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: {},
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
},
|
||||
//表单模式:true流程表单 false普通表单
|
||||
formBpm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
//表单禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('PleaseSelectModule'),trigger: 'change'},
|
||||
],
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('PleaseEnterPropertyName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldEnName:[
|
||||
{ max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('PleaseSelectAttributeType'),trigger: 'change'},
|
||||
],
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('PleaseSelectOptionContent'),trigger: 'change'},
|
||||
],
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('PleaseEnterFieldLength'),trigger: 'blur'},
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||
],
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('selectWhetherRequired'),trigger: 'change'},
|
||||
],
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('selectDisplayList'),trigger: 'change'},
|
||||
],
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('SelectDisplayArea'),trigger: 'change'},
|
||||
],
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('SelectWhetherToSearch'),trigger: 'change'},
|
||||
],
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('selectDisplayListRegulations'),trigger: 'change'},
|
||||
],
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('selectSearchCenterDisplayed'),trigger: 'change'},
|
||||
],
|
||||
},
|
||||
drawerVisible:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
addVisible:false,
|
||||
url: {
|
||||
add: "tag/onlCgformTag/add",
|
||||
edit: "tag/onlCgformTag/edit",
|
||||
queryById: "tag/onlCgformTag/queryById"
|
||||
},
|
||||
editData:{
|
||||
type: Object,
|
||||
default:{}
|
||||
},
|
||||
editId:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
submitEdit:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
disableEdit:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
submitKey:{
|
||||
type:String,
|
||||
default:'1'
|
||||
//展示区域选项内容
|
||||
areaOptions:[],
|
||||
//选项内容选项
|
||||
contentOption:[],
|
||||
contentFlag:3,
|
||||
contentOption1:[],
|
||||
contentOption2:[],
|
||||
isTagContent:false,
|
||||
isSearch:true,
|
||||
isLength:true,
|
||||
flag:false, //表单提交标识
|
||||
disabledEdit:false,
|
||||
moduleShow:true
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.fieldShowType'(val){
|
||||
// this.contentFlag=val
|
||||
if(val==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(val==3||val==4){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
}
|
||||
if(val==7){
|
||||
this.isSearch=false
|
||||
this.form.isQuery=0
|
||||
}else{
|
||||
this.isSearch=true
|
||||
}
|
||||
if(val==1||val==8||val==9||val==10||val==11||val=='sel_user'){
|
||||
this.isLength=true
|
||||
}else{
|
||||
this.isLength=false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
form: {},
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
isModel: [
|
||||
{ required: true, message: this.$t('PleaseSelectModule'),trigger: 'change'},
|
||||
],
|
||||
dbFieldTxt: [
|
||||
{ required: true, message: this.$t('PleaseEnterPropertyName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldName: [
|
||||
{ required: true, message: this.$t('PleaseEnterYourEnglishName'),trigger: 'blur'},
|
||||
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
dbFieldEnName:[
|
||||
{ max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
|
||||
],
|
||||
fieldShowType: [
|
||||
{ required: true, message: this.$t('PleaseSelectAttributeType'),trigger: 'change'},
|
||||
],
|
||||
dictId: [
|
||||
{ required: true, message: this.$t('PleaseSelectOptionContent'),trigger: 'change'},
|
||||
],
|
||||
dbLength: [
|
||||
{ required: true, message: this.$t('PleaseEnterFieldLength'),trigger: 'blur'},
|
||||
],
|
||||
orderNum: [
|
||||
{ required: true, message: this.$t('PleaseEnterDisplayOrder'),trigger: 'blur'},
|
||||
],
|
||||
fieldMustInput: [
|
||||
{ required: true, message: this.$t('selectWhetherRequired'),trigger: 'change'},
|
||||
],
|
||||
isShowList: [
|
||||
{ required: true, message: this.$t('selectDisplayList'),trigger: 'change'},
|
||||
],
|
||||
showArea: [
|
||||
{ required: true, message: this.$t('SelectDisplayArea'),trigger: 'change'},
|
||||
],
|
||||
isQuery: [
|
||||
{ required: true, message: this.$t('SelectWhetherToSearch'),trigger: 'change'},
|
||||
],
|
||||
isShowLawsList: [
|
||||
{ required: true, message: this.$t('selectDisplayListRegulations'),trigger: 'change'},
|
||||
],
|
||||
isShowSearch: [
|
||||
{ required: true, message: this.$t('selectSearchCenterDisplayed'),trigger: 'change'},
|
||||
],
|
||||
},
|
||||
addVisible:false,
|
||||
url: {
|
||||
add: "tag/onlCgformTag/add",
|
||||
edit: "tag/onlCgformTag/edit",
|
||||
queryById: "tag/onlCgformTag/queryById"
|
||||
},
|
||||
//展示区域选项内容
|
||||
areaOptions:[],
|
||||
//选项内容选项
|
||||
contentOption:[],
|
||||
contentFlag:3,
|
||||
contentOption1:[],
|
||||
contentOption2:[],
|
||||
isTagContent:false,
|
||||
isSearch:true,
|
||||
isLength:true,
|
||||
flag:false, //表单提交标识
|
||||
disabledEdit:false,
|
||||
moduleShow:true
|
||||
}
|
||||
submitEdit(){
|
||||
|
||||
},
|
||||
watch:{
|
||||
'form.fieldShowType'(val){
|
||||
// this.contentFlag=val
|
||||
if(val==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(val==3||val==4){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
}
|
||||
if(val==7){
|
||||
this.isSearch=false
|
||||
this.form.isQuery=0
|
||||
}else{
|
||||
this.isSearch=true
|
||||
}
|
||||
if(val==1||val==8||val==9||val==10||val==11||val=='sel_user'){
|
||||
this.isLength=true
|
||||
}else{
|
||||
this.isLength=false
|
||||
}
|
||||
},
|
||||
submitEdit(){
|
||||
disableEdit(){
|
||||
|
||||
},
|
||||
disableEdit(){
|
||||
|
||||
},
|
||||
'form.isModel'(val){
|
||||
console.log(form.isModel,'form.isModelform.isModel')
|
||||
console.log('val',val)
|
||||
if(val=='1'){
|
||||
this.moduleShow=true
|
||||
}else if(val=='0'){
|
||||
this.moduleShow=false
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
changeType(val){
|
||||
// console.log('changtType',val)
|
||||
},
|
||||
formDisabled(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return false
|
||||
}
|
||||
'form.isModel'(val){
|
||||
console.log('val',val)
|
||||
if(val=='1'){
|
||||
this.moduleShow=true
|
||||
}else if(val=='0'){
|
||||
this.moduleShow=false
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
changeType(val){
|
||||
// console.log('changtType',val)
|
||||
},
|
||||
formDisabled(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
return this.disabled
|
||||
},
|
||||
showFlowSubmitButton(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return true
|
||||
}
|
||||
return this.disabled
|
||||
},
|
||||
showFlowSubmitButton(){
|
||||
if(this.formBpm===true){
|
||||
if(this.formData.disabled===false){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
//如果是流程中表单,则需要加载流程表单data
|
||||
this.showFlowData();
|
||||
},
|
||||
mounted() {
|
||||
// console.log('disableEdit',this.disableEdit)
|
||||
this.loadContent()
|
||||
this.loadShowArea()
|
||||
// console.log('edit',this.submitEdit)
|
||||
if(this.submitEdit==='add'){
|
||||
if(this.submitKey==='1'){
|
||||
this.form.isModel='1'
|
||||
}else if(this.submitKey==='2'){
|
||||
this.form.isModel='0'
|
||||
}
|
||||
this.disabledEdit=false
|
||||
}else if(this.submitEdit==='edit'){
|
||||
this.disabledEdit=true
|
||||
this.form={...this.editData}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取选项内容
|
||||
loadContent(){
|
||||
let params = {};
|
||||
getAction(`sys/dict/queryDictName`,params).then((res)=>{
|
||||
if(res.success){
|
||||
let data=[...res.result]
|
||||
this.contentOption1=[]
|
||||
this.contentOption2=[]
|
||||
data.map(res=>{
|
||||
if(res.attributeType=='1'){
|
||||
this.contentOption1.push(res)
|
||||
}else if(res.attributeType=='2'){
|
||||
this.contentOption2.push(res)
|
||||
}
|
||||
})
|
||||
if(this.form.fieldShowType==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(this.form.fieldShowType==3||this.form.fieldShowType=='4'){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
});
|
||||
},
|
||||
created () {
|
||||
//如果是流程中表单,则需要加载流程表单data
|
||||
this.showFlowData();
|
||||
},
|
||||
mounted() {
|
||||
// console.log('disableEdit',this.disableEdit)
|
||||
this.loadContent()
|
||||
this.loadShowArea()
|
||||
// console.log('edit',this.submitEdit)
|
||||
if(this.submitEdit==='add'){
|
||||
console.log(this.submitKey,'this.submitKeythis.submitKey')
|
||||
if(this.submitKey==='1'){
|
||||
console.log(this.submitKey,'this.submitKeythis.submitKey')
|
||||
this.form.isModel='1'
|
||||
}else if(this.submitKey==='2'){
|
||||
this.form.isModel='0'
|
||||
//获取展示区域
|
||||
loadShowArea(){
|
||||
let params = {};
|
||||
getAction(`tag/onlCgformArea/queryShowArea`,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.areaOptions=res.result
|
||||
}
|
||||
this.disabledEdit=false
|
||||
}else if(this.submitEdit==='edit'){
|
||||
this.disabledEdit=true
|
||||
this.form={...this.editData}
|
||||
});
|
||||
},
|
||||
add () {
|
||||
this.edit({});
|
||||
|
||||
},
|
||||
edit (record) {
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
// this.form.setFieldsValue(pick(this.model,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowList','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
showFlowData(){
|
||||
if(this.formBpm === true){
|
||||
let params = {id:this.formData.dataId};
|
||||
getAction(this.url.queryById,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.edit (res.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取选项内容
|
||||
loadContent(){
|
||||
let params = {};
|
||||
getAction(`sys/dict/queryDictName`,params).then((res)=>{
|
||||
if(res.success){
|
||||
let data=[...res.result]
|
||||
this.contentOption1=[]
|
||||
this.contentOption2=[]
|
||||
data.map(res=>{
|
||||
if(res.attributeType=='1'){
|
||||
this.contentOption1.push(res)
|
||||
}else if(res.attributeType=='2'){
|
||||
this.contentOption2.push(res)
|
||||
submitForm () {
|
||||
// const that = this;
|
||||
// 触发表单验证
|
||||
// console.log(this.$refs.tagform)
|
||||
this.$refs.tagEditForm.validate((valid)=>{
|
||||
// console.log('valid',valid)
|
||||
if (valid) {
|
||||
if(!this.flag){
|
||||
this.flag=true
|
||||
this.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
// console.log('this.editId',this.editId)
|
||||
if(this.submitEdit=='add'){
|
||||
httpurl+=this.url.add;
|
||||
method = 'post';
|
||||
this.form.id=''
|
||||
this.form.isReadOnly=0
|
||||
}else if(this.submitEdit=='edit'){
|
||||
httpurl+=this.url.edit;
|
||||
method = 'put';
|
||||
this.form.id=this.editId
|
||||
|
||||
}
|
||||
this.form.dbIsKey='0'
|
||||
this.form.dbIsNull='1'
|
||||
this.form.dbPointLength='0'
|
||||
this.form.isShowForm='1'
|
||||
this.form.dbFieldName=this.form.dbFieldTxt
|
||||
this.contentOption.forEach(item=>{
|
||||
if(item.id==this.form.dictId){
|
||||
// console.log('11111')
|
||||
this.form.dictField=item.dictCode
|
||||
this.form.dictText=item.dictName
|
||||
}
|
||||
})
|
||||
if(this.form.fieldShowType==0){
|
||||
this.contentOption=[...this.contentOption2]
|
||||
this.isTagContent=true
|
||||
}else if(this.form.fieldShowType==3||this.form.fieldShowType=='4'){
|
||||
this.contentOption=[...this.contentOption1]
|
||||
this.isTagContent=true
|
||||
}else{
|
||||
this.isTagContent=false
|
||||
// console.log('form',this.form)
|
||||
console.log('model',this.form.isModel)
|
||||
let onlineId=''
|
||||
let url=''
|
||||
if(this.form.isModel=='1'){
|
||||
onlineId='48308196e7b04761b533dc31bc899707'
|
||||
}else if(this.form.isModel=='0'){
|
||||
onlineId='c998a34ea4b84089932197ed0705c757'
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取展示区域
|
||||
loadShowArea(){
|
||||
let params = {};
|
||||
getAction(`tag/onlCgformArea/queryShowArea`,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.areaOptions=res.result
|
||||
}
|
||||
});
|
||||
},
|
||||
add () {
|
||||
this.edit({});
|
||||
|
||||
},
|
||||
edit (record) {
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
// this.form.setFieldsValue(pick(this.model,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowList','showArea','isQuery','isShowLawsList','isShowSearch'))
|
||||
})
|
||||
},
|
||||
//渲染流程表单数据
|
||||
showFlowData(){
|
||||
if(this.formBpm === true){
|
||||
let params = {id:this.formData.dataId};
|
||||
getAction(this.url.queryById,params).then((res)=>{
|
||||
if(res.success){
|
||||
this.edit (res.result);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
submitForm () {
|
||||
// const that = this;
|
||||
// 触发表单验证
|
||||
// console.log(this.$refs.tagform)
|
||||
this.$refs.tagEditForm.validate((valid)=>{
|
||||
// console.log('valid',valid)
|
||||
if (valid) {
|
||||
if(!this.flag){
|
||||
this.flag=true
|
||||
this.confirmLoading = true;
|
||||
let httpurl = '';
|
||||
let method = '';
|
||||
// console.log('this.editId',this.editId)
|
||||
if(this.submitEdit=='add'){
|
||||
httpurl+=this.url.add;
|
||||
method = 'post';
|
||||
this.form.id=''
|
||||
this.form.isReadOnly=0
|
||||
}else if(this.submitEdit=='edit'){
|
||||
httpurl+=this.url.edit;
|
||||
method = 'put';
|
||||
this.form.id=this.editId
|
||||
|
||||
}
|
||||
this.form.dbIsKey='0'
|
||||
this.form.dbIsNull='1'
|
||||
this.form.dbPointLength='0'
|
||||
this.form.isShowForm='1'
|
||||
this.form.dbFieldName=this.form.dbFieldTxt
|
||||
this.contentOption.forEach(item=>{
|
||||
if(item.id==this.form.dictId){
|
||||
// console.log('11111')
|
||||
this.form.dictField=item.dictCode
|
||||
this.form.dictText=item.dictName
|
||||
}
|
||||
})
|
||||
// console.log('form',this.form)
|
||||
console.log('model',this.form.isModel)
|
||||
let onlineId=''
|
||||
let url=''
|
||||
if(this.form.isModel=='1'){
|
||||
onlineId='48308196e7b04761b533dc31bc899707'
|
||||
}else if(this.form.isModel=='0'){
|
||||
onlineId='c998a34ea4b84089932197ed0705c757'
|
||||
}
|
||||
httpAction(httpurl,this.form,method).then((res)=>{
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
postAction(`online/cgform/api/doDbSynch/${onlineId}/normal
|
||||
httpAction(httpurl,this.form,method).then((res)=>{
|
||||
if(res.success){
|
||||
this.$message.success(this.$t('OperationSuccessful'));
|
||||
postAction(`online/cgform/api/doDbSynch/${onlineId}/normal
|
||||
`,{}).then(res=>{
|
||||
})
|
||||
this.$emit('ok',false);
|
||||
}else{
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false;
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$emit('ok',false);
|
||||
}else{
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false;
|
||||
this.flag=false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
popupCallback(row){
|
||||
this.form.setFieldsValue(pick(row,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowForm','areaId','isQuery','isShowLawsList','isShowSearch'))
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
handleChange(value) {
|
||||
// console.log(`selected ${value}`);
|
||||
},
|
||||
}
|
||||
})
|
||||
},
|
||||
popupCallback(row){
|
||||
this.form.setFieldsValue(pick(row,'isModel','dbFieldTxt','dbFieldName','fieldShowType','dictName','dbLength','orderNum','fieldMustInput','isShowForm','areaId','isQuery','isShowLawsList','isShowSearch'))
|
||||
},
|
||||
//正则替换小数点
|
||||
limitNumber(value) {
|
||||
if (typeof value === 'string') {
|
||||
return !isNaN(Number(value)) ? value.replace(/\./g, '') : 0
|
||||
} else if (typeof value === 'number') {
|
||||
return !isNaN(value) ? String(value).replace(/\./g, '') : 0
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
handleChange(value) {
|
||||
// console.log(`selected ${value}`);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.form-tag{
|
||||
.tag-content{
|
||||
}
|
||||
}
|
||||
.tag-info{
|
||||
margin-left: 30px;
|
||||
.form-tag{
|
||||
.tag-content{
|
||||
}
|
||||
}
|
||||
.tag-info{
|
||||
margin-left: 30px;
|
||||
}
|
||||
</style>
|
||||
<style lang="less">
|
||||
.tag-content{
|
||||
.ant-select-selection-selected-value{
|
||||
color:rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
.tag-content{
|
||||
.ant-select-selection-selected-value{
|
||||
color:rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<a-modal
|
||||
:title="$t('batSetting')"
|
||||
:width="900"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('implementationCategory')">{{$t('implementationCategory')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.implementType"
|
||||
@input="handleInput('implementType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('implementationCategory')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="implement_type"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.attestationType"
|
||||
@input="handleInput('attestationType')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationType')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="attestation_type"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.attestationRank"
|
||||
@input="handleInput('attestationRank')"
|
||||
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="attestation_rank"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||
@input="handleInput('dutyTerritory')"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" dictCode="duty_territory"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('deadlineForConfirmationOfDesignCompliance')">
|
||||
{{$t('deadlineForConfirmationOfDesignCompliance')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('deadlineForConfirmationOfDesignCompliance')"
|
||||
@change="dateChange({db_field_name:'designDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.designDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('prehomoConfirmationDeadline')">
|
||||
{{$t('prehomoConfirmationDeadline')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('prehomoConfirmationDeadline')"
|
||||
@change="dateChange({db_field_name:'prehomoDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.prehomoDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('verificationComplianceConfirmationDeadline')">
|
||||
{{$t('verificationComplianceConfirmationDeadline')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+$t('verificationComplianceConfirmationDeadline')"
|
||||
@change="dateChange({db_field_name:'verifyDueDate'})"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline.verifyDueDate"
|
||||
:disabled="false"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {},
|
||||
ids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.ids = data || []
|
||||
this.formInline = {}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.formAdd .ant-form-item-label {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.formAdd .ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
width: calc(100% - 130px);
|
||||
}
|
||||
|
||||
/*.formAdd .ant-form-item {*/
|
||||
/* margin-bottom: 20px;*/
|
||||
/*}*/
|
||||
|
||||
.itemModel .ant-form-item-control-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--single {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection__rendered {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-calendar-picker-input {
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.box-input .ant-input-number-input-wrap {
|
||||
line-height: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
@@ -163,6 +163,7 @@
|
||||
</div>
|
||||
<listAddModel :url="url" @addModelList="addModelList" ref="addModelRef"/>
|
||||
<listEditModel :url="url" @editModelList="addModelList" ref="editModelRef"/>
|
||||
<batSetting :url="url" @batSettingList="addModelList" ref="batSettingRef"/>
|
||||
<a-modal
|
||||
:title="$t('ListConfirmationDeadline')"
|
||||
:width="500"
|
||||
@@ -227,6 +228,7 @@
|
||||
import ImportFile from '@/components/ImportFile/index'
|
||||
import listAddModel from './listAddModel'
|
||||
import listEditModel from './listEditModel'
|
||||
import batSetting from './batSetting'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -237,7 +239,8 @@
|
||||
components: {
|
||||
ImportFile,
|
||||
listAddModel,
|
||||
listEditModel
|
||||
listEditModel,
|
||||
batSetting
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -485,7 +488,8 @@
|
||||
deleteOne: '/project/projectLawsInventoryEO/delete',
|
||||
updateStatusBatch: '/project/projectLawsInventoryEO/updateStatusBatch',
|
||||
matchRelevantPeople: '/project/projectLawsInventoryEO/matchRelevantPeople',
|
||||
queryPersonByProject: '/project/projectRelatedPersonnel/queryPersonByProjectId'
|
||||
queryPersonByProject: '/project/projectRelatedPersonnel/queryPersonByProjectId',
|
||||
setBatch: ''
|
||||
},
|
||||
loading: false,
|
||||
dataSource: []
|
||||
@@ -512,7 +516,11 @@
|
||||
|
||||
},
|
||||
batSettingClick() {
|
||||
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
@@ -621,6 +629,7 @@
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
this.confirmLoading = false
|
||||
this.getList()
|
||||
} else {
|
||||
@@ -668,6 +677,7 @@
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
_this.confirmLoading = false
|
||||
_this.getList()
|
||||
} else {
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dutyTerritory">
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
|
||||
Reference in New Issue
Block a user