合并分支 'dev_mobile_20230630' 到 'master'

Dev mobile 20230630

查看合并请求 laws-nio/laws-weilai!346
This commit is contained in:
高嵩
2023-07-14 18:03:56 +08:00
39 changed files with 1819 additions and 718 deletions
@@ -666,4 +666,19 @@ INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `co
-- 认证清单表 交付物字段扩大 2023-06-21 未同步生产环境
ALTER TABLE `project_certification_inventory`
MODIFY COLUMN `deliverable` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交付物' AFTER `duty_territory`;
MODIFY COLUMN `deliverable` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交付物' AFTER `duty_territory`;
-- 法规清单 添加责任部门 2023-07-14 未同步生产环境
ALTER TABLE `auth_dummy_inventory_info`
ADD COLUMN `duty_depart` varchar(255) NULL AFTER `attestation_type`;
ALTER TABLE `dummy_inventory_info`
ADD COLUMN `duty_depart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任部门' AFTER `buss_document_library_id`;
ALTER TABLE `project_laws_inventory`
ADD COLUMN `duty_depart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任部门' AFTER `process_end_time`;
ALTER TABLE `project_certification_inventory`
ADD COLUMN `duty_depart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '责任部门' AFTER `attestation_type`;
@@ -253,7 +253,9 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
String[] fileTypeArr = {".doc", ".DOC", ".txt", ".TXT", ".docx", ".DOCX",
".xls", ".XLS", ".xlsx", ".XLSX", ".pdf", ".PDF", ".png", ".PNG",
".jfif", ".JFIF", ".pjpeg", ".PJPEG", ".jpeg", ".JPEG", ".pjp", ".PJP",
".jpg", ".JPG", ".swf", ".SWF", ".bmp", ".BMP", ".rar", ".RAR", ".zip", ".ZIP", ".ppt", ".PPT", ".pptx", ".PPTX", ".csv", ".CSV", ".gif", ".GIF"};
".jpg", ".JPG", ".swf", ".SWF", ".bmp", ".BMP", ".rar", ".RAR", ".zip",
".ZIP", ".ppt", ".PPT", ".pptx", ".PPTX", ".csv", ".CSV", ".gif", ".GIF",
".msg", ".MSG"};
boolean flag = true;
for (String fileTypeTemp : fileTypeArr) {
if (fileTypeTemp.equalsIgnoreCase(fileType)) {
@@ -262,9 +264,9 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
}
if (flag) {
if (cut.equals(CutEnum.CN.getValue())) {
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/gif/静态图片类型的文件。请重新选择文件!");
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/msg/gif/静态图片类型的文件。请重新选择文件!");
} else {
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/gif/Static image type file. Please re select the file!");
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/msg/gif/Static image type file. Please re select the file!");
}
}
}
@@ -853,4 +853,31 @@ public class SysDictController {
return result;
}
/**
* 获取责任部门列表Responsible Department
*/
@ApiOperation(value = "字典控制器-获取责任部门列表", notes = "字典控制器-获取责任部门列表")
@GetMapping(value = "/getDutyDepart")
public Result<List<SysDictItem>> getDutyDeparts() {
Result<List<SysDictItem>> result = new Result<>();
List<SysDictItem> ls = sysDictItemService.getDutyDeparts("duty_territory");
result.setSuccess(true);
result.setResult(ls);
return result;
}
/**
* 根据责任部门获取责任领域
* @return
*/
@ApiOperation(value = "字典控制器-根据责任部门获取责任领域", notes = "字典控制器-根据责任部门获取责任领域")
@GetMapping(value = "/getDutyTeryByDD")
public Result<List<SysDictItem>> getDutyTeryByDD(@RequestParam String dutyDepart) {
Result<List<SysDictItem>> result = new Result<>();
List<SysDictItem> ls = sysDictItemService.getDutyTeryByDD("duty_territory",dutyDepart);
result.setSuccess(true);
result.setResult(ls);
return result;
}
}
@@ -1,5 +1,6 @@
package com.jero.modules.system.service;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.system.entity.SysDictItem;
import com.baomidou.mybatisplus.extension.service.IService;
@@ -19,6 +20,19 @@ public interface ISysDictItemService extends IService<SysDictItem> {
public List<SysDictItem> selectItemsByDictCode(String dictCode);
/**
* 获取责任部门,去重
* @param code
* @return
*/
public List<SysDictItem> getDutyDeparts(String code);
/**
* 根据责任部门获取责任领域
* @param ddStrs
* @return
*/
public List<SysDictItem> getDutyTeryByDD(String code,String ddStrs);
/**
* 查询所有数据字典信息
* @return
@@ -23,6 +23,7 @@ public interface ISysDictService extends IService<SysDict> {
public List<DictModel> queryDictItemsByCode(String code);
public Map<String,List<DictModel>> queryAllDictItems();
public Map<String,List<DictModel>> queryAllDictItemsByCut(String cut);
@@ -2,8 +2,10 @@ package com.jero.modules.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.constant.CacheConstant;
import com.jero.common.constant.CommonConstant;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.vo.DictModel;
import com.jero.modules.enums.DictCodeEnum;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.mapper.SysDictItemMapper;
@@ -11,12 +13,10 @@ import com.jero.modules.system.service.ISysDictItemService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -44,6 +44,37 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
}
@Override
public List<SysDictItem> getDutyDeparts(String code) {
List<SysDictItem> ddList = this.selectItemsByDictCode(code);
Map<String,SysDictItem> ddMap = new HashMap<>();
for (SysDictItem dd: ddList) {
if(!ddMap.containsKey(dd.getStatNode())){
ddMap.put(dd.getStatNode(),dd);
}
}
List<SysDictItem> res = (List<SysDictItem>) ddMap.values();
Collections.sort(res, Comparator.comparingInt(SysDictItem::getSortOrder));
return res;
}
@Override
public List<SysDictItem> getDutyTeryByDD(String code, String ddStrs) {
List<SysDictItem> res = new ArrayList<>();
List<SysDictItem> ddList = this.selectItemsByDictCode(code);
List<String> list = new ArrayList<>();
if (StringUtils.isNotEmpty(ddStrs)) {
list = Arrays.asList(ddStrs.split(","));
}
for (SysDictItem dd : ddList) {
if (list.contains(dd.getStatNode())) {
res.add(dd);
}
}
Collections.sort(res, Comparator.comparingInt(SysDictItem::getSortOrder));
return res;
}
/**
* 查询所有数据字典信息
* @return
@@ -103,6 +103,9 @@ public class AuthDummyInventoryInfoEO implements Serializable {
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**交付物*/
// @Excel(name = "交付物", width = 15)
@ApiModelProperty(value = "交付物")
@@ -101,6 +101,10 @@ public class AuthDummyInventoryInfoEOEn implements Serializable {
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**交付物*/
// @Excel(name = "Deliverables", width = 15)
@ApiModelProperty(value = "交付物")
@@ -710,6 +710,9 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getDutyTerritory())){
updateAuthDummyEO.setDutyTerritory(authDummyInventoryInfoEO.getDutyTerritory());
}
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getDutyDepart())){
updateAuthDummyEO.setDutyDepart(authDummyInventoryInfoEO.getDutyDepart());
}
if(StringUtils.isNotEmpty(authDummyInventoryInfoEO.getDeliverable())){
updateAuthDummyEO.setDeliverable(authDummyInventoryInfoEO.getDeliverable());
}
@@ -1644,6 +1647,7 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
String cut = json.getString("cut");
String wvtaId = json.getString("wvtaId");
String dutyTerritory = json.getString("dutyTerritory");
String dutyDepart = json.getString("dutyDepart");
String bussDocumentLibraryId = json.getString("bussDocumentLibraryId");
String authDummyInventoryBaseId = json.getString("authDummyInventoryBaseId");
@@ -1663,6 +1667,7 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
authDummyInventoryInfoEO.setWvtaId(wvtaId);
authDummyInventoryInfoEO.setBussDocumentLibraryId(bussDocumentLibraryId);
authDummyInventoryInfoEO.setDutyTerritory(dutyTerritory);
authDummyInventoryInfoEO.setDutyDepart(dutyDepart);
authDummyInventoryInfoEO.setAuthDummyInventoryBaseId(authDummyInventoryBaseId);
authDummyInventoryInfoEOList.add(authDummyInventoryInfoEO);
}
@@ -191,6 +191,10 @@ public class DummyInventoryInfoEO implements Serializable {
@TableField(exist = false)
private java.lang.String dutyTerritoryStr;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
@@ -1360,6 +1360,9 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
// else{
// dummyInventoryInfoEOTemp.setDutyTerritory("");
// }
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getDutyDepart())){
dummyInventoryInfoEOTemp.setDutyDepart(dummyInventoryInfoEO.getDutyDepart());
}
//适用范围 shi4Yong4Fan4Wei2
if(StringUtils.isNotBlank(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2())){
dummyInventoryInfoEOTemp.setShi4Yong4Fan4Wei2(dummyInventoryInfoEO.getShi4Yong4Fan4Wei2());
@@ -106,6 +106,9 @@ public class ProjectCertificationInventoryEO implements Serializable {
@TableField(exist = false)
private String dutyTerritoryNameEn;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**工程接口人*/
@ApiModelProperty(value = "工程接口人")
private String sdt;
@@ -174,6 +174,10 @@ public class ProjectLawsInventoryEO implements Serializable {
@TableField(exist = false)
private String dutyTerritory_dictText;
/**责任部门*/
@ApiModelProperty(value = "责任部门")
private String dutyDepart;
/**法规工程师id*/
@ApiModelProperty(value = "法规工程师id")
private String regulationOwnerId;
@@ -1104,6 +1104,28 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
private String handlePhoneDesignLink(ProjectLawsInventoryEO projectLawsInventoryEO,String actiProcInstId,String taskDefinitionKey) {
String url = backUrlPhone + JumpLinkEnum.TO_DO_CENTER_PHONE.getLink();
if(!DesignComplianceFlowNodeKeyEnum.TGSC.getValue().equals(taskDefinitionKey)){
url = backUrlPhone + JumpLinkEnum.TASK_HANDING_PHONE.getLink() + "?actiProcInstId=" + actiProcInstId + "&projectTaskInventoryId=" + projectLawsInventoryEO.getId()
+ "&projectLibraryId=" + projectLawsInventoryEO.getProjectLibraryId() + "&TaskKey=" + taskDefinitionKey
+ "&TaskKeyName=" + DesignComplianceFlowNodeKeyEnum.getTextByValue(taskDefinitionKey, CutEnum.CN.getValue())
+ "&isDisplay=false&flowType=2&Sponsor=regulationOwnerName&personLiable=designDutyIdName&typeOfDeliverables=designDeliverableTypeName&deliverableTemplate=designDeliverableTemplate&DueDate=designDueDate&remarks=designRemark";
}
return URLUtil.encode(url);
}
private String handlePhoneVerifyLink(ProjectLawsInventoryEO projectLawsInventoryEO,String actiProcInstId,String taskDefinitionKey) {
String url = backUrlPhone + JumpLinkEnum.TO_DO_CENTER_PHONE.getLink();
if (!VerifyComplianceFlowNodeKeyEnum.TGSC.getValue().equals(taskDefinitionKey)) {
url = backUrlPhone + JumpLinkEnum.TASK_HANDING_PHONE.getLink() + "?actiProcInstId="+actiProcInstId+"&projectTaskInventoryId="+projectLawsInventoryEO.getId()
+"&projectLibraryId="+projectLawsInventoryEO.getProjectLibraryId()+"&TaskKey="+taskDefinitionKey
+"&TaskKeyName="+ VerifyComplianceFlowNodeKeyEnum.getTextByValue(taskDefinitionKey,CutEnum.CN.getValue())
+"&isDisplay=false&flowType=4&Sponsor=regulationOwnerName&personLiable=verifyDutyIdName&typeOfDeliverables=verifyDeliverableTypeName&deliverableTemplate=verifyDeliverableTemplate&DueDate=verifyDueDate&remarks=verifyRemark";
}
return URLUtil.encode(url);
}
private String handlePhoneDesignLink(ProjectLawsInventoryEO projectLawsInventoryEO) {
String url = backUrlPhone + JumpLinkEnum.TO_DO_CENTER_PHONE.getLink();
QueryWrapper<ProcessInfoDetailEO> processInfoDetailEOQueryWrapper = new QueryWrapper<>();
@@ -3622,12 +3644,14 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
//处理手机端飞书消息跳转
String flowType = jsonObject.getString("flowType");
String actiProcInstId = jsonObject.getString("actiProcInstId");
String taskDefinitionKey = jsonObject.getString("taskDefinitionKey");
if(StringUtils.isNotEmpty(flowType)){
if("Design".equals(flowType)){
String hrefFeishu_CN_P = this.handlePhoneDesignLink(projectLawsInventoryEO);
String hrefFeishu_CN_P = this.handlePhoneDesignLink(projectLawsInventoryEO,actiProcInstId,taskDefinitionKey);
prarams.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
}else if("Verify".equals(flowType)){
String hrefFeishu_CN_P = this.handlePhoneVerifyLink(projectLawsInventoryEO);
String hrefFeishu_CN_P = this.handlePhoneVerifyLink(projectLawsInventoryEO,actiProcInstId,taskDefinitionKey);
prarams.put("hrefFeishu_CN_P", hrefFeishu_CN_P);
}
}
@@ -4401,6 +4425,10 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
if (org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyTerritory())) {
projectLawsInventoryEOTemp.setDutyTerritory(projectLawsInventoryEO.getDutyTerritory());
}
//责任部门 DutyDepart
if (org.apache.commons.lang.StringUtils.isNotBlank(projectLawsInventoryEO.getDutyDepart())) {
projectLawsInventoryEOTemp.setDutyDepart(projectLawsInventoryEO.getDutyDepart());
}
//适用地区region
if (ObjectUtils.isNotEmpty(projectLawsInventoryEO.getRegion())) {
projectLawsInventoryEOTemp.setRegion(projectLawsInventoryEO.getRegion());
@@ -13041,6 +13069,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
params.put("id", projectLawsInventoryId);
JSONObject sendMsgJson = new JSONObject();
sendMsgJson.put("actiProcInstId",pidEo.getActiProcInstId());
sendMsgJson.put("taskDefinitionKey", taskDefinitionKey);
sendMsgJson.put("requestSource", RequestSourceEnum.WORK_FLOW.getValue());
sendMsgJson.put("operatorType", OperatorTypeEnum.SEND_MSG.getValue());
sendMsgJson.put("templateId", templateId);
@@ -13152,6 +13182,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
params.put("id", projectLawsInventoryId);
JSONObject sendMsgJson = new JSONObject();
sendMsgJson.put("actiProcInstId",pidEo.getActiProcInstId());
sendMsgJson.put("taskDefinitionKey", taskDefinitionKey);
sendMsgJson.put("requestSource", RequestSourceEnum.WORK_FLOW.getValue());
sendMsgJson.put("operatorType", OperatorTypeEnum.SEND_MSG.getValue());
sendMsgJson.put("templateId", templateId);
@@ -13,6 +13,7 @@ public enum DesignComplianceFlowNodeKeyEnum {
ZRRTJJFW("符合性确认","Compliance Confirmation","zrrtjjfw"),// "责任人提交交付物"
DEZRRTJJFW("符合性确认","Compliance Confirmation","dezrrtjjfw"),// 第二责任人提交交付物
FGGCSSH("符合性审查","Compliance Review","fggcssh"), // 法规工程师审核
TGSC("通过审查","","tgsc"), // 通过审查发消息用
// 修改交付物流程
BCTJ_ZRRBCTJFQ("补充提交","Supplementary Submission","zrrbctjfq"), // 责任人补充提交发起
@@ -13,6 +13,7 @@ public enum VerifyComplianceFlowNodeKeyEnum {
ZRRTJJFW("符合性确认","Compliance Confirm","zrrtjjfw"),// "责任人提交交付物"
DEZRRTJJFW("符合性确认","Compliance Confirm","dezrrtjjfw"),// 第二责任人提交交付物
FGGCSSH("符合性审查","Compliance Review","fggcssh"), // 法规工程师审核
TGSC("通过审查","","tgsc"), // 通过审查发消息用
// 修改交付物流程
BCTJ_ZRRBCTJFQ("补充提交","Supplementary Submission","zrrbctjfq"), // 责任人补充提交发起
+1 -1
View File
@@ -1828,7 +1828,7 @@ module.exports = {
proportion:'Proportion',
projectProgressStatistics:'Project Progress Statistics',
GRPSystemProjectProgressStatistics:'GRP system project progress statistics',
statisticalNodes:'Responsible Department',
statisticalNodes:'Duty Department',
proportionWithInTheAreaOfResponsibility:'Proportion within the area of responsibility',
contentsearch:'Content Search',
masterProject:'Master Project',
-1
View File
@@ -3833,7 +3833,6 @@ module.exports = {
proportion:'占比',
projectProgressStatistics:'项目进度统计',
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
statisticalNodes:'责任部门',
proportionWithInTheAreaOfResponsibility:'责任领域内占比',
contentsearch:'内容搜索',
masterProject:'主项目',
@@ -71,6 +71,13 @@
ellipsis: true,
width: 100
},
{
title: this.$t('DisplayOrder'),
align: 'left',
width: 100,
ellipsis: true,
dataIndex: 'sortOrder'
},
{
title: this.$t('describe'),
align: 'left',
@@ -73,6 +73,13 @@
ellipsis: true,
width: 100
},
{
title: this.$t('DisplayOrder'),
align: 'left',
width: 100,
ellipsis: true,
dataIndex: 'sortOrder'
},
{
title: this.$t('describe'),
dataIndex: 'description',
@@ -44,6 +44,66 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</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-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
allowClear
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
<!-- <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-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
@@ -63,26 +123,6 @@
</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-multi">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<!-- <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-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -97,6 +137,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -112,8 +154,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -135,6 +175,9 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -152,8 +195,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -191,13 +232,41 @@
formInline: {},
rules: {},
ids: [],
CategoryTreeList: []
CategoryTreeList: [],
firstLevelDutyTerritoryList: [],
dutyTerritoryList: []
}
},
mounted() {
this.getSysCategoryTree()
},
methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
getSysCategoryTree() {
getAction(this.url.getSysCategoryTree, {}).then((res) => {
if (res.success) {
@@ -209,7 +278,9 @@
},
edit(data) {
this.visible = true
this.dutyTerritoryList = []
this.getSysCategoryTree()
this.getFirstLevelDutyTerritory()
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
@@ -250,6 +250,68 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:disabled="disabled"
@change="DutyDepartChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:disabled="disabled"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- :disabled="disabled"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
@@ -273,22 +335,7 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
@@ -691,20 +738,56 @@
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
],
dutyDepart:[
{
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
},
formInline: {},
disabled: false,
title: '',
CategoryTreeList: [],
DeliverableTreeList: []
DeliverableTreeList: [],
firstLevelDutyTerritoryList:[],
dutyTerritoryList:[],
}
},
mounted() {
this.getSysCategoryTree()
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
},
methods: {
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = {...this.formInline}
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
getSysCategoryTree() {
getAction(this.url.getSysCategoryTree, {}).then((res) => {
if (res.success) {
@@ -733,6 +816,8 @@
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : []
this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : []
this.$refs.ruleForm.clearValidate()
})
},
@@ -746,6 +831,8 @@
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : []
this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : []
this.$refs.ruleForm.clearValidate()
})
},
@@ -997,4 +1084,7 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
::v-deep .ant-form-item-with-help {
margin-bottom: 25px;
}
</style>
@@ -556,6 +556,13 @@
sorter: true,
ellipsis: true
},
{
title: this.$t('statisticalNodes'),
align: 'left',
ellipsis: true,
dataIndex: 'dutyDepart',
width: 110
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
@@ -822,15 +829,25 @@
key: 14,
moduleFlag: this.$route.query.title == '市场清单详情' ? '虚拟清单详情' : '维护清单'
},
{
sort: '',
name: this.$t('statisticalNodes'),
headFieldCn: '责任部门',
headFieldEn: 'Duty Department',
field: 'dutyDepart',
key: 15,
moduleFlag: this.$route.query.title == '市场清单详情' ? '虚拟清单详情' : '维护清单'
},
{
sort: '',
name: this.$t('areaOfResponsibility'),
headFieldCn: '责任领域',
headFieldEn: 'Responsible Field',
field: 'dutyTerritory_dictText',
key: 15,
key: 16,
moduleFlag: this.$route.query.title == '市场清单详情' ? '虚拟清单详情' : '维护清单'
},
// {
// sort: '',
// name: this.$t('regulatoryEngineer'),
@@ -53,7 +53,7 @@
<!-- {{item.serialNumber}}-->
<!-- </span>-->
<!-- </div>-->
<div class="content-text-button">
<div class="content-text-top">
<span> {{item.title}}</span>
</div>
</div>
@@ -273,7 +273,7 @@
}
.content-text-button {
font-size: 0.42rem;
font-size: 0.37rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
+1 -1
View File
@@ -176,7 +176,7 @@
}
.content-text-button {
font-size: 0.42rem;
font-size: 0.37rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
@@ -1,7 +1,7 @@
<template>
<div class="box">
<div class="header-search">
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
<!-- <van-icon @click="iconClick" class="icon" name="arrow-left"/>-->
<span class="header-search-text">
{{$route.query.projectName + ' ' + $t('preHomoFlow')}}
</span>
@@ -38,6 +38,16 @@
<span class="content-box-left">{{$t('engineeringInterfacePerson')}}</span>
<span class="content-box-text">{{queryForm.sdtName || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('certifiedEngineer')}}</span>
<span class="content-box-text" v-if="certificationEngineerName && certificationEngineerName.length > 0">
<span class="content-box-textList"
v-for="(item,index) in certificationEngineerName" :key="index">
{{item}}
</span>
</span>
<span class="content-box-text" v-else>--</span>
</div>
</van-collapse-item>
<van-collapse-item :title="$t('TaskRequirements')" name="2">
@@ -49,6 +59,14 @@
<span class="content-box-left">{{$t('cutoffTime')}}</span>
<span class="content-box-text">{{queryForm.endTime || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('statisticalNodes')}}</span>
<span class="content-box-text">{{queryForm['dutyDepart'] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('areaOfResponsibility')}}</span>
<span class="content-box-text">{{queryForm['dutyTerritoryName'] || queryForm['dutyTerritory_dictText'] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('typeOfDeliverables')}}</span>
<span class="content-box-text">{{queryForm.deliverableTypeName || '--'}}</span>
@@ -280,6 +298,7 @@
deliverablesResultFile: [],
deliveryResultList: [],
isDisplay: false,
certificationEngineerName: [],
url: {
queryProjectCertificationInventoryById: '/phone/toDoCenter/queryProjectCertificationInventoryById',
saveBatch: '/project/projectCertificationInventoryEO/saveBatch'
@@ -295,7 +314,6 @@
iconClick() {
this.$router.go(-1)
},
getFileInfos(item) {
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
@@ -450,11 +468,26 @@
this.getDeliveryResult(this.queryForm.deliverableTemplate)
}
this.queryForm = { ...this.queryForm }
this.getForm()
} else {
this.queryForm = {}
}
})
},
getForm() {
getAction('project/projectLibraryBase/queryById',
{ id: this.queryForm.projectLibraryId }).then((res) => {
if (res.success) {
this.certificationEngineerName = []
this.certificationEngineerName = res.result[0].certificationEngineerName || ''
if (this.certificationEngineerName && typeof this.certificationEngineerName == 'string') {
this.certificationEngineerName = this.certificationEngineerName.split(',')
} else {
this.certificationEngineerName = []
}
}
})
},
async upload(file) {
// 这时候我们创建一个formData对象实例
const formData = new FormData()
@@ -498,10 +531,10 @@
if (!this.isBrowser()) {
Dialog.alert({
message: '未授权用户 <br> Unauthorized User',
theme: 'round-button',
theme: 'round-button'
}).then(() => {
// on close
});
})
return
}
let url = kkFileView(item.fileName, item.id)
@@ -975,4 +1008,14 @@
::v-deep .productionEnterpriseName .van-field__error-message {
display: none;
}
.content-box-textList {
display: inline-block;
width: 100%;
font-size: 0.38rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 500;
color: #040B29;
word-break: break-all;
}
</style>
@@ -45,6 +45,14 @@
<span class="content-box-left">{{$t('deliveryDate')}}</span>
<span class="content-box-text">{{queryProject[queryData.DueDate] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('statisticalNodes')}}</span>
<span class="content-box-text">{{queryProject['dutyDepart'] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('areaOfResponsibility')}}</span>
<span class="content-box-text">{{queryProject['dutyTerritoryName'] || queryProject['dutyTerritory_dictText'] || '--'}}</span>
</div>
<div class="content-box-type">
<span class="content-box-left">{{$t('typeOfDeliverables')}}</span>
<span class="content-box-text">{{queryProject[queryData.typeOfDeliverables] || '--'}}</span>
@@ -194,7 +194,7 @@
}
.content-text-button {
font-size: 0.42rem;
font-size: 0.37rem;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #595E72;
@@ -51,17 +51,60 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
<span class="title-text-text" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</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-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="dutyTerritoryChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @change="dutyTerritoryChange"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="this.code == '0'">
<a-col :span="12" v-if="this.code == '0'">
<div class="box-title-text">
<div class="title-text">
@@ -91,8 +134,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="this.code == '0'">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -360,18 +401,46 @@
rules: {},
ids: [],
code: '',
dutyTerritoryList: [],
regulatoryEngineerList: [],
engineeringInterfacePersonList: []
engineeringInterfacePersonList: [],
firstLevelDutyTerritoryList: []
}
},
mounted() {
},
methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
this.formInline = { ...this.formInline }
this.queryPersonByProject(event)
this.queryPersonByProject(event.join(','))
},
queryPersonByProject(row) {
let query = {
@@ -399,15 +468,17 @@
edit(data, code, content) {
this.visible = true
this.regulatoryEngineerList = []
this.dutyTerritoryList = []
this.engineeringInterfacePersonList = []
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
this.code = code
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
if (content && code == '0') {
this.formInline.dutyTerritory = content.dutyTerritory
this.queryPersonByProject(content)
// this.formInline.dutyTerritory = content.dutyTerritory
// this.queryPersonByProject(content)
}
this.formInline = { ...this.formInline }
})
@@ -134,28 +134,6 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="'dataList.'+index+'.dutyTerritory'"
:rules="[{ required: true, message: $t('areaOfResponsibility') + $t('cannotEmpty'), trigger: 'change'},]"
>
<j-dict-select-tag class="box-input" v-model="item.dutyTerritory"
@input="handleInput('dataList.'+index+'.dutyTerritory')"
@changeQuery="dutyHandleChange(index)"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -175,6 +153,77 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
:prop="'dataList.'+index+'.dutyDepart'"
:rules="[{ required: true, message: $t('statisticalNodes') + $t('cannotEmpty'), trigger: 'change'},]"
>
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="DutyDepartChange(index)"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="item.dutyDepart">
<a-select-option v-for="(val, key) in firstLevelDutyTerritoryList"
:key="key"
:label="val.key"
:value="val.key">
<span style="display: inline-block;width: 100%" :title=" val.key ">
{{ val.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="'dataList.'+index+'.dutyTerritory'"
:rules="[{ required: true, message: $t('areaOfResponsibility') + $t('cannotEmpty'), trigger: 'change'},]"
>
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="dutyHandleChange(index)"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="item.dutyTerritory">
<a-select-option v-for="(val, key) in item.dutyTerritoryList"
:key="key"
:label="val.itemText"
:value="val.itemValue">
<span style="display: inline-block;width: 100%" :title=" val.itemText ">
{{ val.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="item.dutyTerritory"-->
<!-- @input="handleInput('dataList.'+index+'.dutyTerritory')"-->
<!-- @changeQuery="dutyHandleChange(index)"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -203,9 +252,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -233,6 +279,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -250,8 +298,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -355,28 +401,6 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="'dutyTerritory'"
>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
@input="handleInput('dutyTerritory')"
@changeQuery="handleChange"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -396,6 +420,75 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChangeOne"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
:prop="'dutyTerritory'"
>
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="handleChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- @changeQuery="handleChange"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -425,9 +518,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -451,6 +541,10 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -468,9 +562,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -493,6 +584,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -515,8 +608,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="formInline.inventoryVerifyEndTime">
<div class="box-title-text">
<div class="title-text">
@@ -535,6 +626,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="formInline.taskConfirmEndTime">
<div class="box-title-text">
<div class="title-text">
@@ -602,6 +695,8 @@
visible: false,
personnelVisible: false,
yearNameDataList: [],
firstLevelDutyTerritoryList: [],
dutyTerritoryList: [],
rules: {
serialNumber: [
{
@@ -649,6 +744,13 @@
trigger: 'change'
}
],
dutyDepart: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
configItem: [
{ required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'blur' },
{
@@ -675,9 +777,19 @@
mounted() {
this.getDeliverableTree()
this.getRegulationNo()
this.getFirstLevelDutyTerritory()
},
methods: {
...mapGetters(['userInfo']),
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
serialNumberClick() {
this.$refs.addCodeNumber.add()
},
@@ -710,7 +822,23 @@
}
})
},
DutyDepartChangeOne(event) {
this.formInline.dutyTerritory = []
this.formInline = {...this.formInline}
this.getDutyTerritoryOne(event.join(','))
},
getDutyTerritoryOne(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
addModel() {
this.visible = true
this.personnelVisible = true
@@ -727,12 +855,18 @@
this.formInline = {}
this.visible = true
this.personnelVisible = true
value.dutyDepart = value.dutyDepart ? value.dutyDepart.split(',') : []
value.dutyTerritory = value.dutyTerritory ? value.dutyTerritory.split(',') : []
this.formInline = JSON.parse(JSON.stringify(value))
// if (this.formInline.deliverableType) {
// this.formInline.deliverableType = this.formInline.deliverableType.split(',')
// }
if (value.dutyTerritory) {
this.queryPersonByProject(value.dutyTerritory)
if (value.dutyDepart && value.dutyDepart.length > 0) {
this.getDutyTerritoryOne(value.dutyDepart.join(','))
}
if (value.dutyTerritory && value.dutyTerritory.length > 0) {
this.queryPersonByProject(value.dutyTerritory.join(','))
}
this.getRegulationNo()
this.title = this.$t('edit')
@@ -765,6 +899,7 @@
Action = postAction
query.dataList.forEach(val => {
delete val.engineeringInterfacePersonList
delete val.dutyTerritoryList
Object.keys(val).forEach(res => {
if (val[res] && val[res] instanceof Array) {
val[res] = val[res].join(',')
@@ -804,6 +939,24 @@
}
})
},
DutyDepartChange(index) {
this.formInline.dataList[index].dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(this.formInline.dataList[index].dutyDepart.join(','),index)
},
getDutyTerritory(row,index) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.formInline.dataList[index].dutyTerritoryList = res.result || []
} else {
this.formInline.dataList[index].dutyTerritoryList = []
}
this.formInline = {...this.formInline}
})
},
handleInput(value, id, index, array) {
if (array) {
let content = array.filter(res => {
@@ -895,12 +1048,13 @@
},
handleChange(value) {
this.formInline.sdt = undefined
this.queryPersonByProject(this.formInline.dutyTerritory)
this.queryPersonByProject(this.formInline.dutyTerritory.join(','))
},
dutyHandleChange(index) {
this.formInline.dataList[index].sdt = undefined
this.formInline = { ...this.formInline }
this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory, index)
this.handleInput('dataList.' + index + '.dutyTerritory')
this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory.join(','), index)
},
queryPersonByProject(row, index) {
let query = {
@@ -29,23 +29,6 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12" v-if="name == $t('BatchSetting')">
<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')"
@changeQuery="handleChange"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -70,6 +53,69 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</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-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="handleChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- @changeQuery="handleChange"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -90,8 +136,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -111,6 +155,8 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24" v-if="name == $t('BatchSetting')">
<a-col :span="12" v-if="roleSwitchingCode == 2">
<div class="box-title-text">
<div class="title-text">
@@ -164,11 +210,13 @@
formInline: {},
rules: {},
ids: [],
firstLevelDutyTerritoryList: [],
configurationItemList: [],
engineeringInterfacePersonList: [],
typeOfDeliverablesList: [],
name: '',
DeliverableTreeList: []
DeliverableTreeList: [],
dutyTerritoryList: []
}
},
mounted() {
@@ -177,7 +225,32 @@
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
getDeliverableTree() {
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
if (res.success) {
@@ -187,16 +260,18 @@
}
})
},
edit(data, name,content) {
edit(data, name, content) {
this.visible = true
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
this.dutyTerritoryList = []
this.name = name
if (content && name == this.$t('BatchSetting')) {
this.formInline.dutyTerritory = content.dutyTerritory
this.queryPersonByProject(content.dutyTerritory)
// this.formInline.dutyTerritory = content.dutyTerritory
// this.queryPersonByProject(content.dutyTerritory)
}
this.formInline = { ...this.formInline }
})
@@ -231,7 +306,7 @@
} else {
url = this.url.setBatch
}
if (!query.configItem){
if (!query.configItem) {
query.configItem = undefined
}
postAction(url, query).then((res) => {
@@ -286,7 +361,7 @@
},
handleChange(value) {
this.formInline.sdt = undefined
this.queryPersonByProject(this.formInline.dutyTerritory)
this.queryPersonByProject(this.formInline.dutyTerritory.join(','))
},
queryPersonByProject(row) {
let query = {
@@ -739,6 +739,13 @@
sorter: true,
scopedSlots: { customRender: 'serialNumber' }
},
{
title: this.$t('statisticalNodes'),
align: 'left',
dataIndex: 'dutyDepart',
width: 100,
ellipsis: true
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
@@ -101,18 +101,65 @@
<div class="title-text">
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
@change="dutyTerritoryChange"
:disabled="formInline.roleCodeIndex == 0 ? false : true"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @change="dutyTerritoryChange"-->
<!-- :disabled="formInline.roleCodeIndex == 0 ? false : true"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -137,8 +184,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -564,6 +609,7 @@
visible: false,
confirmLoading: false,
rejectCauseListOne: [],
firstLevelDutyTerritoryList: [],
rules: {
attestationRank: [
{
@@ -579,6 +625,13 @@
trigger: 'change'
}
],
dutyDepart: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
homologationEngineerId: [
{
required: true,
@@ -662,7 +715,7 @@
message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
]
},
formInline: {
verifyDeliverableType: [],
@@ -685,13 +738,24 @@
DeliverableTreeList: [],
userInfoQuery: {},
rejectCauseList: [],
dutyTerritoryList: []
}
},
mounted() {
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
this.userInfoQuery = this.userInfo()
},
methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
isEdit(val) {
if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' ||
val.designFlowStatus == 'Results to be reviewed') {
@@ -741,6 +805,23 @@
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline.engineeringInterfacePerson = undefined
@@ -748,20 +829,26 @@
this.formInline.designInitiatorId = undefined
this.formInline.prehomoInitiatorId = undefined
this.formInline.verifyInitiatorId = undefined
this.queryPersonByProject(event)
this.queryPersonByProject(event.join(','))
},
queryPersonByProject(row) {
let dutyTerritory = ''
if (row.dutyTerritory) {
dutyTerritory = row.dutyTerritory.join(',')
} else {
dutyTerritory = row
}
let query = {
projectId: this.$route.query.id,
dutyTerritory: row.dutyTerritory || row
dutyTerritory: dutyTerritory
}
getAction(this.url.queryPersonByProject, query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人
this.certificationEngineerList = res.result.certificationEngineerList //认证工程师
if (row.dutyTerritory) {
if (row.dutyTerritory && row.dutyTerritory.length > 0) {
let _this = this
this.getProject(row, res, function() {
_this.getData(row, res)
@@ -821,8 +908,14 @@
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
item.dutyDepart = item.dutyDepart ? item.dutyDepart.split(',') : []
item.dutyTerritory = item.dutyTerritory ? item.dutyTerritory.split(',') : []
this.getRejectCause(item.id)
if (item.dutyTerritory) {
if (item.dutyDepart && item.dutyDepart.length > 0) {
this.getDutyTerritory(item.dutyDepart.join(','))
}
console.log(item.dutyTerritory)
if (item.dutyTerritory && item.dutyTerritory.length > 0) {
this.queryPersonByProject(item)
} else {
this.formInline = item
@@ -1100,4 +1193,8 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
::v-deep .ant-form-item-with-help {
margin-bottom: 25px;
}
</style>
@@ -858,6 +858,13 @@
width: 180,
sorter: true
},
{
title: this.$t('statisticalNodes'),
align: 'left',
ellipsis: true,
dataIndex: 'dutyDepart',
width: 120
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',
@@ -1126,6 +1133,15 @@
key: 6,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('statisticalNodes'),
headFieldCn: '责任部门',
headFieldEn: 'Duty Department',
field: 'dutyDepart',
key: 8,
moduleFlag: '法规清单'
},
{
sort: '',
name: this.$t('areaOfResponsibility'),
@@ -166,10 +166,10 @@
this.visible = false
},
referenceDeliverablesClick() {
this.$refs.referenceDeliverablesListRef.transferModel(this.queryData.flowType,JSON.parse(JSON.stringify(this.queryProject)))
this.$refs.referenceDeliverablesListRef.transferModel(this.queryData.flowType, JSON.parse(JSON.stringify(this.queryProject)))
},
referenceDeliverablesListForm(data) {
this.$refs.reviewedByThePersonInChargeRef.getData(JSON.parse(JSON.stringify(data)))
this.$refs.reviewedByThePersonInChargeRef.getData(JSON.parse(JSON.stringify(data)))
},
confirm(operatorTime) {
this.$refs.reviewedByThePersonInChargeRef.submit((res) => {
@@ -224,6 +224,14 @@
title: this.$t('deliveryDate'),
value: this.queryData.DueDate
},
{
title: this.$t('statisticalNodes'),
value: 'dutyDepart'
},
{
title: this.$t('areaOfResponsibility'),
value: 'dutyTerritory_dictText'
},
{
title: this.$t('typeOfDeliverables'),
value: this.queryData.typeOfDeliverables
@@ -348,12 +356,14 @@
font-size: 16px;
z-index: 20;
}
::v-deep .ant-drawer-header {
top: 0;
position: sticky;
z-index: 20;
}
::v-deep .ant-drawer-header .ant-drawer-title{
font-weight: bold;
::v-deep .ant-drawer-header .ant-drawer-title {
font-weight: bold;
}
</style>
@@ -30,16 +30,13 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
:disabled="disabled"
@input="handleInput('dutyTerritory')"
v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
v-model='formInline.wvtaId'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</a-form-model-item>
</div>
</a-col>
@@ -49,13 +46,60 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
v-model='formInline.wvtaId'
:disabled="disabled"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
:disabled="disabled"
@change="DutyDepartChange"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input"-->
<!-- :disabled="disabled"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- v-model="formInline.dutyTerritory"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
@@ -150,8 +194,8 @@
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel attestationType"
:prop="'dataList.'+index+'.attestationType'"
@@ -159,7 +203,8 @@
<j-multi-select-tag class="box-input" v-model="item.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
:triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item>
</div>
</a-col>
@@ -189,270 +234,318 @@
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
<codeNumber ref="codeNumber" @regulation="regulation" />
<codeNumber ref="codeNumber" @regulation="regulation"/>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction } from '@/api/manage'
import { mapGetters } from 'vuex'
export default {
name:"addModel",
props: ['url'],
components:{
codeNumber,
uploadFile
},
data() {
return {
visible: false,
disabled: false,
formInline: {},
confirmLoading: false,
projectNameList: [],
DeliverableTreeList: [],
rules: {
serialNumber: [
{
required: true,
message: this.$t('entryName') + this.$t('regulationNo'),
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('entryName') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('regulationNo'),
trigger: 'blur'
},
{
max: 300,
message: 'WVTA ID' + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
},
}
},
mounted() {
this.getDeliverableTree()
this.getRegulationNo()
},
methods: {
...mapGetters(['userInfo']),
addModel() {
this.visible = true
this.formInline = {}
this.formInline.dataList = [{}]
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate()
// this.$refs.codeNumber.number()
})
export default {
name: 'addModel',
props: ['url'],
components: {
codeNumber,
uploadFile
},
handleCancel() {
this.visible = false
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.formInline.authDummyInventoryBaseId = this.$route.query.id
let query = JSON.parse(JSON.stringify(this.formInline))
this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
data() {
return {
visible: false,
disabled: false,
formInline: {},
confirmLoading: false,
dutyTerritoryList: [],
projectNameList: [],
DeliverableTreeList: [],
firstLevelDutyTerritoryList: [],
rules: {
serialNumber: [
{
required: true,
message: this.$t('entryName') + this.$t('regulationNo'),
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('entryName') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
dutyDepart: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('regulationNo'),
trigger: 'blur'
},
{
max: 300,
message: 'WVTA ID' + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
]
}
}
},
mounted() {
this.getDeliverableTree()
this.getRegulationNo()
this.getFirstLevelDutyTerritory()
},
methods: {
...mapGetters(['userInfo']),
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
addModel() {
this.visible = true
this.formInline = {}
this.formInline.dataList = [{}]
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate()
// this.$refs.codeNumber.number()
})
},
handleCancel() {
this.visible = false
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.formInline.authDummyInventoryBaseId = this.$route.query.id
let query = JSON.parse(JSON.stringify(this.formInline))
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
if (res == 'dataList') {
} else {
query[res] = query[res].join(',')
}
}
})
this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
}
})
},
addClick(index) {
this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.dataList.splice(index, 1)
this.formInline = { ...this.formInline }
},
getRegulationNo() {
let query = {
projectLibraryId: this.$route.query.id,
roleCode: 0
}
getAction(this.url.number, query).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
} else {
this.projectNameList = []
}
})
},
serialNumberChange(value) {
let content = this.projectNameList.filter(res => {
return res.id === value
})
this.formInline.bussDocumentLibraryId = content[0].id
this.formInline.serialNumber = content[0].serialNumber
},
getDeliverableTree() {
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
if (res.success) {
this.DeliverableTreeList = res.result
} else {
this.DeliverableTreeList = []
}
})
},
serialNumberClick() {
this.$refs.codeNumber.add()
},
regulation(item, data) {
this.formInline.serialNumber = item
this.formInline.bussDocumentLibraryId = data
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField(['serialNumber'])
})
},
//交付物模板上传
clickButtonToUpload(item, index, isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue) {
ids = this.formInline.dataList[index][item]
} else {
ids = this.formInline[item]
}
console.log(this.formInline, 1111)
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
})
},
addClick(index){
this.formInline.dataList.splice(index + 1, 0, {})
this.formInline = { ...this.formInline }
},
deleteClick(index) {
this.formInline.dataList.splice(index, 1)
this.formInline = { ...this.formInline }
},
getRegulationNo() {
let query = {
projectLibraryId: this.$route.query.id,
roleCode: 0
}
getAction(this.url.number, query).then((res) => {
if (res.success) {
this.projectNameList = res.result || []
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.projectNameList = []
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
})
},
serialNumberChange(value) {
let content = this.projectNameList.filter(res => {
return res.id === value
})
this.formInline.bussDocumentLibraryId = content[0].id
this.formInline.serialNumber = content[0].serialNumber
},
getDeliverableTree() {
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
if (res.success) {
this.DeliverableTreeList = res.result
} else {
this.DeliverableTreeList = []
}
})
},
serialNumberClick(){
this.$refs.codeNumber.add()
},
regulation(item,data) {
this.formInline.serialNumber = item
this.formInline.bussDocumentLibraryId = data
this.$nextTick(()=>{
this.formInline = {... this.formInline}
this.$refs.ruleForm.validateField(['serialNumber'])
})
},
//交付物模板上传
clickButtonToUpload(item, index,isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue){
ids = this.formInline.dataList[index][item]
}else{
ids = this.formInline[item]
this.formInline = { ...this.formInline }
}
console.log(this.formInline,1111)
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
this.formInline = { ...this.formInline }
},
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
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: 48px;
}
.title-text {
width: 114px;
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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.Required {
color: red;
margin-right: 4px;
}
.header-text {
font-size: 16px;
font-weight: 500;
}
.header-text {
font-size: 16px;
font-weight: 500;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.icon-text {
font-size: 16px;
margin-right: 4px;
}
.icon-text {
font-size: 16px;
margin-right: 4px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .attestationType .ant-form-explain{
margin-top: -16px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .attestationType .ant-form-explain {
margin-top: -16px;
}
::v-deep .ant-form-item-with-help {
margin-bottom: 25px;
}
</style>
@@ -10,17 +10,57 @@
>
<a-form-model class="formAdd" v-model="formInline" :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('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
@change="DutyDepartChange"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</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-multi">
<j-dict-select-tag class="box-input"
v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
allowClear
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input"-->
<!-- v-model="formInline.dutyTerritory"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
<!-- @input="handleInput('dutyTerritory')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
@@ -29,6 +69,9 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -67,14 +110,44 @@ export default {
rules: {},
ids: [],
DeliverableTreeList: [],
firstLevelDutyTerritoryList:[],
dutyTerritoryList:[],
}
},
mounted() {
this.getDeliverableTree()
},
methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
})
},
edit(data) {
this.visible = true
this.getFirstLevelDutyTerritory()
this.dutyTerritoryList = []
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
@@ -28,24 +28,6 @@
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
v-model="formInline.dutyTerritory"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -61,24 +43,90 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="dutyDepart">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:disabled="disabled"
@change="DutyDepartChange"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyDepart">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
class="box-input"
:disabled="disabled"
allowClear
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
<a-select-option v-for="(item, key) in dutyTerritoryList"
:key="key"
:label="item.itemText"
:value="item.itemValue">
<span style="display: inline-block;width: 100%" :title=" item.itemText ">
{{ item.itemText }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input"-->
<!-- v-model="formInline.dutyTerritory"-->
<!-- :disabled="disabled"-->
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel attestationType" prop="attestationType">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
:triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -90,10 +138,13 @@
v-model="formInline.category"
:disabled="disabled"
:title="formInline.category"
:placeholder="$t('PleaseEnter')+$t('category')" />
:placeholder="$t('PleaseEnter')+$t('category')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -109,8 +160,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -127,6 +176,9 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -136,7 +188,7 @@
<a-form-model-item class="itemModel"
prop="deliverableType"
:rules="[{ required: true, message: $t('typeOfDeliverables') + $t('cannotEmpty'), trigger: 'change'},]"
>
>
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.deliverableType"
@@ -151,8 +203,6 @@
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -179,276 +229,332 @@
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-drawer>
<codeNumber ref="codeNumber" @regulation="regulation" />
<codeNumber ref="codeNumber" @regulation="regulation"/>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess" :disabled="disabled"/>
</div>
</template>
<script>
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import codeNumber from './codeNumber'
import uploadFile from '@/components/uploadFile/file'
export default {
name:'editModel',
props: ['url'],
components:{
codeNumber,
uploadFile
},
data() {
return {
title: '',
visible: false,
button: true,
confirmLoading: false,
formInline: {},
disabled: false,
DeliverableTreeList: [],
rules: {
serialNumber: [
{
required: true,
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
trigger: 'change'
export default {
name: 'editModel',
props: ['url'],
components: {
codeNumber,
uploadFile
},
data() {
return {
title: '',
visible: false,
button: true,
confirmLoading: false,
formInline: {},
disabled: false,
DeliverableTreeList: [],
dutyTerritoryList: [],
firstLevelDutyTerritoryList: [],
rules: {
serialNumber: [
{
required: true,
message: this.$t('regulationNo') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
dutyDepart: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('cannotEmpty'),
trigger: 'change'
}
],
attestationType: [
{
required: true,
message: this.$t('certificationType') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
category: [
{
required: true,
message: this.$t('category') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
inspectionItem: [
{
required: true,
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
configItem: [
{
required: true,
message: this.$t('configurationItem') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('configurationItem') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
}
],
deliverable: [
{
required: true,
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
}
}
},
mounted() {
this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
},
methods: {
DutyDepartChange(event) {
this.formInline.dutyTerritory = []
this.formInline = { ...this.formInline }
this.getDutyTerritory(event.join(','))
},
getDutyTerritory(row) {
let query = {
dutyDepart: row
}
getAction('/sys/dict/getDutyTeryByDD', query).then((res) => {
if (res.success) {
this.dutyTerritoryList = res.result || []
} else {
this.dutyTerritoryList = []
}
],
dutyTerritory: [
{
required: true,
message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'),
trigger: 'change'
})
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
],
wvtaId: [
{
required: true,
message: 'WVTA ID' + this.$t('cannotEmpty'),
trigger: 'change'
})
},
handleCancel() {
this.visible = false
},
serialNumberClick() {
this.$refs.codeNumber.add()
},
editModel(item, data) {
this.visible = true
this.title = this.$t('edit')
this.$nextTick(() => {
this.formInline = item || {}
if (this.formInline.deliverableType) {
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
} else {
this.formInline.deliverableType = []
}
],
attestationType: [
{
required: true,
message: this.$t('certificationType') + this.$t('cannotEmpty'),
trigger: 'change'
if (this.formInline.dutyDepart) {
this.formInline.dutyDepart = this.formInline.dutyDepart.split(',')
} else {
this.formInline.dutyDepart = []
}
],
category: [
{
required: true,
message: this.$t('category') + this.$t('cannotEmpty'),
trigger: 'change'
if (this.formInline.dutyTerritory) {
this.formInline.dutyTerritory = this.formInline.dutyTerritory.split(',')
} else {
this.formInline.dutyTerritory = []
}
],
inspectionItem: [
{
required: true,
message: this.$t('inspectionItems') + this.$t('cannotEmpty'),
trigger: 'change'
this.$refs.ruleForm.clearValidate()
})
console.log(this.formInline)
if (data == 1) {
this.title = this.$t('view')
this.disabled = true
this.button = false
}
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
this.confirmLoading = true
postAction(this.url.editModel, formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
],
configItem: [
{
required: true,
message: this.$t('configurationItem') + this.$t('cannotEmpty'),
trigger: 'blur'
},
{
max: 300,
message: this.$t('configurationItem') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur'
})
},
getDeliverableTree() {
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
if (res.success) {
this.DeliverableTreeList = res.result
} else {
this.DeliverableTreeList = []
}
],
deliverable: [
{
required: true,
message: this.$t('Deliverables') + this.$t('cannotEmpty'),
trigger: 'change'
})
},
regulation(item, data) {
this.formInline.serialNumber = item
this.formInline.bussDocumentLibraryId = data
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField(['serialNumber'])
})
},
//交付物模板
clickButtonToUpload(item, index, isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue) {
ids = this.formInline.dataList[index][item]
} else {
ids = this.formInline[item]
}
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
]
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
this.formInline = { ...this.formInline }
}
}
},
mounted() {
this.getDeliverableTree()
},
methods: {
handleCancel() {
this.visible = false
},
serialNumberClick(){
this.$refs.codeNumber.add()
},
editModel(item,data) {
this.visible = true
this.title = this.$t('edit')
this.$nextTick(() => {
this.formInline = item || {}
if (this.formInline.deliverableType) {
this.formInline.deliverableType = this.formInline.deliverableType.split(',')
}
this.$refs.ruleForm.clearValidate()
})
if(data == 1) {
this.title = this.$t('view')
this.disabled = true
this.button = false
}
},
handleSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
this.confirmLoading = true
postAction(this.url.editModel, formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('editModelList')
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
} else {
this.$message.warning(res.message)
this.confirmLoading = false
}
})
},
getDeliverableTree() {
getAction('/sys/category/getCertificationDeliverableTree', {}).then((res) => {
if (res.success) {
this.DeliverableTreeList = res.result
} else {
this.DeliverableTreeList = []
}
})
},
regulation(item,data) {
this.formInline.serialNumber = item
this.formInline.bussDocumentLibraryId = data
this.$nextTick(()=>{
this.formInline = {... this.formInline}
this.$refs.ruleForm.validateField(['serialNumber'])
})
},
//交付物模板
clickButtonToUpload(item, index,isTrue) {
this.numIndex = index
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
let ids = ''
console.log(index)
if (isTrue){
ids = this.formInline.dataList[index][item]
}else{
ids = this.formInline[item]
}
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
if (this.formInline.id) {
this.formInline[this.uploadName] = attIdList.join(',')
} else {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
}
this.formInline = { ...this.formInline }
},
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
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: 48px;
}
.title-text {
width: 114px;
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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
height: 40px;
margin-bottom: 24px;
}
.Required {
color: red;
margin-right: 4px;
}
.Required {
color: red;
margin-right: 4px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
z-index: 100;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .ant-input-disabled{
.button-text {
height: 38px;
width: calc(100% - 100px);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
::v-deep .ant-input-disabled {
color: #040B29;
}
::v-deep .ant-select-disabled .ant-select-selection-selected-value{
color: #040B29!important;
::v-deep .ant-select-disabled .ant-select-selection-selected-value {
color: #040B29 !important;
}
::v-deep .attestationType .ant-form-explain {
margin-top: -16px;
}
::v-deep .ant-form-item-with-help {
margin-bottom: 25px;
}
::v-deep .attestationType .ant-form-explain{
margin-top: -16px;
}
</style>
@@ -373,6 +373,13 @@
ellipsis: true,
scopedSlots: { customRender: 'serialNumber' }
},
{
title: this.$t('statisticalNodes'),
align: 'left',
dataIndex: 'dutyDepart',
width: 100,
ellipsis: true
},
{
title: this.$t('areaOfResponsibility'),
align: 'left',