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:
zyx.net
2022-08-08 17:30:39 +08:00
15 changed files with 848 additions and 110 deletions
@@ -831,5 +831,8 @@ CREATE TABLE `sar_file_compare_res_comment` (
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 `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`;
@@ -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;
}
}
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.api.vo.Result;
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.service.ICountryCardManageReleaseEOService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -185,4 +186,16 @@ public class CountryCardManageReleaseEOController extends JeroController<Country
this.countryCardManageReleaseEOService.batchUpdateReleaseStatus(json);
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;
}
}
@@ -1,6 +1,8 @@
package com.jero.modules.problemKnowledgeBase.service;
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.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
@@ -72,4 +74,10 @@ public interface ICountryCardManageReleaseEOService extends IService<CountryCard
* @param json
*/
void batchUpdateReleaseStatus(JSONObject json);
/**
* 获取适用市场
* @return
*/
Result<List<DictModel>> getApplyMarketList();
}
@@ -2,17 +2,22 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
import com.alibaba.fastjson.JSONObject;
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.CountryCardManageReleaseEO;
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
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.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
@@ -34,6 +39,8 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
@Autowired
private ICountryCardManageReleaseDetailEOService countryCardManageReleaseDetailEOService;
@Autowired
private ISysDictService sysDictService;
/**
* 保存
@@ -159,4 +166,34 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
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);
}
}
@@ -9,6 +9,9 @@ import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Date;
import java.util.stream.Collectors;
@@ -102,21 +105,33 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
@Override
public void disposeData(List<ProblemKnowledgeBaseClassifyEO> 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);
datas.forEach(data -> {
if(CollectionUtils.isNotEmpty(userList)){
List<SysUser> sysUsers = userList.stream().filter(user -> {
boolean flag = false;
if (StringUtils.equals(data.getId(), user.getId())) {
flag = true;
}
return flag;
}).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(sysUsers)){
data.setChargePersonIdName(sysUsers.get(0).getUsername());
String chargePersonId = data.getChargePersonId();
if(StringUtils.isNotEmpty(chargePersonId)){
String[] chargePersonIdArr = chargePersonId.split(",");
String chargePersonIdName = userList.stream().filter(user -> {
boolean flag = false;
for (String chargePerson : chargePersonIdArr) {
if(StringUtils.equals(user.getId(),chargePerson)){
flag = true;
}
}
return flag;
}).map(SysUser::getUsername).collect(Collectors.joining(","));
data.setChargePersonIdName(chargePersonIdName);
}
}
});
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.common.system.query.QueryGenerator;
import com.jero.common.system.vo.LoginUser;
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.mapper.ProblemKnowledgeBaseEOMapper;
import com.jero.modules.problemKnowledgeBase.service.*;
@@ -200,7 +202,7 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
List<ProblemKnowledgeBaseClassifyEO> problemKnowledgeBaseClassifyEOList = new ArrayList<>();
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<>();
classifyEOQueryWrapper.lambda().in(ProblemKnowledgeBaseClassifyEO::getId,problemTypeList);
problemKnowledgeBaseClassifyEOList = this.problemKnowledgeBaseClassifyEOService.list(classifyEOQueryWrapper);
@@ -215,7 +217,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
long praiseCount = praiseEOList.stream().filter(praiseEO -> {
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;
}
return flag;
@@ -235,9 +238,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
data.setPraiseEO(poblemKnowledgeBasePraiseEOS.get(0));
}
long browsingHistoryCount = browsingHistoryEOList.stream().filter(praiseEO -> {
long browsingHistoryCount = browsingHistoryEOList.stream().filter(baseBrowsingHistoryEO -> {
boolean flag = false;
if(StringUtils.equals(data.getId(),praiseEO.getProblemKnowledgeBaseId())){
if(StringUtils.equals(data.getId(),baseBrowsingHistoryEO.getProblemKnowledgeBaseId())){
flag = true;
}
return flag;
@@ -246,7 +249,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
long collectCount = collectEOList.stream().filter(collectEO -> {
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;
}
return flag;
+2
View File
@@ -1244,4 +1244,6 @@ module.exports = {
punctuationmark:'You can only enter English punctuation marks except the # sign and commas',
created: 'Created',
updated:'Updated',
OpenOne:'Open',
Privacy:'Privacy',
}
+2
View File
@@ -1344,6 +1344,8 @@ module.exports = {
turnOnAutoMatch:'打开自动匹配',
Adjustareasofresponsibility:'调整责任领域',
regulatoryTechnicalAssessment:'法规技术评估',
OpenOne:'公开',
Privacy:'私密',
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
created: '创建时间',
updated:'更新时间',
@@ -32,12 +32,12 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('personCharge')">{{$t('personCharge')}}</span>
</div>
<a-form-model-item class="itemModel" prop="personChargeName">
<a-form-model-item class="itemModel" prop="chargePersonIdName">
<PersonnelSelection
:query="{db_field_name:'personCharge',db_field_txt:$t('personCharge')}"
:query="{db_field_name:'chargePersonId',db_field_txt:$t('personCharge')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.personChargeName"/>
v-model="formInline.chargePersonIdName"/>
</a-form-model-item>
</div>
</a-col>
@@ -48,7 +48,8 @@
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile } from '@/api/manage'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'classificationMaintenanceAdd',
components: {
@@ -60,16 +61,11 @@
confirmLoading: false,
formInline: {},
rules: {
personChargeName: [
chargePersonIdName: [
{
required: true,
message: this.$t('personCharge') + this.$t('cannotEmpty'),
trigger: 'change'
},
{
max: 100,
message: this.$t('personCharge') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
trigger: 'change'
}
],
problemLabel: [
@@ -85,7 +81,11 @@
}
]
},
title: ''
title: '',
url: {
add: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/add',
edit: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/edit'
}
}
},
mounted() {
@@ -114,7 +114,24 @@
handleOk() {
this.$refs.ruleForm.validate(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'))
}
})
}
})
},
@@ -24,7 +24,7 @@
:loading="loading">
<span slot="operation" slot-scope="text,record">
<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>
</a-table>
<div class="page" v-if="dataList.length > 0">
@@ -63,12 +63,12 @@
data() {
return {
url: {
list: '',
deleteOne: ''
list: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/page',
deleteOne: '/problemKnowledgeBase/problemKnowledgeBaseClassifyEO/deleteBatch'
},
visible: false,
selectedRowKeys: [],
dataList: [{}],
dataList: [],
loading: false,
pageNo: 1,
pageSize: 10,
@@ -84,14 +84,16 @@
},
{
title: this.$t('problemLabel'),
dataIndex: 'title',
dataIndex: 'problemLabel',
align: 'center',
width: 240,
ellipsis: true
},
{
title: this.$t('personCharge'),
dataIndex: 'region',
dataIndex: 'chargePersonName',
align: 'center',
width: 240,
ellipsis: true
},
{
@@ -109,6 +111,7 @@
methods: {
getData() {
this.visible = true
this.replacePage()
},
handleCancel() {
this.visible = false
@@ -128,10 +131,10 @@
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteOne, { id: val.id }).then((res) => {
deleteAction(_this.url.deleteOne, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
_this.replacePage()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
@@ -154,7 +157,7 @@
pageSize: this.pageSize
}
this.loading = true
postAction(this.url.list, query).then((res) => {
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
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>
@@ -3,7 +3,7 @@
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0">
<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;"/>
</span>
{{$t('newlyAdded')}}
@@ -19,28 +19,28 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('displayPermission')">{{$t('displayPermission')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectNameId">
<a-form-model-item class="itemModel" prop="showPermissions">
<a-select :placeholder="$t('PleaseSelect')+$t('displayPermission')"
@change="projectNameChange"
v-model="formInline.projectNameId">
@change="showPermissionsChange"
v-model="formInline.showPermissions">
<a-select-option v-for="(item, key) in projectNameList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title=" item.projectName ">
{{ item.projectName}}
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="8">
<a-col :span="8" v-if="isDisplay">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('authorizedUser')">{{$t('authorizedUser')}}</span>
</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')}"
:isSingleChoice="true"
:personneQuery="formInline"
@@ -57,7 +57,7 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('title')">{{$t('title')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="title">
<a-form-model-item class="itemModel" prop="title">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.title"
@@ -72,13 +72,17 @@
<span class="title-text-text"
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
:disabled="disabled"
@input="handleInput('projectStatus')"
:placeholder="$t('PleaseSelect')+$t('problemClassification')"
:type="'select'"
:triggerChange="false" :dictCode="'project_status'"/>
<a-form-model-item class="itemModel" prop="problemType">
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
v-model="formInline.problemType">
<a-select-option v-for="(item, key) in problemTypeList"
:key="key"
:value="item.id">
<span style="display: inline-block;width: 100%" :title="item.problemLabel ">
{{item.problemLabel}}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
@@ -88,13 +92,13 @@
<span class="Required">*</span>
<span class="title-text-text" :title="$t('market')">{{$t('market')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectStatus">
<j-dict-select-tag class="box-input" v-model="formInline.projectStatus"
<a-form-model-item class="itemModel" prop="targetMarket">
<j-dict-select-tag class="box-input" v-model="formInline.targetMarket"
:disabled="disabled"
@input="handleInput('projectStatus')"
@input="handleInput('targetMarket')"
:placeholder="$t('PleaseSelect')+$t('market')"
:type="'select'"
:triggerChange="false" :dictCode="'project_status'"/>
:triggerChange="false" :dictCode="'region'"/>
</a-form-model-item>
</div>
</a-col>
@@ -105,10 +109,10 @@
<div class="title-text">
<span class="title-text-text" :title="$t('standardNo')">{{$t('standardNo')}}</span>
</div>
<a-form-model-item class="itemModel" prop="vehiclePlatform">
<a-form-model-item class="itemModel" prop="standNumber">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.vehiclePlatform"
:disabled="true"
v-model="formInline.standNumber"
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
</a-form-model-item>
</div>
@@ -150,10 +154,10 @@
</div>
<a-form-model-item class="itemModel" prop="prehomoDeliverableTemplate">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload('enclosure')">
{{ (formInline.enclosure === 'null' || formInline.enclosure === ''
@click="clickButtonToUpload('accessoryFile')">
{{ (formInline.accessoryFile === 'null' || formInline.accessoryFile === ''
||
formInline.enclosure == null) ? $t('clickUpload') : $t('viewUploadedFiles')
formInline.accessoryFile == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
@@ -161,9 +165,14 @@
</a-col>
</a-row>
</a-form-model>
<div class="submit-button">
<a-button class="box-button" type="primary" @click="submit">{{$t('submit')}}</a-button>
</div>
</div>
</div>
</div>
<JLoading :loading="loading">{{$t('pleaseWaitWhileRunning')}}</JLoading>
<listAddModel ref="listAddModelRef" @listAddModelForm="listAddModelForm"/>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
</div>
</template>
@@ -175,6 +184,7 @@
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import listAddModel from './listAddModel'
import { quillEditor } from 'vue-quill-editor'
export default {
@@ -182,14 +192,72 @@
components: {
PersonnelSelection,
uploadFile,
quillEditor
quillEditor,
listAddModel
},
data() {
return {
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,
projectNameList: [],
projectNameList: [
{
value: 'Open',
name: this.$t('OpenOne')
},
{
value: 'Privacy',
name: this.$t('Privacy')
}
],
content: '<h2>I am Example</h2>',
editorOption: {
// Some Quill options...
@@ -203,34 +271,92 @@
},
mounted() {
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
this.getBase()
if (this.$route.query.id) {
this.queryById()
}
},
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) {
console.log('editor blur!', quill)
},
}
,
onEditorFocus(quill) {
console.log('editor focus!', quill)
},
}
,
onEditorReady(quill) {
console.log('editor ready!', quill)
},
}
,
onEditorChange({ quill, html, text }) {
console.log('editor change!', quill, html, text)
this.content = html
},
}
,
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
}
,
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
}
,
bringInDocumentInformationClick() {
},
this.$refs.listAddModelRef.addModel(this.formInline)
}
,
listAddModelForm(id, number) {
this.formInline.standNumber = number
this.formInline.bussDocumentLibraryId = id
this.formInline = { ...this.formInline }
}
,
clickButtonToUpload(item) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
@@ -242,7 +368,8 @@
this.$refs.uploadFile.perentHandleFunc()
}
})
},
}
,
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
@@ -255,6 +382,47 @@
this.formInline[this.uploadName] = attIdList.join(',')
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>
@@ -381,4 +549,13 @@
.box-button {
height: 38px;
}
.submit-button {
width: 100%;
margin-top: 20px;
text-align: right;
padding: 0 32px;
box-sizing: border-box;
}
</style>
@@ -99,7 +99,7 @@
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1,
url: {
getInfoList: 'search/document/getFullTextInfoList'
getInfoList: '/problemKnowledgeBase/problemKnowledgeBaseEO/page'
}
}
},
@@ -108,10 +108,13 @@
},
methods: {
onSearch() {
this.pageNo = 1
this.getList()
},
ResetSearch() {
this.searchContent = ''
this.pageNo = 1
this.getList()
},
classificationClick() {
this.$refs.classificationMaintenanceModelRef.getData()
@@ -124,11 +127,14 @@
window.open(newUrl.href, '_blank')
},
newlyAddedClick() {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseAdd',
query: {}
this.$router.push({
path: '/problemKnowledgeBaseAdd'
})
window.open(newUrl.href, '_blank')
// let newUrl = this.$router.resolve({
// path: '/problemKnowledgeBaseAdd',
// query: {}
// })
// window.open(newUrl.href, '_blank')
},
pageOnChange(page, pageSize) {
this.pageNo = page
@@ -144,7 +150,7 @@
pageNo: this.pageNo,
pageSize: this.pageSize
}
postAction(this.url.getInfoList, query).then((res) => {
getAction(this.url.getInfoList, query).then((res) => {
if (res.success) {
this.conList = res.result.records
this.total = res.result.total
@@ -156,7 +162,9 @@
titleClick(item) {
let newUrl = this.$router.resolve({
path: '/problemKnowledgeBaseView',
query: {}
query: {
id: item.id
}
})
window.open(newUrl.href, '_blank')
}
@@ -21,30 +21,23 @@
<span class="text-field-right"
:title="queryForm[item.value]" v-else>
{{queryForm[item.value]}}fdgdgdfg
{{queryForm[item.value]}}
</span>
</div>
</div>
<div class="content">
sfdsfdsf的防控流感的飞机过来看的结果东法兰克感觉地方给了地方国家的分开两个就地方孤苦伶仃附件给领导反馈
独守空房了就收到付款了的角色发看来都是风景但是考虑附件第三方库老师积分迪斯科浪费绝对是分类的课时费
是反抗拉萨的飞机罗斯福就点十六分就但是发
迪斯科浪费电视机分厘卡的设计分类的水库附近的说服力但是积分的历史房价多少发了多少给京东方管理看豆腐干豆腐干看
a fjsd fklsdjfk s是否考虑技术的反抗类毒素就发的撒开了房间但是发离开打扫房间是开了房间都是老师JFK了的身份圣诞快乐就是的反抗类毒素解放迪斯科浪费是
考虑到房价打开拉萨附近分离技术的领导是否打开拉萨范德萨发了开始就发的考虑是否就但是考虑发及代理商开发就十分大师傅看
</div>
<div class="content" v-html="queryForm.content"></div>
<div class="content-icon">
<span class="content-icon-text">
<a-icon class="icon" type="eye"/>
<span>123456</span>
<span>{{this.queryForm.browsingHistoryCount}}</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="like"/>
<span>123456</span>
<span class="content-icon-text" @click="likeClick()">
<a-icon class="icon" :class="{'icon-active':this.isPraise}" type="like"/>
<span>{{this.queryForm.praiseCount}}</span>
</span>
<span class="content-icon-text">
<a-icon class="icon" type="star"/>
<span>123456</span>
<span class="content-icon-text" @click="starClick()">
<a-icon class="icon" :class="{'icon-active':this.isCollect}" type="star"/>
<span>{{this.queryForm.collectCount}}</span>
</span>
</div>
<div class="box-text">
@@ -107,7 +100,8 @@
<script>
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 {
name: 'problemKnowledgeBaseView',
@@ -119,35 +113,114 @@
standardContentList: [
{
title: this.$t('problemClassification'),
value: ''
value: 'problemType'
},
{
title: this.$t('market'),
value: ''
value: 'targetMarket'
},
{
title: this.$t('standardNo'),
value: ''
value: 'standNumber'
},
{
title: this.$t('standardName'),
value: ''
value: 'title'
},
{
title: this.$t('enclosure'),
type: 2,
value: ''
value: 'accessoryFile'
}
],
queryForm: {},
formInline: {},
rules: {}
rules: {},
isPraise: false,
isCollect: false
}
},
mounted() {
document.title = this.$t('applicableInstructionsMarketList')
this.viewAdd()
this.queryById()
},
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) {
this.$refs.viewFileModelRef.clickButtonToUpload(item)
},
@@ -287,13 +360,17 @@
font-weight: 400;
text-align: right;
margin-top: 20px;
display: flex;
justify-content: end;
}
.content-icon-text {
display: inline-block;
/*display: inline-block;*/
padding: 0 20px;
cursor: pointer;
line-height: 40px;
display: flex;
align-items: center;
}
.content-icon-text .icon {
@@ -301,6 +378,11 @@
color: #3b4249 !important;
}
.content-icon-text .icon-active {
font-size: 24px;
color: #00B3BE !important;
}
.content-icon-text span {
display: inline-block;
margin-left: 4px;