对接法规月报
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
:disabled="true"
|
||||
:title="value"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
|
||||
<a-button type="primary" class="button-box" @click="standardClick">
|
||||
<a-button type="primary" class="button-box" :disabled="disabled" @click="standardClick">
|
||||
{{this.$t('PersonnelSelection')}}
|
||||
</a-button>
|
||||
<a-button type="primary" v-if='isDelete' class="button-box" @click="standardDelete">
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass','isDelete'],
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput', 'isClass','isDelete','disabled'],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
|
||||
+10
-1
@@ -9,7 +9,8 @@
|
||||
<span>{{$t('monthSelection')}}</span>
|
||||
</div>
|
||||
<a-month-picker class="box-input"
|
||||
v-model="queryParam.monthSelection"
|
||||
@change="dateChange({db_field_name:'month'})"
|
||||
v-model="queryParam.month"
|
||||
:placeholder="$t('monthSelection')"/>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -80,6 +81,7 @@
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import fillTable from './modules/fillTable'
|
||||
import fillAdd from './modules/fillAdd'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'RegulationMonthlyFill',
|
||||
@@ -153,15 +155,22 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryParam.month = moment(new Date()).format('YYYY-MM')
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
dateChange(item) {
|
||||
this.queryParam[item.db_field_name] = this.queryParam[item.db_field_name] ? moment(this.queryParam[item.db_field_name]).format('YYYY-MM') : ''
|
||||
this.queryParam = {...this.queryParam}
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.queryParam.month = moment(new Date()).format('YYYY-MM')
|
||||
this.queryParam = {...this.queryParam}
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
title="添加"
|
||||
: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>
|
||||
<div style="width: 100%">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
rowKey="id"
|
||||
:scroll="{x: 1200}"
|
||||
:data-source="dataList"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:' '}"
|
||||
:loading="loading">
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<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: 'addModel',
|
||||
components: {
|
||||
globalAdvancedQuery
|
||||
},
|
||||
props: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
selectedRowKeys: [],
|
||||
queryParam: {},
|
||||
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('status'),
|
||||
// dataIndex: 'state',
|
||||
// align: 'center',
|
||||
// ellipsis: true
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('technicalField'),
|
||||
// dataIndex: 'technology_territory',
|
||||
// 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
|
||||
}
|
||||
// {
|
||||
// title: this.$t('correspondingStandard'),
|
||||
// dataIndex: 'corresponding_standard',
|
||||
// align: 'center',
|
||||
// ellipsis: true
|
||||
// }
|
||||
],
|
||||
dataList: [],
|
||||
content: [],
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
fieldList: [],
|
||||
queryParamQuery: {},
|
||||
selectedRowKeysRecord:[],
|
||||
queryConditionVOList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
addModel() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.selectedRowKeys = []
|
||||
this.queryConditionVOList = []
|
||||
this.replacePage()
|
||||
this.queryConditionInventory()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.replacePage()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.queryConditionVOList = []
|
||||
this.$refs.globalAdvancedQueryRef.resetLine()
|
||||
this.$refs.globalAdvancedQueryRef.emitCallback()
|
||||
},
|
||||
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('/dummy/dummyInventoryInfoEO/queryPageDummy', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
queryConditionInventory() {
|
||||
let query = {
|
||||
flag: 1
|
||||
}
|
||||
getAction('/dummy/dummyInventoryInfoEO/queryConditionInventory', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.fieldList = res.result || []
|
||||
} else {
|
||||
this.fieldList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
onSelectChange(value, record) {
|
||||
this.selectedRowKeys = value
|
||||
if (this.selectedRowKeys.length > 1) {
|
||||
this.selectedRowKeys.shift()
|
||||
record.shift()
|
||||
}
|
||||
this.selectedRowKeysRecord = record
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
this.$emit('addModelForm',this.selectedRowKeysRecord[0])
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
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>
|
||||
+24
-11
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="titleCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.titleCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="titleEn">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.titleEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('englishTitle')"/>
|
||||
</a-form-model-item>
|
||||
@@ -42,6 +42,7 @@
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.technologyTerritory"
|
||||
:maxTagCount="1"
|
||||
:disabled="disabled"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -62,6 +63,7 @@
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.applyCar"
|
||||
:placeholder="$t('PleaseSelect')+$t('vehicleType')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'car_type'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -78,6 +80,7 @@
|
||||
<j-multi-select-tag class="box-input" v-model="formInline.applyScope"
|
||||
:placeholder="$t('PleaseSelect')+$t('scopeOfApplication')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'apply_scope'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -91,6 +94,7 @@
|
||||
<a-form-model-item class="itemModel">
|
||||
<j-dict-select-tag class="box-input" v-model="formInline.state"
|
||||
@input="handleInput('status')"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseSelect')+$t('status')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'state'"/>
|
||||
@@ -110,6 +114,7 @@
|
||||
@input="handleInput('usage')"
|
||||
:placeholder="$t('PleaseSelect')+$t('usage')"
|
||||
:type="'select'"
|
||||
:disabled="disabled"
|
||||
:triggerChange="false" :dictCode="'yong4_fa3'"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -183,6 +188,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentCn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageCn')"
|
||||
v-model.trim="formInline.contentCn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -197,6 +203,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentEn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageEn')"
|
||||
v-model.trim="formInline.contentEn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -211,6 +218,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="workProgressCn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('workProgressCn')"
|
||||
v-model.trim="formInline.workProgressCn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -225,6 +233,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="workProgressEn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('workProgressEn')"
|
||||
v-model.trim="formInline.workProgressEn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
@@ -239,10 +248,11 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<PersonnelSelection
|
||||
:query="{db_field_name:'lawsContact',db_field_txt:$t('regulatoryContact')}"
|
||||
:query="{db_field_name:'lawsContactName',db_field_txt:$t('regulatoryContact')}"
|
||||
:personneQuery="formInline"
|
||||
:disabled="disabled"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.lawsContactName"/>
|
||||
v-model="formInline.lawsContact"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -255,7 +265,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="link">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.link"
|
||||
:placeholder="$t('PleaseEnter')+$t('link')"/>
|
||||
</a-form-model-item>
|
||||
@@ -272,7 +282,7 @@
|
||||
|
||||
export default {
|
||||
name: 'defaultTemplate',
|
||||
props: ['formInlineQuery'],
|
||||
props: ['formInlineQuery', 'disabled'],
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
@@ -358,8 +368,7 @@
|
||||
]
|
||||
},
|
||||
formInline: {},
|
||||
CategoryTreeList: [],
|
||||
disabled: false
|
||||
CategoryTreeList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -367,20 +376,24 @@
|
||||
this.$nextTick(() => {
|
||||
if (this.formInlineQuery.id) {
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
|
||||
if(this.formInline.technologyTerritory){
|
||||
if (this.formInline.technologyTerritory) {
|
||||
this.formInline.technologyTerritory = this.formInline.technologyTerritory.split(',')
|
||||
}
|
||||
this.formInline = { ...this.formInline }
|
||||
} else {
|
||||
this.formInline = {}
|
||||
this.formInline.lawsContactName = this.userInfo().username
|
||||
this.formInline.lawsContact = this.userInfo().id
|
||||
this.formInline.lawsContact = this.userInfo().username
|
||||
this.formInline.lawsContactName = this.userInfo().id
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
getStandData(value) {
|
||||
this.formInline.titleCn = value.serial_number + ' ' + value.title
|
||||
this.formInline.titleEn = value.serial_number + ' ' + value.title_en
|
||||
},
|
||||
getSysCategoryTree() {
|
||||
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
+61
-20
@@ -15,12 +15,14 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('fillInTheMonth')">{{$t('fillInTheMonth')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="month">
|
||||
<a-form-model-item class="itemModel" :prop="!disabled?'month':''">
|
||||
<a-month-picker class="box-input"
|
||||
:disabled="disabled"
|
||||
@change="dateChange({db_field_name:'month'})"
|
||||
v-model="formInline.month"
|
||||
:placeholder="$t('fillInTheMonth')"/>
|
||||
</a-form-model-item>
|
||||
@@ -28,7 +30,9 @@
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right" v-if="formInline.contentTemplate == 1">
|
||||
<div style="text-align: right">
|
||||
<a-button class="button-text" type="primary">{{$t('bringInStandardInformation')}}</a-button>
|
||||
<a-button class="button-text" @click="bringInStandardInformationClick"
|
||||
:disabled="disabled" type="primary">{{$t('bringInStandardInformation')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -36,15 +40,16 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!disabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('chapterContents')">{{$t('chapterContents')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi" prop="memoriesChapter">
|
||||
<a-form-model-item class="itemModel-multi" :prop="!disabled?'memoriesChapter':''">
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="formInline.memoriesChapter"
|
||||
:maxTagCount="1"
|
||||
:disabled="disabled"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -58,13 +63,13 @@
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="Required" v-if="!templateDisabled">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('contentTemplate')">{{$t('contentTemplate')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentTemplate">
|
||||
<a-form-model-item class="itemModel" :prop="!templateDisabled?'contentTemplate':''">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('contentTemplate')"
|
||||
:disabled="disabled"
|
||||
:disabled="templateDisabled"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
@@ -81,19 +86,21 @@
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<defaultTemplate :formInlineQuery="formInline" ref="defaultTemplateRef"
|
||||
v-if="formInline.contentTemplate == '1'"/>
|
||||
<solicitOpinions :formInlineQuery="formInline " ref="solicitOpinionsRef"
|
||||
v-else-if="formInline.contentTemplate == '2'"/>
|
||||
<releaseStandard :formInlineQuery="formInline" ref="releaseStandardRef"
|
||||
v-else-if="formInline.contentTemplate == '3'"/>
|
||||
<defaultTemplate :formInlineQuery="formInline" ref="defaultTemplateRef" :disabled="disabled"
|
||||
v-if="formInline.contentTemplate == '1' && isTrue"/>
|
||||
<solicitOpinions :formInlineQuery="formInline " ref="solicitOpinionsRef" :disabled="disabled"
|
||||
v-else-if="formInline.contentTemplate == '2' && isTrue"/>
|
||||
<releaseStandard :formInlineQuery="formInline" ref="releaseStandardRef" :disabled="disabled"
|
||||
v-else-if="formInline.contentTemplate == '3' && isTrue"/>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
|
||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
<a-button @click="handleSubmit" v-if="!disabled" type="primary" :loading="confirmLoading">{{$t('submit')}}
|
||||
</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<addModel ref="addModelRef" @addModelForm="addModelForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -101,14 +108,17 @@
|
||||
import defaultTemplate from './defaultTemplate'
|
||||
import solicitOpinions from './solicitOpinions'
|
||||
import releaseStandard from './releaseStandard'
|
||||
import addModel from './addModel'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'fillAdd',
|
||||
components: {
|
||||
defaultTemplate,
|
||||
solicitOpinions,
|
||||
releaseStandard
|
||||
releaseStandard,
|
||||
addModel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -140,7 +150,9 @@
|
||||
confirmLoading: false,
|
||||
title: '',
|
||||
disabled: false,
|
||||
isTrue: false,
|
||||
chapterContentsList: [],
|
||||
templateDisabled: false,
|
||||
contentTemplateList: [
|
||||
{
|
||||
id: '1',
|
||||
@@ -165,6 +177,12 @@
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
bringInStandardInformationClick() {
|
||||
this.$refs.addModelRef.addModel()
|
||||
},
|
||||
addModelForm(value) {
|
||||
this.$refs.defaultTemplateRef.getStandData(value)
|
||||
},
|
||||
getTree() {
|
||||
getAction('/report/lawsMonthlyReportTitleTemplateEO/list', {}).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -174,37 +192,53 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
dateChange(item) {
|
||||
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM') : ''
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
add() {
|
||||
this.isTrue = false
|
||||
this.templateDisabled = false
|
||||
this.getTree()
|
||||
this.title = this.$t('addContent')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.formInline = {}
|
||||
this.formInline.contentTemplate = '1'
|
||||
this.formInline = { ...this.formInline }
|
||||
this.isTrue = true
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
this.getTree()
|
||||
this.isTrue = false
|
||||
this.title = this.$t('editContent')
|
||||
this.visible = true
|
||||
this.disabled = false
|
||||
this.templateDisabled = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = row
|
||||
if (this.formInline.memoriesChapter) {
|
||||
this.formInline.memoriesChapter = this.formInline.memoriesChapter.split(',')
|
||||
}
|
||||
this.isTrue = true
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
view(row) {
|
||||
this.title = this.$t('viewContent')
|
||||
this.visible = true
|
||||
this.isTrue = false
|
||||
this.templateDisabled = true
|
||||
this.disabled = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = row
|
||||
if (this.formInline.memoriesChapter) {
|
||||
this.formInline.memoriesChapter = this.formInline.memoriesChapter.split(',')
|
||||
}
|
||||
this.isTrue = true
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
@@ -237,17 +271,16 @@
|
||||
}
|
||||
})
|
||||
let query = Object.assign(val, {
|
||||
month: JSON.stringify(formInline.month),
|
||||
month: formInline.month,
|
||||
memoriesChapter: formInline.memoriesChapter,
|
||||
contentTemplate: formInline.contentTemplate
|
||||
})
|
||||
|
||||
postAction(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('fillTableAddForm')
|
||||
this.$emit('fillAddForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
@@ -260,7 +293,15 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.ant-select-disabled {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.ant-input-disabled {
|
||||
color: rgba(0, 0, 0, 0.65) !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
.box-title-text {
|
||||
|
||||
+18
-13
@@ -5,11 +5,11 @@
|
||||
{{'NO.'+(index+1)}}
|
||||
<a-icon class="icon-size"
|
||||
@click="addData"
|
||||
v-if="(dataList.length-1) == index"
|
||||
v-if="(dataList.length-1) == index && !disabled"
|
||||
type="plus-circle"/>
|
||||
<a-icon class="icon-size"
|
||||
@click="deleteData"
|
||||
v-if="dataList.length > 1 && (dataList.length - 1) == index"
|
||||
v-if="dataList.length > 1 && (dataList.length - 1) == index && !disabled"
|
||||
type="minus-circle"/>
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
@@ -20,8 +20,8 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standardNo">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.standardNumber"
|
||||
:disabled="disabled"
|
||||
v-model="item.standardNumber"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNo')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -34,8 +34,8 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standardNameCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.standardNameCn"
|
||||
:disabled="disabled"
|
||||
v-model="item.standardNameCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNameCn')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -49,8 +49,8 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
v-model="formInline.standardNameEn"
|
||||
:disabled="disabled"
|
||||
v-model="item.standardNameEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNameEn')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -66,7 +66,7 @@
|
||||
@change="dateChange('issueTime',index)"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline['issueTime']"
|
||||
v-model="item['issueTime']"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
@@ -85,7 +85,7 @@
|
||||
@change="dateChange('implementTime',index)"
|
||||
:getCalendarContainer="(trigger) => trigger.parentNode"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline['implementTime']"
|
||||
v-model="item['implementTime']"
|
||||
:disabled="disabled"
|
||||
style="width: 100%"/>
|
||||
</a-form-model-item>
|
||||
@@ -101,13 +101,12 @@
|
||||
|
||||
export default {
|
||||
name: 'releaseStandard',
|
||||
props:['formInlineQuery'],
|
||||
props:['formInlineQuery','disabled'],
|
||||
data() {
|
||||
return {
|
||||
rules: {},
|
||||
formInline: {},
|
||||
CategoryTreeList: [],
|
||||
disabled: false,
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
@@ -116,6 +115,8 @@
|
||||
if (this.formInlineQuery.id) {
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
|
||||
this.formInline = { ...this.formInline }
|
||||
this.dataList = this.formInline.newStandardTemplateEOList
|
||||
this.dataList = [...this.dataList]
|
||||
} else {
|
||||
this.dataList = [
|
||||
{
|
||||
@@ -157,7 +158,11 @@
|
||||
getData(callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
callback && callback(this.formInline)
|
||||
let query = {
|
||||
id: this.formInline.id,
|
||||
newStandardTemplateEOList: this.dataList
|
||||
}
|
||||
callback && callback(query)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+13
-8
@@ -5,11 +5,11 @@
|
||||
{{'NO.'+(index+1)}}
|
||||
<a-icon class="icon-size"
|
||||
@click="addData"
|
||||
v-if="(dataList.length-1) == index"
|
||||
v-if="(dataList.length-1) == index && !disabled"
|
||||
type="plus-circle"/>
|
||||
<a-icon class="icon-size"
|
||||
@click="deleteData"
|
||||
v-if="dataList.length > 1 && (dataList.length - 1) == index"
|
||||
v-if="dataList.length > 1 && (dataList.length - 1) == index && !disabled"
|
||||
type="minus-circle"/>
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="planNoChinese">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="item.planNumberCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('planNoChinese')"/>
|
||||
</a-form-model-item>
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standardNameCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="item.standardNameCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNameCn')"/>
|
||||
</a-form-model-item>
|
||||
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-input class="box-input"
|
||||
:disabled="false"
|
||||
:disabled="disabled"
|
||||
v-model="item.standardNameEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('standardNameEn')"/>
|
||||
</a-form-model-item>
|
||||
@@ -82,13 +82,12 @@
|
||||
|
||||
export default {
|
||||
name: 'solicitOpinions',
|
||||
props: ['formInlineQuery'],
|
||||
props: ['formInlineQuery','disabled'],
|
||||
data() {
|
||||
return {
|
||||
rules: {},
|
||||
formInline: {},
|
||||
CategoryTreeList: [],
|
||||
disabled: false,
|
||||
dataList: []
|
||||
}
|
||||
},
|
||||
@@ -97,6 +96,8 @@
|
||||
if (this.formInlineQuery.id) {
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
|
||||
this.formInline = { ...this.formInline }
|
||||
this.dataList = this.formInline.newOpinionTemplateEOList
|
||||
this.dataList = [...this.dataList]
|
||||
} else {
|
||||
this.dataList = [
|
||||
{
|
||||
@@ -136,7 +137,11 @@
|
||||
getData(callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
callback && callback(this.formInline)
|
||||
let query = {
|
||||
id: this.formInline.id,
|
||||
newOpinionTemplateEOList: this.dataList
|
||||
}
|
||||
callback && callback(query)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user