78308 国内外政策、政策入库流程 根据发布日期自动带入年度

This commit is contained in:
zyn
2023-11-08 11:15:36 +08:00
parent 75bc4b32ee
commit bddf9ecb7c
2 changed files with 15 additions and 2 deletions
@@ -140,7 +140,9 @@
<el-form-item label="发文日期" prop="issueTime" label-width="150px" class="add-form-item">
<el-datePicker v-model="sarLawsStandEO.issueTime"
:editable="false"
placeholder="请选择发文日期"></el-datePicker>
placeholder="请选择发文日期"
@change="issueTimeChange"
></el-datePicker>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -572,6 +574,7 @@ import CustomSelect from '@/components/CustomFormComponents/Select'
import customSelectArray from '@/components/CustomFormComponents/SelectArray'
import RoleTree from "@/components/roleTree";
import MechanismTree from "@/components/mechanismTree";
import moment from "moment";
export default {
name: "editDrawer",
@@ -909,6 +912,10 @@ export default {
// this.getDept()
},
methods: {
issueTimeChange (val) {
const year = moment(val).format('YYYY')
this.sarLawsStandEO.lawsYear = this.lawsYearOptions.find(item => item.label === year)?.value || ''
},
initType (value) {
if (value && value !== '') {
return value.split(',')