diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index 086fff7ac..58d3f16a6 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -5,7 +5,7 @@ :disabled="true" :title="value" :placeholder="$t('PleaseSelect')+query.db_field_txt"/> - + {{this.$t('PersonnelSelection')}} @@ -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, diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue index d4942d910..5a312fa44 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue @@ -9,7 +9,8 @@ {{$t('monthSelection')}} @@ -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() }, diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue new file mode 100644 index 000000000..8e792dd8a --- /dev/null +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/addModel.vue @@ -0,0 +1,322 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue index 80632e53a..cdd5dd3a4 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue @@ -9,7 +9,7 @@ @@ -23,7 +23,7 @@ @@ -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 @@ @@ -78,6 +80,7 @@ @@ -91,6 +94,7 @@ @@ -110,6 +114,7 @@ @input="handleInput('usage')" :placeholder="$t('PleaseSelect')+$t('usage')" :type="'select'" + :disabled="disabled" :triggerChange="false" :dictCode="'yong4_fa3'"/> @@ -183,6 +188,7 @@ @@ -197,6 +203,7 @@ @@ -211,6 +218,7 @@ @@ -225,6 +233,7 @@ @@ -239,10 +248,11 @@ + v-model="formInline.lawsContact"/> @@ -255,7 +265,7 @@ @@ -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) { diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue index 2258f7fb4..22f173f08 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/fillAdd.vue @@ -15,12 +15,14 @@
- * + * {{$t('fillInTheMonth')}}
- + @@ -28,7 +30,9 @@
- {{$t('bringInStandardInformation')}} + {{$t('bringInStandardInformation')}} +
@@ -36,15 +40,16 @@
- * + * {{$t('chapterContents')}}
- +
- * + * {{$t('contentTemplate')}}
- + - - - + + +
{{$t('cancel')}} - {{$t('submit')}} + {{$t('submit')}} +
+
@@ -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 @@ } } +