对接文档对比
This commit is contained in:
@@ -1244,4 +1244,6 @@ module.exports = {
|
||||
punctuationmark:'Only English punctuation marks other than the # sign can be entered',
|
||||
created: 'Created',
|
||||
updated:'Updated',
|
||||
OpenOne:'Open',
|
||||
Privacy:'Privacy',
|
||||
}
|
||||
@@ -1345,6 +1345,8 @@ module.exports = {
|
||||
Adjustareasofresponsibility:'调整责任领域',
|
||||
regulatoryTechnicalAssessment:'法规技术评估',
|
||||
punctuationmark:'只能输入除#号外的英文标点符号',
|
||||
OpenOne:'公开',
|
||||
Privacy:'私密',
|
||||
created: '创建时间',
|
||||
updated:'更新时间',
|
||||
}
|
||||
+29
-12
@@ -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'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
+12
-9
@@ -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>
|
||||
+216
-39
@@ -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>
|
||||
+14
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user