Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
# Conflicts: # jero-web/src/common/lang/zh-cn.js
This commit is contained in:
@@ -831,5 +831,8 @@ CREATE TABLE `sar_file_compare_res_comment` (
|
|||||||
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
|
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
|
||||||
MODIFY COLUMN `technical_file_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术文件名称' AFTER `evaluation_methods`,
|
MODIFY COLUMN `technical_file_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术文件名称' AFTER `evaluation_methods`,
|
||||||
MODIFY COLUMN `section` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '章节' AFTER `technical_file_name`;
|
MODIFY COLUMN `section` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '章节' AFTER `technical_file_name`;
|
||||||
|
-- 问题知识库 字段长度修改 2022-08-08
|
||||||
|
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||||
|
MODIFY COLUMN `buss_document_library_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id' AFTER `target_market`,
|
||||||
|
MODIFY COLUMN `stand_number` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号' AFTER `buss_document_library_id`,
|
||||||
|
MODIFY COLUMN `stand_title` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题' AFTER `stand_number`;
|
||||||
|
|||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
package com.jero.modules.system.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据字典code枚举类
|
||||||
|
*/
|
||||||
|
public enum DicCodeEnum {
|
||||||
|
REGION("适用地区","0","region"),
|
||||||
|
;
|
||||||
|
|
||||||
|
String name;
|
||||||
|
String value;
|
||||||
|
String code;
|
||||||
|
|
||||||
|
private DicCodeEnum(String name, String value, String code) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getTextByValue(String value) {
|
||||||
|
DicCodeEnum[] values = values();
|
||||||
|
for (DicCodeEnum dicCodeEnum : values) {
|
||||||
|
if (dicCodeEnum.value.equals(value)) {
|
||||||
|
return dicCodeEnum.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -185,4 +186,16 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
|
|||||||
this.countryCardManageReleaseEOService.batchUpdateReleaseStatus(json);
|
this.countryCardManageReleaseEOService.batchUpdateReleaseStatus(json);
|
||||||
return Result.OK("批量更新发布状态成功!");
|
return Result.OK("批量更新发布状态成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理发布查询适用市场下拉选,只获取管理发布中没有的适用市场。
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||||
|
@ApiOperation(value="问题知识库-country_card-管理发布-获取适用市场下拉选", notes="问题知识库-country_card-管理发布-获取适用市场下拉选")
|
||||||
|
@GetMapping(value = "/getApplyMarketList")
|
||||||
|
public Result<List<DictModel>> getApplyMarketList() {
|
||||||
|
Result<List<DictModel>> result = this.countryCardManageReleaseEOService.getApplyMarketList();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -1,6 +1,8 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.service;
|
package com.jero.modules.problemKnowledgeBase.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -72,4 +74,10 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
|
|||||||
* @param json
|
* @param json
|
||||||
*/
|
*/
|
||||||
void batchUpdateReleaseStatus(JSONObject json);
|
void batchUpdateReleaseStatus(JSONObject json);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取适用市场
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Result<List<DictModel>> getApplyMarketList();
|
||||||
}
|
}
|
||||||
|
|||||||
+37
@@ -2,17 +2,22 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
|
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseEOService;
|
||||||
|
import com.jero.modules.system.enums.DicCodeEnum;
|
||||||
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -34,6 +39,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
|
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
|
||||||
|
@Autowired
|
||||||
|
private ISysDictService sysDictService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -159,4 +166,34 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
|||||||
|
|
||||||
this.updateBatchById(countryCardManageReleaseEOList);
|
this.updateBatchById(countryCardManageReleaseEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result<List<DictModel>> getApplyMarketList() {
|
||||||
|
List<DictModel> result = new ArrayList<>();
|
||||||
|
|
||||||
|
//获取所有的适用地区
|
||||||
|
List<DictModel> dictModelList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||||
|
|
||||||
|
//获取已经创建了country Card的适用地区,该接口只返回,在country Card里面没有的适用地区。
|
||||||
|
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list();
|
||||||
|
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||||
|
result = dictModelList;
|
||||||
|
}else {
|
||||||
|
for (DictModel dictModel : dictModelList) {
|
||||||
|
boolean flag = true;
|
||||||
|
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||||
|
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())){
|
||||||
|
flag = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(flag){
|
||||||
|
result.add(dictModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-10
@@ -9,6 +9,9 @@ import com.jero.modules.system.util.StringUtils;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -102,21 +105,33 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
|
|||||||
@Override
|
@Override
|
||||||
public void disposeData(List<ProblemKnowledgeBaseClassifyEO> datas) {
|
public void disposeData(List<ProblemKnowledgeBaseClassifyEO> datas) {
|
||||||
if (CollectionUtils.isNotEmpty(datas)) {
|
if (CollectionUtils.isNotEmpty(datas)) {
|
||||||
List<String> userIdList = datas.stream().map(ProblemKnowledgeBaseClassifyEO::getChargePersonId).distinct().collect(Collectors.toList());
|
|
||||||
|
StringBuffer userIdSb = new StringBuffer();
|
||||||
|
for (ProblemKnowledgeBaseClassifyEO data : datas) {
|
||||||
|
userIdSb.append(data.getChargePersonId() + ",");
|
||||||
|
}
|
||||||
|
List<String> userIdList = new ArrayList<>();
|
||||||
|
if(StringUtils.isNotEmpty(userIdSb.toString())){
|
||||||
|
userIdList = Arrays.asList(userIdSb.toString().substring(0,userIdSb.length()-1).split(","));
|
||||||
|
}
|
||||||
|
|
||||||
List<SysUser> userList = this.sysUserService.querySysUserListByIdList(userIdList);
|
List<SysUser> userList = this.sysUserService.querySysUserListByIdList(userIdList);
|
||||||
|
|
||||||
datas.forEach(data -> {
|
datas.forEach(data -> {
|
||||||
if(CollectionUtils.isNotEmpty(userList)){
|
if(CollectionUtils.isNotEmpty(userList)){
|
||||||
List<SysUser> sysUsers = userList.stream().filter(user -> {
|
String chargePersonId = data.getChargePersonId();
|
||||||
boolean flag = false;
|
if(StringUtils.isNotEmpty(chargePersonId)){
|
||||||
if (StringUtils.equals(data.getId(), user.getId())) {
|
String[] chargePersonIdArr = chargePersonId.split(",");
|
||||||
flag = true;
|
String chargePersonIdName = userList.stream().filter(user -> {
|
||||||
}
|
boolean flag = false;
|
||||||
return flag;
|
for (String chargePerson : chargePersonIdArr) {
|
||||||
}).collect(Collectors.toList());
|
if(StringUtils.equals(user.getId(),chargePerson)){
|
||||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
flag = true;
|
||||||
data.setChargePersonIdName(sysUsers.get(0).getUsername());
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).map(SysUser::getUsername).collect(Collectors.joining(","));
|
||||||
|
data.setChargePersonIdName(chargePersonIdName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+9
-5
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
||||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.*;
|
import com.jero.modules.problemKnowledgeBase.service.*;
|
||||||
@@ -200,7 +202,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
|
|
||||||
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = new ArrayList<>();
|
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = new ArrayList<>();
|
||||||
if(StringUtils.isNotEmpty(problemTypeSb.toString())){
|
if(StringUtils.isNotEmpty(problemTypeSb.toString())){
|
||||||
Stream<String> problemTypeList = Arrays.asList(problemTypeSb.toString().substring(0, problemTypeSb.toString().length() - 1).split(",")).stream().distinct();
|
List<String> problemTypeList = Arrays.asList(problemTypeSb.toString().substring(0, problemTypeSb.toString().length() - 1).split(",")).stream().distinct().collect(Collectors.toList());
|
||||||
QueryWrapper<ProblemKnowledgeBaseClassifyEO> classifyEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProblemKnowledgeBaseClassifyEO> classifyEOQueryWrapper = new QueryWrapper<>();
|
||||||
classifyEOQueryWrapper.lambda().in(ProblemKnowledgeBaseClassifyEO::getId,problemTypeList);
|
classifyEOQueryWrapper.lambda().in(ProblemKnowledgeBaseClassifyEO::getId,problemTypeList);
|
||||||
problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list(classifyEOQueryWrapper);
|
problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list(classifyEOQueryWrapper);
|
||||||
@@ -215,7 +217,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
|
|
||||||
long praiseCount = praiseEOList.stream().filter(praiseEO -> {
|
long praiseCount = praiseEOList.stream().filter(praiseEO -> {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())){
|
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())
|
||||||
|
&&StringUtils.equals(praiseEO.getPraiseStatus(), PraiseStatusEnum.PRAISE.getValue())){
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
@@ -235,9 +238,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
data.setPraiseEO(poblemKnowledgeBasePraiseEOS.get(0));
|
data.setPraiseEO(poblemKnowledgeBasePraiseEOS.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
long browsingHistoryCount = browsingHistoryEOList.stream().filter(praiseEO -> {
|
long browsingHistoryCount = browsingHistoryEOList.stream().filter(baseBrowsingHistoryEO -> {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())){
|
if(StringUtils.equals(data.getId(),baseBrowsingHistoryEO.getProblemKnowledgeBaseId())){
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
@@ -246,7 +249,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
|
|
||||||
long collectCount = collectEOList.stream().filter(collectEO -> {
|
long collectCount = collectEOList.stream().filter(collectEO -> {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if(StringUtils.equals(data.getId(),collectEO.getProblemKnowledgeBaseId())){
|
if(StringUtils.equals(data.getId(),collectEO.getProblemKnowledgeBaseId())
|
||||||
|
&& StringUtils.equals(collectEO.getCollectStatus(), CollectStatusEnum.COLLECT.getValue())){
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
|||||||
@@ -1244,4 +1244,6 @@ module.exports = {
|
|||||||
punctuationmark:'You can only enter English punctuation marks except the # sign and commas',
|
punctuationmark:'You can only enter English punctuation marks except the # sign and commas',
|
||||||
created: 'Created',
|
created: 'Created',
|
||||||
updated:'Updated',
|
updated:'Updated',
|
||||||
|
OpenOne:'Open',
|
||||||
|
Privacy:'Privacy',
|
||||||
}
|
}
|
||||||
@@ -1344,6 +1344,8 @@ module.exports = {
|
|||||||
turnOnAutoMatch:'打开自动匹配',
|
turnOnAutoMatch:'打开自动匹配',
|
||||||
Adjustareasofresponsibility:'调整责任领域',
|
Adjustareasofresponsibility:'调整责任领域',
|
||||||
regulatoryTechnicalAssessment:'法规技术评估',
|
regulatoryTechnicalAssessment:'法规技术评估',
|
||||||
|
OpenOne:'公开',
|
||||||
|
Privacy:'私密',
|
||||||
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
|
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
|
||||||
created: '创建时间',
|
created: '创建时间',
|
||||||
updated:'更新时间',
|
updated:'更新时间',
|
||||||
|
|||||||
+29
-12
@@ -32,12 +32,12 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('personCharge')">{{$t('personCharge')}}</span>
|
<span class="title-text-text" :title="$t('personCharge')">{{$t('personCharge')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="personChargeName">
|
<a-form-model-item class="itemModel" prop="chargePersonIdName">
|
||||||
<PersonnelSelection
|
<PersonnelSelection
|
||||||
:query="{db_field_name:'personCharge',db_field_txt:$t('personCharge')}"
|
:query="{db_field_name:'chargePersonId',db_field_txt:$t('personCharge')}"
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
@change="PersonnelSelectionChange"
|
@change="PersonnelSelectionChange"
|
||||||
v-model="formInline.personChargeName"/>
|
v-model="formInline.chargePersonIdName"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -48,7 +48,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'classificationMaintenanceAdd',
|
name: 'classificationMaintenanceAdd',
|
||||||
components: {
|
components: {
|
||||||
@@ -60,16 +61,11 @@
|
|||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {
|
rules: {
|
||||||
personChargeName: [
|
chargePersonIdName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('personCharge') + this.$t('cannotEmpty'),
|
message: this.$t('personCharge') + this.$t('cannotEmpty'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
},
|
|
||||||
{
|
|
||||||
max: 100,
|
|
||||||
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
problemLabel: [
|
problemLabel: [
|
||||||
@@ -85,7 +81,11 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
title: ''
|
title: '',
|
||||||
|
url: {
|
||||||
|
add: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/add',
|
||||||
|
edit: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/edit'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -114,7 +114,24 @@
|
|||||||
handleOk() {
|
handleOk() {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let url = ''
|
||||||
|
if (this.formInline.id) {
|
||||||
|
url = this.url.edit
|
||||||
|
} else {
|
||||||
|
url = this.url.add
|
||||||
|
}
|
||||||
|
postAction(url, this.formInline).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.visible = false
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$emit('classificationMaintenanceAddForm')
|
||||||
|
} else {
|
||||||
|
this.confirmLoading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-9
@@ -24,7 +24,7 @@
|
|||||||
:loading="loading">
|
:loading="loading">
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
|
<a style="margin-right: 8px" @click="edit(record)">{{$t('edit')}}</a>
|
||||||
<a @click="deleteData">{{$t('delete')}}</a>
|
<a @click="deleteData(record)">{{$t('delete')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="page" v-if="dataList.length > 0">
|
<div class="page" v-if="dataList.length > 0">
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
url: {
|
url: {
|
||||||
list: '',
|
list: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/page',
|
||||||
deleteOne: ''
|
deleteOne: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/deleteBatch'
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
dataList: [{}],
|
dataList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -84,14 +84,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('problemLabel'),
|
title: this.$t('problemLabel'),
|
||||||
dataIndex: 'title',
|
dataIndex: 'problemLabel',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 240,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('personCharge'),
|
title: this.$t('personCharge'),
|
||||||
dataIndex: 'region',
|
dataIndex: 'chargePersonName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 240,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -109,6 +111,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
|
this.replacePage()
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
@@ -128,10 +131,10 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
content: _this.$t('ConfirmDelete'),
|
content: _this.$t('ConfirmDelete'),
|
||||||
onOk() {
|
onOk() {
|
||||||
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
|
deleteAction(_this.url.deleteOne, { ids: val.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
_this.getList()
|
_this.replacePage()
|
||||||
} else {
|
} else {
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
@@ -154,7 +157,7 @@
|
|||||||
pageSize: this.pageSize
|
pageSize: this.pageSize
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
postAction(this.url.list, query).then((res) => {
|
getAction(this.url.list, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataList = res.result.records || []
|
this.dataList = res.result.records || []
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
|||||||
@@ -0,0 +1,315 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="$t('bringInDocumentInformation')"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="1000"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="visible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<div style="margin-bottom: 60px">
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="12" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('standard')">
|
||||||
|
<span>{{$t('standard')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
||||||
|
v-model="queryParam.serial_number"></a-input>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('title')">
|
||||||
|
<span>{{$t('title')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
||||||
|
v-model="queryParam.title"></a-input>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="12" :sm="8">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text" :title="$t('status')">
|
||||||
|
<span>{{$t('status')}}</span>
|
||||||
|
</div>
|
||||||
|
<j-dict-select-tag class="box-input" v-model="queryParam.state"
|
||||||
|
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="'state'"/>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
<a-col :md="12" :sm="24">
|
||||||
|
<globalAdvancedQuery ref="globalAdvancedQueryRef"
|
||||||
|
@handleSuperQuery="handleSuperQuery"
|
||||||
|
:fieldList="fieldList"/>
|
||||||
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
|
</a-col>
|
||||||
|
</span>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<a-table
|
||||||
|
:columns="columns"
|
||||||
|
:rowKey="(record)=>JSON.stringify(record)"
|
||||||
|
:scroll="{x: 1200}"
|
||||||
|
:data-source="dataList"
|
||||||
|
:pagination="false"
|
||||||
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
|
:loading="loading">
|
||||||
|
|
||||||
|
</a-table>
|
||||||
|
<div class="page" v-if="dataList.length > 0">
|
||||||
|
<a-pagination
|
||||||
|
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||||
|
show-quick-jumper
|
||||||
|
show-size-changer
|
||||||
|
:page-size.sync="pageSize"
|
||||||
|
:total="total"
|
||||||
|
:current="pageNo"
|
||||||
|
@change="onChange"
|
||||||
|
@showSizeChange="SizeChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'listAddModel',
|
||||||
|
components: {
|
||||||
|
globalAdvancedQuery
|
||||||
|
},
|
||||||
|
props: ['url'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
queryParam: {},
|
||||||
|
confirmLoading: false,
|
||||||
|
selectedRowKeys: [],
|
||||||
|
selectedRowKeysValue: [],
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('standard'),
|
||||||
|
dataIndex: 'serial_number',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('title'),
|
||||||
|
dataIndex: 'title',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('zoneOfApplication'),
|
||||||
|
dataIndex: 'region',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('ImplementationDate'),
|
||||||
|
dataIndex: 'xin1_che1_xing2_shi2_shi1_ri4_qi1',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('vehicleInProductionDate'),
|
||||||
|
dataIndex: 'implement_time',
|
||||||
|
align: 'center',
|
||||||
|
ellipsis: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataList: [],
|
||||||
|
content: [],
|
||||||
|
loading: false,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
fieldList: [],
|
||||||
|
queryConditionVOList: [],
|
||||||
|
bussDocument: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addModel(value) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.visible = true
|
||||||
|
this.queryParam = {}
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
this.queryConditionVOList = []
|
||||||
|
this.replacePage()
|
||||||
|
this.queryConditionInventory()
|
||||||
|
if (value.bussDocumentLibraryId) {
|
||||||
|
this.bussDocument = value.bussDocumentLibraryId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
searchQuery() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.queryParam = {}
|
||||||
|
this.queryConditionVOList = []
|
||||||
|
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||||
|
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
onChange(page, pageSize) {
|
||||||
|
this.pageNo = page
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
SizeChange(page, pageSize) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = pageSize
|
||||||
|
this.replacePage()
|
||||||
|
},
|
||||||
|
replacePage() {
|
||||||
|
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
|
||||||
|
let query = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
...this.queryParam,
|
||||||
|
queryConditionVOList: JSON.stringify(queryConditionVOList)
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
|
postAction('/project/projectLawsInventoryEO/queryPageDummy', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataList = res.result.records || []
|
||||||
|
if (this.bussDocument && this.bussDocument.length > 0) {
|
||||||
|
this.dataList.forEach(val => {
|
||||||
|
if (this.bussDocument.includes(val.id)) {
|
||||||
|
this.selectedRowKeys.push(JSON.stringify(val))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.total = res.result.total
|
||||||
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.total = 0
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onSelectChange(value) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
|
this.content = []
|
||||||
|
this.selectedRowKeys.forEach(res => {
|
||||||
|
this.content.push(JSON.parse(res))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
|
let number = []
|
||||||
|
let id = []
|
||||||
|
this.content.forEach(res => {
|
||||||
|
id.push(res.id)
|
||||||
|
number.push(res.serial_number)
|
||||||
|
})
|
||||||
|
this.$emit('listAddModelForm', id.join(','), number.join(','))
|
||||||
|
this.visible = false
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryConditionInventory() {
|
||||||
|
let query = {
|
||||||
|
flag: 1
|
||||||
|
}
|
||||||
|
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.fieldList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.fieldList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSuperQuery(params, matchType) {
|
||||||
|
let sqp = {}
|
||||||
|
if (!params || (params && params.length == 0)) {
|
||||||
|
this.queryConditionVOList = []
|
||||||
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
||||||
|
} else {
|
||||||
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
||||||
|
this.queryConditionVOList = params
|
||||||
|
this.queryConditionVOList.forEach(res => {
|
||||||
|
res.type = matchType
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.replacePage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.page {
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 33px;
|
||||||
|
color: #000F16;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
margin-top: 3px;
|
||||||
|
text-align: right;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-button {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+216
-39
@@ -3,7 +3,7 @@
|
|||||||
<div class="doc-detail-wrap">
|
<div class="doc-detail-wrap">
|
||||||
<div class="doc-detail-header" style="position: fixed;top: 0">
|
<div class="doc-detail-header" style="position: fixed;top: 0">
|
||||||
<div class="doc-detail-title">
|
<div class="doc-detail-title">
|
||||||
<span style="line-height: 66px;display: inline-block;float: left">
|
<span style="line-height: 66px;display: inline-block;float: left;cursor: pointer" @click="backClick">
|
||||||
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
<a-icon type="arrow-left" style="margin-right: 6px;"/>
|
||||||
</span>
|
</span>
|
||||||
{{$t('newlyAdded')}}
|
{{$t('newlyAdded')}}
|
||||||
@@ -19,28 +19,28 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('displayPermission')">{{$t('displayPermission')}}</span>
|
<span class="title-text-text" :title="$t('displayPermission')">{{$t('displayPermission')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="projectNameId">
|
<a-form-model-item class="itemModel" prop="showPermissions">
|
||||||
<a-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
|
<a-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
|
||||||
@change="projectNameChange"
|
@change="showPermissionsChange"
|
||||||
v-model="formInline.projectNameId">
|
v-model="formInline.showPermissions">
|
||||||
<a-select-option v-for="(item, key) in projectNameList"
|
<a-select-option v-for="(item, key) in projectNameList"
|
||||||
:key="key"
|
:key="key"
|
||||||
:value="item.id">
|
:value="item.value">
|
||||||
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
|
<span style="display: inline-block;width: 100%" :title=" item.name ">
|
||||||
{{ item.projectName}}
|
{{ item.name}}
|
||||||
</span>
|
</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8" v-if="isDisplay">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
|
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="yearNameId">
|
<a-form-model-item class="itemModel" prop="studioEngineerName">
|
||||||
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
<PersonnelSelection :query="{db_field_name:'studioEngineer',db_field_txt:$t('authorizedUser')}"
|
||||||
:isSingleChoice="true"
|
:isSingleChoice="true"
|
||||||
:personneQuery="formInline"
|
:personneQuery="formInline"
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
|
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel-multi" prop="title">
|
<a-form-model-item class="itemModel" prop="title">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-model="formInline.title"
|
v-model="formInline.title"
|
||||||
@@ -72,13 +72,17 @@
|
|||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="projectStatus">
|
<a-form-model-item class="itemModel" prop="problemType">
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
|
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||||
:disabled="disabled"
|
v-model="formInline.problemType">
|
||||||
@input="handleInput('projectStatus')"
|
<a-select-option v-for="(item, key) in problemTypeList"
|
||||||
:placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
:key="key"
|
||||||
:type="'select'"
|
:value="item.id">
|
||||||
:triggerChange="false" :dictCode="'project_status'"/>
|
<span style="display: inline-block;width: 100%" :title="item.problemLabel ">
|
||||||
|
{{item.problemLabel}}
|
||||||
|
</span>
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -88,13 +92,13 @@
|
|||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
|
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="projectStatus">
|
<a-form-model-item class="itemModel" prop="targetMarket">
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
|
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@input="handleInput('projectStatus')"
|
@input="handleInput('targetMarket')"
|
||||||
:placeholder="$t('PleaseSelect')+$t('market')"
|
:placeholder="$t('PleaseSelect')+$t('market')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false" :dictCode="'project_status'"/>
|
:triggerChange="false" :dictCode="'region'"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -105,10 +109,10 @@
|
|||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('standardNo')">{{$t('standardNo')}}</span>
|
<span class="title-text-text" :title="$t('standardNo')">{{$t('standardNo')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="vehiclePlatform">
|
<a-form-model-item class="itemModel" prop="standNumber">
|
||||||
<a-input class="box-input"
|
<a-input class="box-input"
|
||||||
:disabled="disabled"
|
:disabled="true"
|
||||||
v-model="formInline.vehiclePlatform"
|
v-model="formInline.standNumber"
|
||||||
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
|
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,10 +154,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
|
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
|
||||||
<a-button type="primary" class="button-text"
|
<a-button type="primary" class="button-text"
|
||||||
@click="clickButtonToUpload('enclosure')">
|
@click="clickButtonToUpload('accessoryFile')">
|
||||||
{{ (formInline.enclosure === 'null' || formInline.enclosure === ''
|
{{ (formInline.accessoryFile === 'null' || formInline.accessoryFile === ''
|
||||||
||
|
||
|
||||||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
formInline.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
}}
|
}}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -161,9 +165,14 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
|
<div class="submit-button">
|
||||||
|
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
|
||||||
|
<listAddModel ref="listAddModelRef" @listAddModelForm="listAddModelForm"/>
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -175,6 +184,7 @@
|
|||||||
import 'quill/dist/quill.core.css'
|
import 'quill/dist/quill.core.css'
|
||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
import 'quill/dist/quill.bubble.css'
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
import listAddModel from './listAddModel'
|
||||||
import { quillEditor } from 'vue-quill-editor'
|
import { quillEditor } from 'vue-quill-editor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -182,14 +192,72 @@
|
|||||||
components: {
|
components: {
|
||||||
PersonnelSelection,
|
PersonnelSelection,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
quillEditor
|
quillEditor,
|
||||||
|
listAddModel
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {},
|
loading: false,
|
||||||
|
problemTypeList: [],
|
||||||
|
rules: {
|
||||||
|
showPermissions: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('displayPermission') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
studioEngineerName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('authorizedUser') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('title') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 100,
|
||||||
|
message: this.$t('title') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
problemType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('problemClassification') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
targetMarket: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('market') + this.$t('cannotEmpty'),
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '/problemKnowledgeBase/problemKnowledgeBaseEO/add',
|
||||||
|
edit: '/problemKnowledgeBase/problemKnowledgeBaseEO/edit'
|
||||||
|
},
|
||||||
|
isDisplay: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
projectNameList: [],
|
projectNameList: [
|
||||||
|
{
|
||||||
|
value: 'Open',
|
||||||
|
name: this.$t('OpenOne')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Privacy',
|
||||||
|
name: this.$t('Privacy')
|
||||||
|
}
|
||||||
|
],
|
||||||
content: '<h2>I am Example</h2>',
|
content: '<h2>I am Example</h2>',
|
||||||
editorOption: {
|
editorOption: {
|
||||||
// Some Quill options...
|
// Some Quill options...
|
||||||
@@ -203,34 +271,92 @@
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||||
|
this.getBase()
|
||||||
|
if (this.$route.query.id) {
|
||||||
|
this.queryById()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getBase() {
|
||||||
|
getAction('/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/list', {}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.problemTypeList = res.result || []
|
||||||
|
} else {
|
||||||
|
this.problemTypeList = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryById() {
|
||||||
|
let query = {
|
||||||
|
id: this.$route.query.id
|
||||||
|
}
|
||||||
|
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formInline = res.result || {}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
if (this.formInline.showPermissions == 'Privacy'){
|
||||||
|
this.isDisplay = true
|
||||||
|
}else{
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.formInline = {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
backClick() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/problemknowledgeBase'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
,
|
||||||
|
showPermissionsChange(event) {
|
||||||
|
if (event == 'Open') {
|
||||||
|
this.isDisplay = false
|
||||||
|
} else {
|
||||||
|
this.isDisplay = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,
|
||||||
onEditorBlur(quill) {
|
onEditorBlur(quill) {
|
||||||
console.log('editor blur!', quill)
|
console.log('editor blur!', quill)
|
||||||
},
|
}
|
||||||
|
,
|
||||||
onEditorFocus(quill) {
|
onEditorFocus(quill) {
|
||||||
console.log('editor focus!', quill)
|
console.log('editor focus!', quill)
|
||||||
},
|
}
|
||||||
|
,
|
||||||
onEditorReady(quill) {
|
onEditorReady(quill) {
|
||||||
console.log('editor ready!', quill)
|
console.log('editor ready!', quill)
|
||||||
},
|
}
|
||||||
|
,
|
||||||
onEditorChange({ quill, html, text }) {
|
onEditorChange({ quill, html, text }) {
|
||||||
console.log('editor change!', quill, html, text)
|
console.log('editor change!', quill, html, text)
|
||||||
this.content = html
|
this.content = html
|
||||||
},
|
}
|
||||||
|
,
|
||||||
PersonnelSelectionChange(value, id) {
|
PersonnelSelectionChange(value, id) {
|
||||||
this.formInline[value] = id
|
this.formInline[value] = id
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
}
|
||||||
|
,
|
||||||
handleInput(value) {
|
handleInput(value) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
this.$refs.ruleForm.validateField([value])
|
this.$refs.ruleForm.validateField([value])
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
bringInDocumentInformationClick() {
|
bringInDocumentInformationClick() {
|
||||||
|
this.$refs.listAddModelRef.addModel(this.formInline)
|
||||||
},
|
}
|
||||||
|
,
|
||||||
|
listAddModelForm(id, number) {
|
||||||
|
this.formInline.standNumber = number
|
||||||
|
this.formInline.bussDocumentLibraryId = id
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
}
|
||||||
|
,
|
||||||
clickButtonToUpload(item) {
|
clickButtonToUpload(item) {
|
||||||
this.$refs.uploadFile.perentHandleFunc()
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
this.$refs.uploadFile.visible = true
|
this.$refs.uploadFile.visible = true
|
||||||
@@ -242,7 +368,8 @@
|
|||||||
this.$refs.uploadFile.perentHandleFunc()
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
/** 上传文件的回调 */
|
/** 上传文件的回调 */
|
||||||
uploadSuccess(data) {
|
uploadSuccess(data) {
|
||||||
let attIdList = []
|
let attIdList = []
|
||||||
@@ -255,6 +382,47 @@
|
|||||||
this.formInline[this.uploadName] = attIdList.join(',')
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
submit() {
|
||||||
|
this.$refs.ruleForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
this.loading = true
|
||||||
|
this.confirmLoading = true
|
||||||
|
let url = ''
|
||||||
|
if (this.formInline.id) {
|
||||||
|
url = this.url.edit
|
||||||
|
} else {
|
||||||
|
url = this.url.add
|
||||||
|
}
|
||||||
|
formInline.permissionUserList = []
|
||||||
|
if (formInline.showPermissions == 'Privacy') {
|
||||||
|
let studioEngineer = formInline.studioEngineer.split(',')
|
||||||
|
studioEngineer.forEach(res => {
|
||||||
|
formInline.permissionUserList.push({
|
||||||
|
userId: res
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
postAction(url, formInline).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.loading = false
|
||||||
|
if (this.$route.query.id) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/problemknowledgeBase'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.loading = false
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -381,4 +549,13 @@
|
|||||||
.box-button {
|
.box-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.submit-button {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
text-align: right;
|
||||||
|
padding: 0 32px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
+17
-9
@@ -99,7 +99,7 @@
|
|||||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
url: {
|
url: {
|
||||||
getInfoList: 'search/document/getFullTextInfoList'
|
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -108,10 +108,13 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSearch() {
|
onSearch() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
ResetSearch() {
|
ResetSearch() {
|
||||||
|
this.searchContent = ''
|
||||||
|
this.pageNo = 1
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
classificationClick() {
|
classificationClick() {
|
||||||
this.$refs.classificationMaintenanceModelRef.getData()
|
this.$refs.classificationMaintenanceModelRef.getData()
|
||||||
@@ -124,11 +127,14 @@
|
|||||||
window.open(newUrl.href, '_blank')
|
window.open(newUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
newlyAddedClick() {
|
newlyAddedClick() {
|
||||||
let newUrl = this.$router.resolve({
|
this.$router.push({
|
||||||
path: '/problemKnowledgeBaseAdd',
|
path: '/problemKnowledgeBaseAdd'
|
||||||
query: {}
|
|
||||||
})
|
})
|
||||||
window.open(newUrl.href, '_blank')
|
// let newUrl = this.$router.resolve({
|
||||||
|
// path: '/problemKnowledgeBaseAdd',
|
||||||
|
// query: {}
|
||||||
|
// })
|
||||||
|
// window.open(newUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
pageOnChange(page, pageSize) {
|
pageOnChange(page, pageSize) {
|
||||||
this.pageNo = page
|
this.pageNo = page
|
||||||
@@ -144,7 +150,7 @@
|
|||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize
|
||||||
}
|
}
|
||||||
postAction(this.url.getInfoList, query).then((res) => {
|
getAction(this.url.getInfoList, query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.conList = res.result.records
|
this.conList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
@@ -156,7 +162,9 @@
|
|||||||
titleClick(item) {
|
titleClick(item) {
|
||||||
let newUrl = this.$router.resolve({
|
let newUrl = this.$router.resolve({
|
||||||
path: '/problemKnowledgeBaseView',
|
path: '/problemKnowledgeBaseView',
|
||||||
query: {}
|
query: {
|
||||||
|
id: item.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
window.open(newUrl.href, '_blank')
|
window.open(newUrl.href, '_blank')
|
||||||
}
|
}
|
||||||
|
|||||||
+106
-24
@@ -21,30 +21,23 @@
|
|||||||
|
|
||||||
<span class="text-field-right"
|
<span class="text-field-right"
|
||||||
:title="queryForm[item.value]" v-else>
|
:title="queryForm[item.value]" v-else>
|
||||||
{{queryForm[item.value]}}fdgdgdfg
|
{{queryForm[item.value]}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content" v-html="queryForm.content"></div>
|
||||||
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
|
|
||||||
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
|
|
||||||
是反抗拉萨的飞机罗斯福就点十六分就但是发
|
|
||||||
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
|
|
||||||
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
|
|
||||||
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
|
|
||||||
</div>
|
|
||||||
<div class="content-icon">
|
<div class="content-icon">
|
||||||
<span class="content-icon-text">
|
<span class="content-icon-text">
|
||||||
<a-icon class="icon" type="eye"/>
|
<a-icon class="icon" type="eye"/>
|
||||||
<span>123456</span>
|
<span>{{this.queryForm.browsingHistoryCount}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="content-icon-text">
|
<span class="content-icon-text" @click="likeClick()">
|
||||||
<a-icon class="icon" type="like"/>
|
<a-icon class="icon" :class="{'icon-active':this.isPraise}" type="like"/>
|
||||||
<span>123456</span>
|
<span>{{this.queryForm.praiseCount}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="content-icon-text">
|
<span class="content-icon-text" @click="starClick()">
|
||||||
<a-icon class="icon" type="star"/>
|
<a-icon class="icon" :class="{'icon-active':this.isCollect}" type="star"/>
|
||||||
<span>123456</span>
|
<span>{{this.queryForm.collectCount}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-text">
|
<div class="box-text">
|
||||||
@@ -107,7 +100,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import viewFileModel from '@/components/viewFileModel/index'
|
import viewFileModel from '@/components/viewFileModel/index'
|
||||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'problemKnowledgeBaseView',
|
name: 'problemKnowledgeBaseView',
|
||||||
@@ -119,35 +113,114 @@
|
|||||||
standardContentList: [
|
standardContentList: [
|
||||||
{
|
{
|
||||||
title: this.$t('problemClassification'),
|
title: this.$t('problemClassification'),
|
||||||
value: ''
|
value: 'problemType'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('market'),
|
title: this.$t('market'),
|
||||||
value: ''
|
value: 'targetMarket'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('standardNo'),
|
title: this.$t('standardNo'),
|
||||||
value: ''
|
value: 'standNumber'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('standardName'),
|
title: this.$t('standardName'),
|
||||||
value: ''
|
value: 'title'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('enclosure'),
|
title: this.$t('enclosure'),
|
||||||
type: 2,
|
type: 2,
|
||||||
value: ''
|
value: 'accessoryFile'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
queryForm: {},
|
queryForm: {},
|
||||||
formInline: {},
|
formInline: {},
|
||||||
rules: {}
|
rules: {},
|
||||||
|
isPraise: false,
|
||||||
|
isCollect: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = this.$t('applicableInstructionsMarketList')
|
document.title = this.$t('applicableInstructionsMarketList')
|
||||||
|
this.viewAdd()
|
||||||
|
this.queryById()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
queryById() {
|
||||||
|
let query = {
|
||||||
|
id: this.$route.query.id
|
||||||
|
}
|
||||||
|
getAction('/problemKnowledgeBase/problemKnowledgeBaseEO/queryById', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.queryForm = res.result || {}
|
||||||
|
this.queryForm = { ...this.queryForm }
|
||||||
|
if (this.formInline.showPermissions == 'Privacy') {
|
||||||
|
this.isDisplay = true
|
||||||
|
} else {
|
||||||
|
this.isDisplay = false
|
||||||
|
}
|
||||||
|
if (this.queryForm.praiseEO && this.queryForm.praiseEO.praiseStatus == 'Praise') {
|
||||||
|
this.isPraise = true
|
||||||
|
} else {
|
||||||
|
this.isPraise = false
|
||||||
|
}
|
||||||
|
if (this.queryForm.collectEO && this.queryForm.collectEO.collectStatus == 'Collect') {
|
||||||
|
this.isCollect = true
|
||||||
|
} else {
|
||||||
|
this.isCollect = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.formInline = {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
viewAdd() {
|
||||||
|
let query = {
|
||||||
|
problemKnowledgeBaseId: this.$route.query.id,
|
||||||
|
browsingUserId: this.userInfo().id
|
||||||
|
}
|
||||||
|
postAction('/problemKnowledgeBase/problemKnowledgeBaseBrowsingHistoryEO/add', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
likeClick() {
|
||||||
|
let praiseStatus = ''
|
||||||
|
this.isPraise = !this.isPraise
|
||||||
|
if (this.isPraise) {
|
||||||
|
praiseStatus = 'Praise'
|
||||||
|
this.queryForm.praiseCount = this.queryForm.praiseCount + 1
|
||||||
|
} else {
|
||||||
|
praiseStatus = 'Cancel praise'
|
||||||
|
this.queryForm.praiseCount = this.queryForm.praiseCount - 1
|
||||||
|
}
|
||||||
|
let query = {
|
||||||
|
problemKnowledgeBaseId: this.$route.query.id,
|
||||||
|
praiseUserId: this.userInfo().id,
|
||||||
|
praiseStatus: praiseStatus,
|
||||||
|
id: this.queryForm.praiseEO ? this.queryForm.praiseEO.id : undefined
|
||||||
|
}
|
||||||
|
putAction('/problemKnowledgeBase/problemKnowledgeBasePraiseEO/edit', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
starClick() {
|
||||||
|
let collectStatus = ''
|
||||||
|
this.isCollect = !this.isCollect
|
||||||
|
if (this.isCollect) {
|
||||||
|
collectStatus = 'Collect'
|
||||||
|
this.queryForm.collectCount = this.queryForm.collectCount + 1
|
||||||
|
} else {
|
||||||
|
collectStatus = 'Cancel Collect'
|
||||||
|
this.queryForm.collectCount = this.queryForm.collectCount - 1
|
||||||
|
}
|
||||||
|
let query = {
|
||||||
|
problemKnowledgeBaseId: this.$route.query.id,
|
||||||
|
collectUserId: this.userInfo().id,
|
||||||
|
collectStatus: collectStatus,
|
||||||
|
id: this.queryForm.collectEO ? this.queryForm.collectEO.id : undefined
|
||||||
|
}
|
||||||
|
putAction('/problemKnowledgeBase/problemKnowledgeBaseCollectEO/edit', query).then((res) => {
|
||||||
|
})
|
||||||
|
},
|
||||||
clickButtonToUpload(item) {
|
clickButtonToUpload(item) {
|
||||||
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||||
},
|
},
|
||||||
@@ -287,13 +360,17 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-icon-text {
|
.content-icon-text {
|
||||||
display: inline-block;
|
/*display: inline-block;*/
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-icon-text .icon {
|
.content-icon-text .icon {
|
||||||
@@ -301,6 +378,11 @@
|
|||||||
color: #3b4249 !important;
|
color: #3b4249 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-icon-text .icon-active {
|
||||||
|
font-size: 24px;
|
||||||
|
color: #00B3BE !important;
|
||||||
|
}
|
||||||
|
|
||||||
.content-icon-text span {
|
.content-icon-text span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
|
|||||||
Reference in New Issue
Block a user